Commit Graph

46796 Commits

Author SHA1 Message Date
Thomas Tafertshofer
e58a97b5d7 OpenGL bindings fix for methods with iobuffer args
This changes generation of the OpenGL bindings to prevent
crashes of methods with more then one nio buffer argument.

Bug: 6772416
Change-Id: I4eff25c2f568dea78a6ffd3e95ff4620ab4b3b7d
2012-07-12 11:23:02 -07:00
Mathias Agopian
4bb0164f8a Merge "one more step towards multiple display support" 2012-07-11 17:19:00 -07:00
Mathias Agopian
2aa3aa680e Merge "improve glgen tool to support EGL1.4" 2012-07-11 16:07:39 -07:00
Thomas Tafertshofer
66a42db8cb improve glgen tool to support EGL1.4
- added EGL1.4 bindings generation
- fixed bugs in GLES bindings

Bug: 6709865
Change-Id: I04ac63f652e1968a51eb833f47e00336ea449980
2012-07-10 15:49:43 -07:00
Mathias Agopian
4fec873a98 one more step towards multiple display support
- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space
2012-07-10 14:29:27 -07:00
Naseer Ahmed
0bc64be3f5 libs/ui: Add support for triple framebuffers
Change-Id: I90dd38deeeda9a3785b87286cc7d252c6f948750
2012-07-09 22:04:19 -07:00
Jesse Hall
e7db724bed Fix check for fence merge success
Change-Id: I9b16526ebfe4ffabf7c4372cca9b192ce046aa21
2012-07-03 13:41:54 -07:00
Jesse Hall
c5c5a14c06 Only set acquire fences on overlay layers
Change-Id: I08e8173f83580de5a4e43a0ba5ea03e5ec6e8782
2012-07-02 16:49:28 -07:00
Jesse Hall
dc5b485f74 Pass fence to HWC on first use of buffer
Also do a CPU-wait on the fence before using it for GL composition.

Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
2012-06-30 21:38:51 -07:00
Jesse Hall
b42b1ac158 Return fence from acquireBuffer
Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
2012-06-30 21:38:51 -07:00
Jesse Hall
c777b0b3b9 Pass fences with buffers from SurfaceTextureClient
Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
2012-06-30 21:38:51 -07:00
Jesse Hall
02a7be74dd Merge "Clarify aborted updateTexImage use of fences" 2012-06-29 09:54:25 -07:00
Jesse Hall
962174da03 Merge "Return fence to client in dequeuBuffer" 2012-06-29 09:54:08 -07:00
Mathias Agopian
33264868ba add a way to enable debugging sensors at runtime
if debug.sensors is true, extra debugging
sensors are enabled and HAL provided sensor fusion
is disabled

Change-Id: I9b093424edb8c5363d1337237cdf6abe4ab266f9
2012-06-28 19:46:54 -07:00
Mathias Agopian
bdf277355d improve sensor fusion
we now use a better quaternion propagation equation
this is especially beneficial for lower gyroscope rates

Change-Id: Ifbf273c8a092a8849ca4fe4b9bca30787e924018
2012-06-28 18:21:43 -07:00
Mathias Agopian
8f11b24a72 add some comments
Change-Id: Ia2e2c9531715fc2bd5b51c4dc58389e01abfe7e6
2012-06-28 17:35:14 -07:00
Mathias Agopian
1b03149f35 get rid of GraphicPlane
its functionality is now folded into DisplayHardware
there will be more changes in that area.
2012-06-28 17:27:19 -07:00
Jesse Hall
d58c304cc6 Clarify aborted updateTexImage use of fences
When updateTexImage acquires a buffer but then aborts (due to an error
or the buffer being rejected), it releases the newly-acquired buffer.
It was passing the buffer slot's fences to releaseBuffer, even though
they hadn't been created after the acquire yet. This wasn't a bug,
since the fences would be cleared just after the buffer slot was last
released, but explicitly passing null fences makes this clearer.

Change-Id: I087f2ec3fd02c40f57782c1fca24eb9567e2943d
2012-06-28 17:08:42 -07:00
Jesse Hall
f9783af225 Return fence to client in dequeuBuffer
Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9
2012-06-28 17:08:42 -07:00
Mathias Agopian
3094df359d First prototype atttempting to support an external display
both API and implementation will change, this is just a prototype
intended to show feasability.

SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.

Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
2012-06-28 15:51:08 -07:00
Mathias Agopian
852db07d69 move sensorservice from frameworks/base to frameworks/native
this commit also imports all of sensorservice history.

Change-Id: Iadffcc92be600c48175b8afadcb15b6648532b3f
2012-06-28 15:06:35 -07:00
Mathias Agopian
dc5b63e40e small improvement to sensor fusion
1) there was a typo when computing the system covariance
a term in dT^3 was ommitted; the impact was was very limited
because of how small this term is.

2) initialize the system covariance matrix with non-zero
values for the gyro-bias part. this improves the initial
bias estimation speed significantly.

3) added comments here and there

Change-Id: I4328c9cca73e089889d5e74b9fda99d7831762dc
2012-06-27 17:07:56 -07:00
Mathias Agopian
8dd4fe8dd3 fix a potential buffer overflow in sensorservice
Bug: 6580560
Change-Id: Icf6cafbca09174515a964a7cd69d8cc589ad52de
2012-06-27 17:07:56 -07:00
Mathias Agopian
d1920ffede Fix a stack corruption in sensorservice
Bug: 6576732
Change-Id: If0f2fb0d0c35b932fb77cd262e676042145b28f9
2012-06-27 17:07:56 -07:00
Mathias Agopian
a5c106a4f0 fix a typo causing sensor event to be sorted in reverse chronological order
Change-Id: I041c64616d88ed1abb5efc90ed9eb0d9baeb4832
2012-06-27 17:07:56 -07:00
Mathias Agopian
907103bf18 usea socketpair instead of a pipe in BitTube
Bug: 6252830
Change-Id: I363cc7e9f73a5b7d8bbccee312c6d8938c84e99a
2012-06-27 17:07:56 -07:00
Steve Block
f5a1230d32 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-06-27 17:07:56 -07:00
Steve Block
3c20fbed7f Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
2012-06-27 17:07:56 -07:00
Steve Block
c7839e8976 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-06-27 17:07:56 -07:00
Steve Block
a551237de1 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-06-27 17:07:56 -07:00
Mathias Agopian
1a62301fc5 handle EINTR when calling sensor HAL's poll function
some sensor HALs don't handle EINTR, make sure to catch it in the
sensorservice.

also if we ever encounter an error that we can't handle, we abort
which will restart us (or the whole system process if we're running
in it)

Bug: 5511741
Change-Id: I7051882b06980f778736b53d6cd021a99b5ca8d2
2012-06-27 17:07:56 -07:00
Mathias Agopian
62569ecf52 SensorService now always clamps the requested rate
Requested rate will be clamped to the minimum rate and then
to 1ms. Previously we would return an error if a lower
rate was asked. The SensorManager documentation wording
allows this change.

We do this to get more consistancy between all the sensor
drivers / HALs

Change-Id: I199f76486fb76ccbb11e7280460a03726c767e84
2012-06-27 17:07:56 -07:00
Mathias Agopian
ae09d65f5b fix an issue where SensorService could request an invalid sensor delay
When the app requests "fastest", the java layer encodes this as a
delay of 0. SensorService was passing this unchanged to the HAL.
However the HAL is required to reject delays lower that the
advertised lower delay.

Change-Id: I92be77acd3af62ffeb49e4b31e24ddcd203510e2
2012-06-27 17:07:56 -07:00
Mathias Agopian
b3989276d1 Rename SensorChannel to BitTube 2012-06-27 17:07:55 -07:00
Mathias Agopian
667102f6b0 improve sensorservice dumpsys
Change-Id: I8b53d5cab884c3aca16d95df5fbf288368d52e8b
2012-06-27 17:07:55 -07:00
Mathias Agopian
b9e152637a improve sensorservice_test output
Change-Id: I6248b6f1f001fedec1bddcddfcd2b381d9bb4bf4
2012-06-27 17:07:55 -07:00
Mathias Agopian
a83f45c6c7 Fix a few style issues and remove LOG spam
Change-Id: I6b6f75373f4ac28f98dea6a6f1c2567a6aa02243
2012-06-27 17:07:55 -07:00
Michael Johnson
3e87d8dade More error checks to avoid div by zero.
Change-Id: I18e5b72d02bf5420c14334d3a03f18fa40572d31
2012-06-27 17:07:55 -07:00
Max Braun
a01b4e237d Fix occasional fusion divergence by detecting it and resetting the fusion.
Change-Id: I51186e12fb9b2316e3671e3908174f4495df89a0
2012-06-27 17:07:55 -07:00
Mathias Agopian
16bcf66afa have the sensorsevice test print the delay of the first received event
Change-Id: I89d63122574c3f8790f00512c76d59b463acf18f
2012-06-27 17:07:55 -07:00
Mathias Agopian
16c3e4ae72 silence sensorservice when it's dropping events
Change-Id: Ib05862e545aa780821aa605e45ab189f530494b7
2012-06-27 17:07:55 -07:00
Mathias Agopian
7b2b32f2e7 sensorservice: be more robust when there are no sensor h/w
Bug: 5030108
Change-Id: I45b85b3c492b9268cb0ae44d2e5fc8c708b6e66e
2012-06-27 17:07:55 -07:00
Jeff Brown
0be7a26220 Remove the simulator target from all makefiles. Bug: 5010576
Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2012-06-27 17:07:55 -07:00
Mathias Agopian
1cb13461a8 PermissionCache caches permission checks
This is intended to absorb the cost of the IPC
to the permission controller.
Cached permission checks cost about 3us, while
full blown ones are two orders of magnitude slower.

CAVEAT: PermissionCache can only handle system
permissions safely for now, because the cache is
not purged upon global permission changes.

Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e
2012-06-27 17:07:55 -07:00
Mathias Agopian
eaf2d0bfe3 cleanup Kalman filter parameters, add/fix comments/units
Change-Id: Iedcae7164af8f7ea0e048ea7c72d0f35d16d739f
2012-06-27 17:07:55 -07:00
Mathias Agopian
010e422301 improve orientation sensor with gyro data
when we do our own sensor fusion, we also export an
improved orientation sensor and hide the HAL sensor.
The fused orientation sensor is much more precise, fast
and smooth.

Change-Id: I0ea843b47ad9d12f6b22cce51f8629852d423126
2012-06-27 17:07:55 -07:00
Mathias Agopian
3301542828 use quaternions instead of MRPs
also use correct time propagation equation
disable the fused sensors when gyro is not present since
they were unusable in practice.

Change-Id: Iad797425784e67dc6c5690e97c71c583418cc5b5
2012-06-27 17:07:55 -07:00
Mathias Agopian
984826cc15 9-axis sensor fusion with Kalman filter
Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion

Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
2012-06-27 17:07:54 -07:00
Mathias Agopian
a1b7db95b6 Fix a few issues with sensors reference-counting 2012-06-27 17:07:54 -07:00
Mathias Agopian
e04a63b305 Fix a crasher in SensorService
SensorService main thread wasn't java-enabled. however, in
some situations we end-up calling into the BatteryService from
that thread which causes a crash.

Change-Id: Iffba90e4c4b743dba84d62f1342001a9db31916d
2012-06-27 17:07:54 -07:00