Commit Graph

1809 Commits

Author SHA1 Message Date
Jon McCaffrey 65dbe971b1 InputDispatcher: Optimize count()
Count items as they are added and removed rather than iterating over the
entire list to count them.

Increases performance slightly, particularly when tracing is turned on,
which causes count to be queried more often, and when the number of
items in the queues grow large.  This can happen due to applications not
responding, for example.

Change-Id: I0f11f7edd46089612af910cdfabfeb3ee685d7d9
2014-11-26 12:04:47 -08:00
Chih-hung Hsieh c4764f9e57 am 7d831769: am 46ca041f: Merge "Don\'t error out because SensorEventConnection::dump overloads BBinder::dump"
* commit '7d831769fce188251afb02e6b933be7bdfe504b4':
  Don't error out because SensorEventConnection::dump overloads BBinder::dump
2014-11-26 00:01:55 +00:00
Chih-hung Hsieh 7d831769fc am 46ca041f: Merge "Don\'t error out because SensorEventConnection::dump overloads BBinder::dump"
* commit '46ca041f43e3d80029782b12c994b232dc01b5d5':
  Don't error out because SensorEventConnection::dump overloads BBinder::dump
2014-11-25 23:55:52 +00:00
Bernhard Rosenkränzer 72952efe5c Don't error out because SensorEventConnection::dump overloads BBinder::dump
clang warns about SensorEventConnection::dump overloading BBinder::dump
in some conditions.

Since the cause isn't fixable without changing the API, tell clang not
to error out on it.

Change-Id: I15659de7c5499d937019599cfefb01305039e6b5
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-25 15:42:27 -08:00
chh 5394346ada am 22b99e3a: am 45aa0227: Merge "Fix potential format string vulnerability"
* commit '22b99e3a9a5797deada897102e71e9a88ae46d24':
  Fix potential format string vulnerability
2014-11-25 19:57:17 +00:00
chh 22b99e3a9a am 45aa0227: Merge "Fix potential format string vulnerability"
* commit '45aa022710165c321cdec9a475f269d6932fe1f3':
  Fix potential format string vulnerability
2014-11-25 19:04:12 +00:00
Michael Lentine 347a2acf7e am 1e611662: am b947f29a: Merge "Add clamp to Layer and update Transform inverse." into lmp-mr1-dev
* commit '1e6116621bc2f7aedfd52a5f1327b530328435b0':
  Add clamp to Layer and update Transform inverse.
2014-11-25 18:56:41 +00:00
Michael Lentine 1e6116621b am b947f29a: Merge "Add clamp to Layer and update Transform inverse." into lmp-mr1-dev
* commit 'b947f29a6af1622cda16d0b7112595082750dd07':
  Add clamp to Layer and update Transform inverse.
2014-11-25 18:44:51 +00:00
Bernhard Rosenkränzer 5f6199373d Fix potential format string vulnerability
A sensor name containing a format string could have interesting side
effects...

Change-Id: If7f1378aa68572d9716c339728eab18faa6b9f2a
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-24 16:59:39 -08:00
Michael Lentine 28ea217ff4 Add clamp to Layer and update Transform inverse.
Ensure that the adjusted transparent region is within
the display bounds by clamping after the transformation
is applied and clean up transform's inverse function.

Bug: 18452546

Change-Id: Ia473e483ee8374177bcb84d8192eb1f0e86f022a
2014-11-21 17:05:18 -08:00
Dan Albert c1ced8bbcd am c894c204: Merge "C++11 compatibility."
* commit 'c894c2045f589571c80af0648e7a9dcd7e97b6a8':
  C++11 compatibility.
2014-11-20 23:00:48 +00:00
Dan Albert 3bdc5b8268 C++11 compatibility.
* Explicit conversion for atomic_uintptr_t initialization.
 * Fix string literal concatenation to not be a UD literal.
 * Use __typeof__ instead of typeof (should become decltype once this
   actually moves to C++11).

Bug: 18466763
Change-Id: I4eedddfb945a2a703ed27317cb6e2b3041b1ebfc
2014-11-20 21:04:35 +00:00
Dan Stoza e8e23c8b79 am 686c5be4: am 6b9454d1: SurfaceFlinger: Do less work when using PTS
* commit '686c5be4722dce02ae8e5580d6677f1eeea22464':
  SurfaceFlinger: Do less work when using PTS
2014-11-18 20:18:27 +00:00
Dan Stoza 686c5be472 am 6b9454d1: SurfaceFlinger: Do less work when using PTS
* commit '6b9454d1fee0347711af1746642aa7820b1ea04d':
  SurfaceFlinger: Do less work when using PTS
2014-11-18 02:07:36 +00:00
Chih-hung Hsieh ebcc45df77 am accddd9c: am 947a6adf: Merge "Remove comparisons that can\'t be true"
* commit 'accddd9ca0bef572674b895b9b2b0553b133c793':
  Remove comparisons that can't be true
2014-11-18 00:27:52 +00:00
Chih-hung Hsieh accddd9ca0 am 947a6adf: Merge "Remove comparisons that can\'t be true"
* commit '947a6adf97d9ba86e3ef5704d523b4971246ff1e':
  Remove comparisons that can't be true
2014-11-18 00:23:08 +00:00
Dan Stoza 6b9454d1fe SurfaceFlinger: Do less work when using PTS
Currently, SurfaceFlinger is very dumb about how it handles buffer
updates at less than 60fps. If there is a new frame pending, but its
timestamp says not to present it until later SurfaceFlinger will wake
up every vsync until it is time to present it. Even worse, if
SurfaceFlinger has woken up but nothing has changed, it still goes
through the entire composition process.

This change (mostly) fixes that inefficiency. SurfaceFlinger will
still wake up every refresh period while there is a new frame
pending, but if there is no work to do, it will almost immediately go
back to sleep.

Bug: 18111837
Change-Id: I7825bacd37f40bf26edcc6a5e0f051dce45291fb
2014-11-17 21:32:13 +00:00
Bernhard Rosenkränzer 6183eb72ec Remove comparisons that can't be true
keyBitmask and ledBitmask are arrays, "!their address" always evaluates to
false. clang complains about this.

Change-Id: I6aed45a203b0eeaad2093dbdebea03a2c2fc1a3d
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 21:09:14 +01:00
Marco Nelissen e12cfc23b2 am 55f71bc0: Merge "Replace IInterface::asBinder() with a static"
* commit '55f71bc0800b9ec7a779c5d30d5a90e074c2526b':
  Replace IInterface::asBinder() with a static
2014-11-17 18:52:56 +00:00
Marco Nelissen 097ca275f4 Replace IInterface::asBinder() with a static
so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 08:47:01 -08:00
Dan Albert 06235085c6 am 36ec7a8b: am d72ff140: Merge "Move frameworks/native to libc++."
* commit '36ec7a8b99e287d923bfacd2ef69661818aeb85e':
  Move frameworks/native to libc++.
2014-11-16 17:35:37 +00:00
Dan Albert 36ec7a8b99 am d72ff140: Merge "Move frameworks/native to libc++."
* commit 'd72ff140e0df44106cd8539396ce686aa8f3306a':
  Move frameworks/native to libc++.
2014-11-16 17:31:57 +00:00
Dan Albert 6d72063cfd Move frameworks/native to libc++.
I'm pretty sure I had done this before... Must have been new
dependencies that slipped in when L merged in.

Bug: 15193147
Change-Id: Ib9b1b8a65665d25c33c6141b9476a8e13c4084e0
2014-11-15 18:22:55 -08:00
Marco Nelissen 2ea926bda2 Replace IInterface::asBinder() with a static
so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-14 14:01:29 -08:00
Andreas Gampe a20acf6d50 am d09cf8f1: am 9c17fb19: Merge "Frameworks/native: Wall Werror in batteryservice & powermanager"
* commit 'd09cf8f10f78ef3db2ab4824dc8374360dc7a860':
  Frameworks/native: Wall Werror in batteryservice & powermanager
2014-11-14 19:15:35 +00:00
Dan Albert 41a0ef3e28 resolved conflicts for merge of 4037c458 to master
Change-Id: I8a2e73b7ba48b790054e0ab99f81b2693244389e
2014-11-14 11:13:20 -08:00
Andreas Gampe d09cf8f10f am 9c17fb19: Merge "Frameworks/native: Wall Werror in batteryservice & powermanager"
* commit '9c17fb191253e9bdc9fc73ba9ff2d590892e5061':
  Frameworks/native: Wall Werror in batteryservice & powermanager
2014-11-13 23:19:37 +00:00
Andreas Gampe 4037c458a7 resolved conflicts for merge of 07dffa18 to lmp-mr1-dev-plus-aosp
Change-Id: I42d8bc291f4f48f3098754b076889159c4b20e41
2014-11-13 15:16:53 -08:00
Andreas Gampe 9c17fb1912 Merge "Frameworks/native: Wall Werror in batteryservice & powermanager" 2014-11-13 22:55:42 +00:00
Andreas Gampe 347f2884db Frameworks/native: Wall Werror in batteryservice & powermanager
Turn on -Wall -Werror in services/batteryservice and services/powermanager.
Fix warnings.

Change-Id: I1da667083013379cd8240377c48d63fa5c53033d
2014-11-13 14:31:11 -08:00
Andreas Gampe 89fd4f7fa6 Frameworks/native: Wall Werror in surfaceflinger
Turn on -Wall -Werror in services/surfaceflinger. Fix warnings.

Change-Id: Ifef830300d9d4bc657d8f1257c02bfe8c2b4d9c5
2014-11-13 14:18:56 -08:00
Dan Stoza d26b17a137 Merge "Enable clang for libui/libgui/surfaceflinger" 2014-11-12 20:14:29 +00:00
Craig Mautner d2af156688 am 66af95fa: am 83cbc5a7: Merge "Stop consuming input on error dialogs." into lmp-mr1-dev
* commit '66af95fa175baa8c0c9b9b2caa5141f66d635928':
  Stop consuming input on error dialogs.
2014-11-12 16:36:48 +00:00
Craig Mautner 66af95fa17 am 83cbc5a7: Merge "Stop consuming input on error dialogs." into lmp-mr1-dev
* commit '83cbc5a7588793435fd986e220fe1f9b88342069':
  Stop consuming input on error dialogs.
2014-11-12 03:51:04 +00:00
Dan Stoza f10c46ef85 Enable clang for libui/libgui/surfaceflinger
Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
2014-11-11 14:28:22 -08:00
Craig Mautner 0c17a2b2ea Stop consuming input on error dialogs.
This code is no longer necessary and was preventing input from
reaching their desired windows. See bug 17648830.

Change-Id: Ib1c026ece70e6fa98343340b89af4199d6d0ffca
2014-11-11 14:05:03 -08:00
Aravind Akella e75a9a26ee am 686edee8: am a2614354: Merge "Add a timeout for releasing SensorService wake_lock." into lmp-mr1-dev
* commit '686edee8e9894363caf8f01b370a6d3c9bc13e91':
  Add a timeout for releasing SensorService wake_lock.
2014-11-07 22:08:47 +00:00
Aravind Akella 686edee8e9 am a2614354: Merge "Add a timeout for releasing SensorService wake_lock." into lmp-mr1-dev
* commit 'a26143546e4665cc3b07d6527b63a2e4bb04fb9f':
  Add a timeout for releasing SensorService wake_lock.
2014-11-07 22:01:03 +00:00
Aravind Akella a26143546e Merge "Add a timeout for releasing SensorService wake_lock." into lmp-mr1-dev 2014-11-07 21:47:49 +00:00
Dan Stoza 6b7a45859e am 8e624d4c: am 98d20f82: Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev
* commit '8e624d4cad45532c09879356f3adaa3b65fdcfc9':
  Add a BufferItem parameter to onFrameAvailable
2014-11-07 20:09:39 +00:00
Dan Stoza 8e624d4cad am 98d20f82: Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev
* commit '98d20f82ca8979b30c81df9639f54ab11e1951f9':
  Add a BufferItem parameter to onFrameAvailable
2014-11-07 20:03:42 +00:00
Dan Stoza 98d20f82ca Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev 2014-11-07 19:44:31 +00:00
Dan Stoza 8dc55396fc Add a BufferItem parameter to onFrameAvailable
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents. Also
adds an onFrameReplaced callback, which is necessary if the consumer
wants to do anything more than simple queue length tracking.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
2014-11-07 10:39:13 -08:00
Naseer Ahmed 1b89fe0b81 am ff520bb9: am 7aa0c47e: sf: Add a NULL check in getDisplayConfigs
* commit 'ff520bb93812f9892da526ace81efce9b0872503':
  sf: Add a NULL check in getDisplayConfigs
2014-11-04 01:18:08 +00:00
Naseer Ahmed ff520bb938 am 7aa0c47e: sf: Add a NULL check in getDisplayConfigs
* commit '7aa0c47e4205c6fca136c38f272d911c25c8a8fa':
  sf: Add a NULL check in getDisplayConfigs
2014-11-03 22:31:50 +00:00
Naseer Ahmed 7aa0c47e42 sf: Add a NULL check in getDisplayConfigs
Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: I1a12f43b7c375b9c01998dadd5b658275c733fb2
Acked-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2014-11-03 12:16:18 -08:00
Aravind Akella b4373ac9f5 Add a timeout for releasing SensorService wake_lock.
If SensorService is holding a wake_lock and there are no acknowledgements
 from ANY app within 5 seconds, release the wake_lock and reset the wake_lock
 refcounts for all connections.

Bug: 16874240
Change-Id: I5e950dd393c20173c439cbd5a4ba614ee09d61f4
2014-11-01 18:19:25 -07:00
Jesse Hall b43a1c9be2 am affc4d80: Merge "surfaceflinger: fix -Wunused-parameter warning" into lmp-mr1-dev
* commit 'affc4d809edbcb3b0e49e5ccc9821b9695a57d44':
  surfaceflinger: fix -Wunused-parameter warning
2014-10-31 22:57:44 +00:00
Jesse Hall 18b846dda7 am c7636f60: Merge "surfaceflinger: fix -Wsign-compare warnings" into lmp-mr1-dev
* commit 'c7636f606270a4b79d745ec1acf049daedfa0e2f':
  surfaceflinger: fix -Wsign-compare warnings
2014-10-31 22:57:43 +00:00
Jesse Hall 9fc06c5e21 am 6e74e3cc: Merge "surfaceflinger: fix -Woverloaded-virtual warning" into lmp-mr1-dev
* commit '6e74e3ccd972fe90d9998f6b683e25dca38f470d':
  surfaceflinger: fix -Woverloaded-virtual warning
2014-10-31 22:57:42 +00:00
Jesse Hall 7cd85979e8 surfaceflinger: fix -Wunused-parameter warning
warning: unused parameter 'mustRecompose' [-Wunused-parameter]

Change-Id: I6b8c671189639d851bfa5548742de988d6fa2687
(cherry picked from d2e514f717)
2014-10-31 09:52:42 -07:00
Jesse Hall 7844211607 surfaceflinger: fix -Wsign-compare warnings
warning: comparison of integers of different signs: 'int' and 'size_t'
(aka 'unsigned int') [-Wsign-compare]

arning: comparison of integers of different signs: 'int32_t' (aka
'int') and 'const uint32_t' (aka 'const unsigned int')
[-Wsign-compare]

Change-Id: I823257aa7218c5fd492a3277853210db539bb2e2
(cherry picked from f9bfdc6c94)
2014-10-31 09:52:23 -07:00
Jesse Hall 9b901805ed surfaceflinger: fix -Woverloaded-virtual warning
warning: 'android::LayerDim::isOpaque' hides overloaded virtual function
[-Woverloaded-virtual]

Change-Id: Ie27a6c943f485bc89ce11e424a4e7d99805d4dd0
(cherry picked from commit 382574d116)
2014-10-31 09:52:08 -07:00
Jesse Hall 1495ceb885 surfaceflinger: fix -Wmismatched-tags warnings
warning: struct 'HWComposer' was previously declared as a class
[-Wmismatched-tags]

warning: class 'DisplayInfo' was previously declared as a struct
[-Wmismatched-tags]

Change-Id: I13db9f8aab3a957ce8ff8d64598dae1807d6fe7e
(cherry picked from commit 646f541050)
2014-10-31 09:51:10 -07:00
Dan Stoza 30d382613e am d7702163: am 1f3efb11: Don\'t run large virtual displays through HWC
* commit 'd77021637e28e66be3fcc097b16869df69717df9':
  Don't run large virtual displays through HWC
2014-10-30 21:06:46 +00:00
Dan Stoza d77021637e am 1f3efb11: Don\'t run large virtual displays through HWC
* commit '1f3efb11ff8c884a254f4272f0d1ee0b77ceff2f':
  Don't run large virtual displays through HWC
2014-10-30 20:58:42 +00:00
Dan Stoza 1f3efb11ff Don't run large virtual displays through HWC
This change watches for a MAX_VIRTUAL_DISPLAY_DIMENSION value, which
will be set (if necessary) in BoardConfig.mk. If the value is set,
any virtual displays that have a width or a height greater than that
dimension will bypass the hardware composer HAL and be handled only
by SurfaceFlinger.

Bug: 17701816
Change-Id: Ia6ca44dfd6a7a9bc0f054493d3f13006bc32fa14
2014-10-28 16:01:47 -07:00
Riley Andrews b9b24e503f am 0b91d7e2: am 131866e1: Merge "Add glFlush in surfaceflinger screenshot code." into lmp-mr1-dev
* commit '0b91d7e27718fc530bcad78a7ff2a51b90142059':
  Add glFlush in surfaceflinger screenshot code.
2014-10-24 18:43:37 +00:00
Riley Andrews 0b91d7e277 am 131866e1: Merge "Add glFlush in surfaceflinger screenshot code." into lmp-mr1-dev
* commit '131866e1a4cb3c592f923e95a8c1a66291e2057a':
  Add glFlush in surfaceflinger screenshot code.
2014-10-24 18:39:16 +00:00
Riley Andrews 131866e1a4 Merge "Add glFlush in surfaceflinger screenshot code." into lmp-mr1-dev 2014-10-24 18:30:07 +00:00
Riley Andrews 9707f4df64 Add glFlush in surfaceflinger screenshot code.
After creating a syncKHR object with type EGL_SYNC_NATIVE_FENCE_ANDROID,
glFlush must be called before the EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute
is populated with a sync fd. We currently call eglDupNativeFenceFDANDROID
before issuing the flush.

Bug 18052459
Taken verbatim from matthew.k.gumbel@intel.com.

Change-Id: I3781d14f92862076e2bca7d27341a6dc6e7e3775
2014-10-23 16:25:17 -07:00
Jesse Hall 2d970420c5 am 11f2e08a: am 8ad8c0a7: am afe2b1fa: surfaceflinger: don\'t close fence fds after passing to queueBuffer
* commit '11f2e08a66f2463cbfd9cbef5c34da7ddfe2613a':
  surfaceflinger: don't close fence fds after passing to queueBuffer
2014-10-22 22:40:43 +00:00
Jesse Hall 11f2e08a66 am 8ad8c0a7: am afe2b1fa: surfaceflinger: don\'t close fence fds after passing to queueBuffer
* commit '8ad8c0a775a1d4592479731973238b82480f76b2':
  surfaceflinger: don't close fence fds after passing to queueBuffer
2014-10-22 21:27:11 +00:00
Jesse Hall 8ad8c0a775 am afe2b1fa: surfaceflinger: don\'t close fence fds after passing to queueBuffer
* commit 'afe2b1fadd29149ceed639357e44e06e97c3a5ca':
  surfaceflinger: don't close fence fds after passing to queueBuffer
2014-10-22 20:45:35 +00:00
Jesse Hall afe2b1fadd surfaceflinger: don't close fence fds after passing to queueBuffer
ANativeWindow::queueBuffer takes ownership of the fence fd passed to
it, and will close it before returning. SurfaceFlinger's screenshot
code was also closing the syncFd it passed to queueBuffer. Most of the
time this meant the second close() silently failed, but in a rare race
condition the file descriptor could be reused between the two
close()s.

Bug: 17946343
Change-Id: Ib74fcb1dce52cc21328059c99b7c4c76f41aa3a5
2014-10-21 11:11:53 -07:00
Dmitriy Ivanov 68b769974d am 8b81ce56: am cb8a9fcc: Merge "Switch to libsigchain.a"
* commit '8b81ce563f03500064e0f4c87288b8eeb3bed496':
  Switch to libsigchain.a
2014-10-21 03:54:05 +00:00
Dmitriy Ivanov 8b81ce563f am cb8a9fcc: Merge "Switch to libsigchain.a"
* commit 'cb8a9fcc56288378d05d80c55396db7981e3828d':
  Switch to libsigchain.a
2014-10-21 03:30:55 +00:00
Dmitriy Ivanov 5cf92d4a85 am cb8a9fcc: Merge "Switch to libsigchain.a"
* commit 'cb8a9fcc56288378d05d80c55396db7981e3828d':
  Switch to libsigchain.a
2014-10-21 03:30:18 +00:00
Dmitriy Ivanov 4340a14fbf Switch to libsigchain.a
Use LOCAL_WHOLE_STATIC_LIBRARIES to instruct static linker
  to export symbols from the static library.

Change-Id: I0e41cf173be96c52cdad72b1ef4a1bf819e65dd2
2014-10-20 14:17:26 -07:00
Dmitriy Ivanov 042e5078f7 Merge "Link sigchain to surfaceflinger main executable" into lmp-mr1-dev 2014-10-20 17:14:44 +00:00
Aravind Akella f88c64809a am f65fba5c: am 899891ec: am 0b6acb22: Add version number to SensorService dump output.
* commit 'f65fba5cc9b88decc16660068edf878222ebb146':
  Add version number to SensorService dump output.
2014-10-19 21:28:34 +00:00
Aravind Akella f65fba5cc9 am 899891ec: am 0b6acb22: Add version number to SensorService dump output.
* commit '899891ec95c0581d35f47db7bdea75bd49fdca1b':
  Add version number to SensorService dump output.
2014-10-19 21:23:55 +00:00
Aravind Akella 899891ec95 am 0b6acb22: Add version number to SensorService dump output.
* commit '0b6acb2231baed861488f2d181621272d0658d25':
  Add version number to SensorService dump output.
2014-10-19 21:14:54 +00:00
Aravind Akella 433fe2af0d am 0b6acb22: Add version number to SensorService dump output.
* commit '0b6acb2231baed861488f2d181621272d0658d25':
  Add version number to SensorService dump output.
2014-10-19 21:05:16 +00:00
Aravind Akella 0b6acb2231 Add version number to SensorService dump output.
Change-Id: I64f9482ade523ec3fafe14bff14db7196e32413f
2014-10-19 20:30:58 +00:00
Narayan Kamath 6e6d754ecc am 39efe3e5: Clean up unused parameter warnings.
* commit '39efe3e5bf6282a4851e0eb3b938060c8f7790ae':
  Clean up unused parameter warnings.
2014-10-17 11:22:05 +00:00
Narayan Kamath 39efe3e5bf Clean up unused parameter warnings.
Manual application of change 692018430f115343e36b0680acc659f2a731a5d7.

Change-Id: I100f838d70e591a13abb198dc420000ef114a429
(cherry picked from commit 97a3367a1b)
2014-10-17 10:12:58 +00:00
Narayan Kamath 97a3367a1b Clean up unused parameter warnings.
Manual application of change 692018430f115343e36b0680acc659f2a731a5d7.

Change-Id: I100f838d70e591a13abb198dc420000ef114a429
2014-10-17 10:37:08 +01:00
Dmitriy Ivanov 2b1f2dac93 Link sigchain to surfaceflinger main executable
And export necessary symbols to preempt calls from libart.so

Bug: 15345057
Bug: 15426766

(cherry picked from commit f3da24d8cf)

Change-Id: I03b632e0bf2cbaf4a0e68cd0af4e991f7f6b08e4
2014-10-16 11:43:19 -07:00
Dan Albert fad2e3abf0 am 27b780b5: am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '27b780b517eb18582f978da64febb31ecfa8e4bf':
  Don't check if this == NULL.
2014-10-15 22:57:13 +00:00
Dan Albert 27b780b517 am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '9cc849500df0bba42d3ed19b90c38ff1dffd2262':
  Don't check if this == NULL.
2014-10-15 22:52:51 +00:00
Dan Albert 759115cd6d am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '9cc849500df0bba42d3ed19b90c38ff1dffd2262':
  Don't check if this == NULL.
2014-10-15 22:52:43 +00:00
Dan Albert 9cc849500d Merge "Don't check if this == NULL." 2014-10-15 22:45:07 +00:00
Dmitriy Ivanov 86636a988f am 88e5118f: am 26a28149: Merge "Link sigchain to surfaceflinger main executable"
* commit '88e5118f07f38c96d5b438a44c42b0951c65ba0d':
  Link sigchain to surfaceflinger main executable
2014-10-14 19:05:26 +00:00
Dmitriy Ivanov 9b9d1a4ee5 am 26a28149: Merge "Link sigchain to surfaceflinger main executable"
* commit '26a2814963de75f14dfbe7cf3d45e993727891cf':
  Link sigchain to surfaceflinger main executable
2014-10-14 18:21:44 +00:00
Dmitriy Ivanov 88e5118f07 am 26a28149: Merge "Link sigchain to surfaceflinger main executable"
* commit '26a2814963de75f14dfbe7cf3d45e993727891cf':
  Link sigchain to surfaceflinger main executable
2014-10-14 18:21:24 +00:00
Jeff Brown 27d0e598fd am 465c8f13: am 2e5f8eaa: am ffb49774: Improve ANR diagnostics.
* commit '465c8f1387b231133fb29bdeb0eb685c30e8da00':
  Improve ANR diagnostics.
2014-10-12 16:12:42 +00:00
Jeff Brown 465c8f1387 am 2e5f8eaa: am ffb49774: Improve ANR diagnostics.
* commit '2e5f8eaa7dbb43e5a46eda7a3d1d895f7584a122':
  Improve ANR diagnostics.
2014-10-12 16:10:21 +00:00
Jeff Brown 2e5f8eaa7d am ffb49774: Improve ANR diagnostics.
* commit 'ffb497743831ae4857b674629b58ea3c46d01431':
  Improve ANR diagnostics.
2014-10-12 16:02:22 +00:00
Jeff Brown 1222c8944a am ffb49774: Improve ANR diagnostics.
* commit 'ffb497743831ae4857b674629b58ea3c46d01431':
  Improve ANR diagnostics.
2014-10-12 16:01:36 +00:00
Jeff Brown ffb4977438 Improve ANR diagnostics.
Print more details about the exact reason that an ANR has occurred.
Also start checking that the window actually has a registered
input connection that is not in a broken state.  These windows
are supposed to be cleaned up by the window manager promptly
as if the app had crashed but the pattern of ANRs we are observing
suggests that broken windows might be sticking around longer than
they should.

Bug: 17721767
Change-Id: Ie2803a3fa9642381ecadc198fec15e1b70d93c20
2014-10-10 19:09:39 -07:00
Dmitriy Ivanov f3da24d8cf Link sigchain to surfaceflinger main executable
And export necessary symbols to preempt calls from libart.so

Bug: 15345057
Bug: 15426766
Change-Id: If0b7f59a59824e30aa0c33dad76c7a44932180de
2014-10-09 15:20:25 -07:00
Aravind Akella 011f187373 am e19c39dc: am 5acc751f: am 7830ef3d: Change ordering of memory allocation and calling Thread::run().
* commit 'e19c39dccd0cdbbcbe27dd90f224b2012b7dfb74':
  Change ordering of memory allocation and calling Thread::run().
2014-10-08 13:14:37 +00:00
Aravind Akella e19c39dccd am 5acc751f: am 7830ef3d: Change ordering of memory allocation and calling Thread::run().
* commit '5acc751ffea2fab38f7fcc4e06866640e70174e4':
  Change ordering of memory allocation and calling Thread::run().
2014-10-08 07:51:58 +00:00
Aravind Akella 5acc751ffe am 7830ef3d: Change ordering of memory allocation and calling Thread::run().
* commit '7830ef3dd0ff3749d974c2dd85a8fa59dc47aeca':
  Change ordering of memory allocation and calling Thread::run().
2014-10-08 05:24:50 +00:00
Aravind Akella a046f506a5 am 7830ef3d: Change ordering of memory allocation and calling Thread::run().
* commit '7830ef3dd0ff3749d974c2dd85a8fa59dc47aeca':
  Change ordering of memory allocation and calling Thread::run().
2014-10-08 00:03:48 +00:00
Aravind Akella 7830ef3dd0 Change ordering of memory allocation and calling Thread::run().
In some cases this is causing a crash as device.poll is called with
NULL.

Bug: 17896339
Change-Id: Id431599f2c661338c355c7081b6602f8449a9198
2014-10-07 21:20:12 +00:00
Aravind Akella 5b8d3eed87 am ae29ee0a: am 93176114: am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit 'ae29ee0a9eea291316248a90799ff28f35defeb6':
  Fix sockfd leakage in SensorService.
2014-10-03 23:57:35 +00:00
Aravind Akella ae29ee0a9e am 93176114: am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit '93176114cf34c9874c2db70fd7665e9f95dda9d0':
  Fix sockfd leakage in SensorService.
2014-10-03 22:39:19 +00:00
Aravind Akella 93176114cf am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit 'a7eb4b74f74423dafd88adf94a7984ae927c3a23':
  Fix sockfd leakage in SensorService.
2014-10-03 21:54:29 +00:00
Aravind Akella 021543fc65 am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit 'a7eb4b74f74423dafd88adf94a7984ae927c3a23':
  Fix sockfd leakage in SensorService.
2014-10-03 21:50:52 +00:00
Aravind Akella a7eb4b74f7 Merge "Fix sockfd leakage in SensorService." into lmp-dev 2014-10-03 21:45:37 +00:00
Michael Lentine 50160cedf6 am fb992b77: am 6c925ede: Fixed discrepancy between crop and frame transparencies.
* commit 'fb992b7753d73f4f18ef7aa1c8e3df5c09e6efbd':
  Fixed discrepancy between crop and frame transparencies.
2014-10-03 21:10:48 +00:00
Michael Lentine fb992b7753 am 6c925ede: Fixed discrepancy between crop and frame transparencies.
* commit '6c925ede620f4080227bb1fe8a41e4b4502348f8':
  Fixed discrepancy between crop and frame transparencies.
2014-10-03 21:03:11 +00:00
Michael Lentine 6c925ede62 Fixed discrepancy between crop and frame transparencies.
Bug: 17662777
Change-Id: I0d65d9b912a37a60e4c1d2e2e198f7709460917c
2014-10-03 19:02:30 +00:00
Riley Andrews 8dcdf7961b am 6747be9f: Generate the SurfaceFlinger shader cache on initialization
* commit '6747be9fab9981ec24729cede5e0fe779e8b8914':
  Generate the SurfaceFlinger shader cache on initialization
2014-10-03 17:26:52 +00:00
Riley Andrews 6747be9fab Generate the SurfaceFlinger shader cache on initialization
Blobcache is not yet enabled for surfaceflinger (as it should be).
As a temporary workaround, generate all needed shaders during
surfaceflinger initialization instead of doing the compilation
on-demand during ui transitions.

Change-Id: I14455b20a3f85f177d85c9c8b76d8ccc35379b39
2014-10-03 17:21:15 +00:00
Aravind Akella 8a96955c8e Fix sockfd leakage in SensorService.
i) Call removeFd() only if the fd in the BitTube has been
previously added to the Looper. Use a flag to determine whether the fd
has been previously added or not.
ii) Increment mPendingFlushEventsToSend after holding a connectionLock.
iii) Store the number of acks that are pending in SensorEventQueue
 and send them all at once.

Bug: 17472228
Change-Id: I1ec834fea1112a9cfbd9cddd2198438793698502
2014-10-02 18:59:56 -07:00
Riley Andrews da6064c485 am 36a4d171: am 6c833986: Merge "Generate the SurfaceFlinger shader cache on initialization" into lmp-mr1-dev
* commit '36a4d17104f8a8d4523071d829ac43c8507ced64':
  Generate the SurfaceFlinger shader cache on initialization
2014-10-02 23:46:40 +00:00
Riley Andrews 36a4d17104 am 6c833986: Merge "Generate the SurfaceFlinger shader cache on initialization" into lmp-mr1-dev
* commit '6c8339867438c27e468a03995b98481e9e49b274':
  Generate the SurfaceFlinger shader cache on initialization
2014-10-02 20:26:21 +00:00
Michael Lentine e950f3f2b7 am 6bddbeae: am db57cfbd: Merge "When eglMakeCurrent fails we need to fix the egl state." into lmp-dev
* commit '6bddbeaeb05aff19a8d69fda806c2b03b2c47c6c':
  When eglMakeCurrent fails we need to fix the egl state.
2014-10-02 12:53:50 +00:00
Jesse Hall 18507fe470 am c868c78b: am 5bf786d8: surfaceflinger: recompute visibility after sideband stream change
* commit 'c868c78b516d5fd3f5d36dc916baab6c98800d8f':
  surfaceflinger: recompute visibility after sideband stream change
2014-10-02 12:53:49 +00:00
Michael Lentine 6bddbeaeb0 am db57cfbd: Merge "When eglMakeCurrent fails we need to fix the egl state." into lmp-dev
* commit 'db57cfbd6f9d5795846ef237fd297cb81e429679':
  When eglMakeCurrent fails we need to fix the egl state.
2014-10-02 12:41:27 +00:00
Jesse Hall c868c78b51 am 5bf786d8: surfaceflinger: recompute visibility after sideband stream change
* commit '5bf786d8f00ff8eee64ebf330dac55e33a0f97b1':
  surfaceflinger: recompute visibility after sideband stream change
2014-10-02 12:40:05 +00:00
Aravind Akella 62500f37a5 am ca5eacb5: am deb71b28: Merge "Fix a possible SensorService deadlock." into lmp-dev
* commit 'ca5eacb530fbb5e32564589cd29545df5805e339':
  Fix a possible SensorService deadlock.
2014-10-02 02:00:11 +00:00
Jesse Hall 13ba2b0274 am 17290d48: am bacc28ef: surfaceflinger: Use landscape resolution for default dpi
* commit '17290d483b986a9838aeeb85386c14681d0d5c44':
  surfaceflinger: Use landscape resolution for default dpi
2014-10-02 02:00:10 +00:00
Riley Andrews a51fafc4d8 Generate the SurfaceFlinger shader cache on initialization
Blobcache is not yet enabled for surfaceflinger (as it should be).
As a temporary workaround, generate all needed shaders during
surfaceflinger initialization instead of doing the compilation
on-demand during ui transitions.

Change-Id: I14455b20a3f85f177d85c9c8b76d8ccc35379b39
2014-10-02 01:30:28 +00:00
Aravind Akella ca5eacb530 am deb71b28: Merge "Fix a possible SensorService deadlock." into lmp-dev
* commit 'deb71b2812702318900c36b7bcfa9759525ea7cc':
  Fix a possible SensorService deadlock.
2014-10-02 00:57:48 +00:00
Jesse Hall 17290d483b am bacc28ef: surfaceflinger: Use landscape resolution for default dpi
* commit 'bacc28ef1df329f4dc21bae44b09a6c5018af908':
  surfaceflinger: Use landscape resolution for default dpi
2014-10-02 00:57:47 +00:00
Michael Lentine 20daf003aa am db57cfbd: Merge "When eglMakeCurrent fails we need to fix the egl state." into lmp-dev
* commit 'db57cfbd6f9d5795846ef237fd297cb81e429679':
  When eglMakeCurrent fails we need to fix the egl state.
2014-10-01 22:50:32 +00:00
Michael Lentine db57cfbd6f Merge "When eglMakeCurrent fails we need to fix the egl state." into lmp-dev 2014-10-01 22:44:46 +00:00
Jesse Hall e245cdcc00 am 5bf786d8: surfaceflinger: recompute visibility after sideband stream change
* commit '5bf786d8f00ff8eee64ebf330dac55e33a0f97b1':
  surfaceflinger: recompute visibility after sideband stream change
2014-10-01 22:38:18 +00:00
Michael Lentine 3f121fc650 When eglMakeCurrent fails we need to fix the egl state.
Bug: 16676660

Change-Id: Ie7bee9c78378b9e9206060444319e6ee35e1ab74
2014-10-01 14:50:58 -07:00
Jesse Hall 5bf786d8f0 surfaceflinger: recompute visibility after sideband stream change
We normally recompute layer visibility when a layer gets its first
buffer; before then it's treated as invisible. Sideband layers never
get a buffer (as far as SurfaceFlinger knows), so never became
visible. Now we also recompute visibility when a layer gets a new
sideband stream.

Bug: 17752511
Change-Id: I84e150f196eb2eb7bcd2616248e5e3fa73624809
2014-10-01 09:00:34 -07:00
Aravind Akella f7ebef9890 am b17044ad: am 71e351d9: Merge "Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections."" into lmp-dev
* commit 'b17044adcf951b66ce2ecb7f7835572d7448bd64':
  Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper  when the connection is removed from mActiveConnections."
2014-09-29 19:45:08 +00:00
Aravind Akella 112a7457ae am deb71b28: Merge "Fix a possible SensorService deadlock." into lmp-dev
* commit 'deb71b2812702318900c36b7bcfa9759525ea7cc':
  Fix a possible SensorService deadlock.
2014-09-29 00:56:17 +00:00
Jesse Hall 2a8ae4ef70 am bacc28ef: surfaceflinger: Use landscape resolution for default dpi
* commit 'bacc28ef1df329f4dc21bae44b09a6c5018af908':
  surfaceflinger: Use landscape resolution for default dpi
2014-09-29 00:56:04 +00:00
Aravind Akella deb71b2812 Merge "Fix a possible SensorService deadlock." into lmp-dev 2014-09-29 00:49:26 +00:00
Jesse Hall bacc28ef1d surfaceflinger: Use landscape resolution for default dpi
When HWC doesn't provide DPI values for a display, we pick a default
DPI based on resolution. The intent was that 1080p and higher displays
would get XHIGH density, and lower resolutions would get TV density.
In KK (and possibly forever) we had a bug that we'd always use TV
density. That was fixed in L, but that fix exposed a pre-existing bug
that we always used the display's height in its native orientation,
rather than in landscape orientation. So an 800x1280 tablet like N7v1
started getting XHIGH density instead of the intended TV density.

Bug: 17461633
Change-Id: Ia57fa49e61f36bdda63ce283ef62c9953297222c
2014-09-28 22:26:28 +00:00
Aravind Akella e148bc29c2 Fix a possible SensorService deadlock.
If the destructor of SensorEventConnection gets called when the main
 sendEvents loop of SensorService is executing it may result in a deadlock.
 The loop promotes each connection to a strong_pointer, calls sendEvents
 and cleans up the connection if necessary. It is possible that the sp's
 destructor may delete SensorEventConnection which will call the dtor
 ~SensorEventConnection(). This dtor again needs SensorService mLock to
 execute which may result in a deadlock.

Bug: 17617897
Change-Id: I76c244dbe85fadb591c0bd1a9a5eb01d93f56505
2014-09-28 21:26:49 +00:00
Aravind Akella b17044adcf am 71e351d9: Merge "Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections."" into lmp-dev
* commit '71e351d96b551ccdbc39b52a0c66da86cae83701':
  Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper  when the connection is removed from mActiveConnections."
2014-09-27 06:17:21 +00:00
Aravind Akella bea1db57de am 71e351d9: Merge "Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections."" into lmp-dev
* commit '71e351d96b551ccdbc39b52a0c66da86cae83701':
  Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper  when the connection is removed from mActiveConnections."
2014-09-27 02:46:32 +00:00
Aravind Akella 71e351d96b Merge "Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections."" into lmp-dev 2014-09-27 02:09:30 +00:00
Aravind Akella 678f4fce90 Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections."
This reverts commit 5105960d49.

Change-Id: I4d39ded2e50ef8a8e0aac27e438876203385a1f0
2014-09-27 02:06:32 +00:00
Michael Wright 9bd5bcc958 am 2344006b: am 4b20d402: Merge "Only mark repeated keys as PASS_TO_USER if the original key was." into lmp-dev
* commit '2344006b6e43ffd081f55228d150f26d932f15fe':
  Only mark repeated keys as PASS_TO_USER if the original key was.
2014-09-26 15:28:58 +00:00
Jesse Hall a5e4b70352 am 53e6b95d: am 728a8da1: Merge "surfaceflinger: Check sideband stream changed to trigger sideband Layer update." into lmp-dev
* commit '53e6b95d05da4e3c4e0fcd9a0d1ed7d56a6814a1':
  surfaceflinger: Check sideband stream changed to trigger sideband Layer update.
2014-09-26 15:28:57 +00:00
Michael Wright 2344006b6e am 4b20d402: Merge "Only mark repeated keys as PASS_TO_USER if the original key was." into lmp-dev
* commit '4b20d40218a25adcad21cc135a3103b4e04940f3':
  Only mark repeated keys as PASS_TO_USER if the original key was.
2014-09-26 05:10:08 +00:00
Jesse Hall 53e6b95d05 am 728a8da1: Merge "surfaceflinger: Check sideband stream changed to trigger sideband Layer update." into lmp-dev
* commit '728a8da14638e718ede11a7a894705524fc9d171':
  surfaceflinger: Check sideband stream changed to trigger sideband Layer update.
2014-09-26 05:10:07 +00:00
Michael Wright cfbc36544e am 4b20d402: Merge "Only mark repeated keys as PASS_TO_USER if the original key was." into lmp-dev
* commit '4b20d40218a25adcad21cc135a3103b4e04940f3':
  Only mark repeated keys as PASS_TO_USER if the original key was.
2014-09-26 01:47:01 +00:00
Jesse Hall 1b5c8839f7 am 728a8da1: Merge "surfaceflinger: Check sideband stream changed to trigger sideband Layer update." into lmp-dev
* commit '728a8da14638e718ede11a7a894705524fc9d171':
  surfaceflinger: Check sideband stream changed to trigger sideband Layer update.
2014-09-26 01:47:00 +00:00
Michael Wright 4b20d40218 Merge "Only mark repeated keys as PASS_TO_USER if the original key was." into lmp-dev 2014-09-26 01:38:57 +00:00
Michael Wright 2e732956ad Only mark repeated keys as PASS_TO_USER if the original key was.
Bug: 17629695
Change-Id: Ic569aba4149c6cc321c2cf8aede7c5e8a1196234
2014-09-25 13:20:20 -07:00
Jesse Hall 728a8da146 Merge "surfaceflinger: Check sideband stream changed to trigger sideband Layer update." into lmp-dev 2014-09-24 22:07:01 +00:00
Aravind Akella c4c63f21dd am 8f12365b: am 5105960d: Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
* commit '8f12365b768a05e7e28094e3e90ff01afca284ba':
  Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
2014-09-24 17:18:20 +00:00
Aravind Akella 8f12365b76 am 5105960d: Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
* commit '5105960d49bfa86efeeea8f87c87aa96b5771c37':
  Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
2014-09-24 04:24:07 +00:00
Aravind Akella 8b4869dc83 am 5105960d: Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
* commit '5105960d49bfa86efeeea8f87c87aa96b5771c37':
  Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
2014-09-24 03:48:09 +00:00
chenhg 0ea1cb9195 surfaceflinger: Check sideband stream changed to trigger sideband Layer update.
BUG: 17382907
Change-Id: I65fd037bd25238ae68a3976468ae7fd7ce49c562
2014-09-23 17:26:00 -07:00
Aravind Akella 5105960d49 Fix sockfd leakage in SensorService. Remove sockfd from Looper
when the connection is removed from mActiveConnections.

Bug: 17472228
Change-Id: Iaabe0968bd2104ef961ff5e8659bf91712e2e1db
2014-09-23 23:46:22 +00:00
Lajos Molnar 147372fdf9 resolved conflicts for merge of 67d8bd66 to lmp-mr1-dev-plus-aosp
Change-Id: I5e7e6fdf0d2afe6c3e4a0ed6ef96afb4713a72bc
2014-09-19 06:23:46 -07:00
Lajos Molnar 435d9cde27 resolved conflicts for merge of 67d8bd66 to lmp-dev-plus-aosp
Change-Id: I2e9aab90ac53bb32630598f50cc26f6e46acf6d6
2014-09-18 20:09:39 -07:00
Lajos Molnar e7bda06398 resolved conflicts for merge of 67d8bd66 to lmp-dev-plus-aosp
Change-Id: Idbe39c6de8fe31ac57a9238c18b4c20d66dc73ad
2014-09-18 20:05:27 -07:00
Lajos Molnar 67d8bd66aa surfaceflinger: add getDisplayStats() method
This is used by media service to schedule video frames at the
proper time, based on precise vsync timings.

Bug: 14659809
Change-Id: I1a90603f3dc09dca9aa4f90a3aa845fab56e0a5e
2014-09-18 17:03:20 -07:00
Dan Albert 1474f8864f Don't check if this == NULL.
Entering a method with this == NULL is undefined behavior. Clang whines
about this.

Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
2014-09-16 17:52:06 -07:00
Aravind Akella 11b4fd5602 am e225f6fd: Merge "SensorService fixes." into lmp-dev
* commit 'e225f6fd4a3f17c2705f1d69b176db475a3cc821':
  SensorService fixes.
2014-09-16 21:05:01 +00:00
Aravind Akella 7f2737807f am c8a1b367: am e225f6fd: Merge "SensorService fixes." into lmp-dev
* commit 'c8a1b36745e2094e5fdc7915739caca396c2d9de':
  SensorService fixes.
2014-09-16 09:11:14 +00:00
Aravind Akella c8a1b36745 am e225f6fd: Merge "SensorService fixes." into lmp-dev
* commit 'e225f6fd4a3f17c2705f1d69b176db475a3cc821':
  SensorService fixes.
2014-09-16 08:57:56 +00:00
Aravind Akella 0ec2066e47 SensorService fixes.
i) Initialize sensor_event.flags to zero or wake_up flag before sending dropped flush_complete_events. This will avoid unnecessary acks. 
Currently it is not set to anything which may result in garbage values for flags field.
   ii) Change the dump format of SensorEventConnection.
   iii) Add const to method signatures wherever applicable.

Bug id: https://b2.corp.google.com/issues/17498626

Change-Id: Ia736ffb01c366540aab73cdcf596ce852c052593
2014-09-15 20:32:21 +00:00
Dan Albert 94ba882df2 am 4355c0c9: am e1e3d278: Merge "Clean cruft out of makefiles."
* commit '4355c0c98644c37f0511257403bbfb71b342e2df':
  Clean cruft out of makefiles.
2014-09-12 19:28:17 +00:00
Aravind Akella f627c969e1 am 3d0daa57: am 8493b79e: SensorService fixes
* commit '3d0daa57f5f180418fdecbf06f6a5a41e566f6d9':
  SensorService fixes
2014-09-12 19:20:58 +00:00
Dan Albert 4355c0c986 am e1e3d278: Merge "Clean cruft out of makefiles."
* commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2':
  Clean cruft out of makefiles.
2014-09-12 16:22:03 +00:00
Aravind Akella 3d0daa57f5 am 8493b79e: SensorService fixes
* commit '8493b79e1cff92450076ca7450c4bf4e434a6816':
  SensorService fixes
2014-09-12 05:36:58 +00:00
Dan Albert b79dfe6721 Clean cruft out of makefiles.
Cleans up manual uses of stlport and bionic (and removes uses of private
bionic headers).

Change-Id: I157309d702e59152adfa3450939082248ae4c043
2014-09-11 18:49:47 -07:00
Dan Albert 7d587c31d5 Merge "Silence warnings about unused parameters." 2014-09-11 02:32:24 +00:00
Aravind Akella 8493b79e1c SensorService fixes
i) Significant Motion multiple clients fix. Make a copy of
  mActiveConnections vector before cleaning up SensorEventConnections
  when one-shot sensors trigger.
  ii) Maintain a mapping between flush_complete_events and
  SensorEventConnections to accurately map flush() API calls and
  corresponding flush_complete_events
  iii) Remove all references to 1_1 and 1_2 HALs.
  iv) Dynamically allocate sensor_event buffers in SensorService main
  threadLoop.

Bug: 17412359
Change-Id: If3c3986197660cafef2d2e0b4dc7582e229cf1c4
2014-09-10 18:24:18 -07:00
Dan Albert 5746f14978 am fb017a4c: Merge "Fix clang warnings about struct vs. class."
* commit 'fb017a4c3b23741f737093c3fcb78087bbe5e73c':
  Fix clang warnings about struct vs. class.
2014-09-10 01:43:11 +00:00
Dan Albert 9e0e103b65 Silence warnings about unused parameters.
Change-Id: I503aafbdeaec3f53241872dc52af9f8b73a1416c
2014-09-09 16:53:59 -07:00
Dan Albert aeb8ab8c34 Fix clang warnings about struct vs. class.
Change-Id: I9f26cd01ac3153efa6d77a4133686842e2d63203
2014-09-09 15:22:48 -07:00
Riley Andrews 25d10ce9ec am 129dc842: am edb86f9f: Merge "Add rotation to surfaceflingers screen cap." into lmp-dev
* commit '129dc8423da319d42af6ef71046c39ba59c0d878':
  Add rotation to surfaceflingers screen cap.
2014-09-09 22:16:38 +00:00
Riley Andrews c3ebe66b49 Add rotation to surfaceflingers screen cap.
+ This is needed so that activity manager does not
  have to do cpu side rotations when capturing recents
  thumbnails.

Change-Id: If998008e675ad01305db8399fd643cf4608b7025
2014-09-09 03:51:16 +00:00
Glenn Kasten 4c51a97849 am 91b6028e: am d44fea68: Merge "Make IPowerManager native conform to .aidl for oneway" into lmp-dev
* commit '91b6028e07bc9494afc69ae4f83c3ee49de7d209':
  Make IPowerManager native conform to .aidl for oneway
2014-09-08 17:04:24 +00:00
Jesse Hall e786ecab50 Merge "surfaceflinger: fix -Wunused-parameter warning" 2014-09-06 20:14:47 +00:00
Jesse Hall 12aa86a4f1 Merge "surfaceflinger: fix -Wsign-compare warnings" 2014-09-06 20:14:41 +00:00
Jesse Hall 141f0569c3 Merge "surfaceflinger: fix -Woverloaded-virtual warning" 2014-09-06 20:14:35 +00:00
Jesse Hall c41cddb897 Merge "surfaceflinger: fix -Wmismatched-tags warnings" 2014-09-06 20:14:27 +00:00
Glenn Kasten a602086872 Make IPowerManager native conform to .aidl for oneway
But provide a temporary escape hatch for AudioFlinger.
This oneway option will be removed as soon as possible.

Bug: 16408906
Change-Id: I20d6da1969ae05b96e72795463470eb4c1f8fbdc
2014-09-05 17:12:24 -07:00
Aravind Akella ab1ce82009 am 71ec4a81: am 253c4720: Merge "SensorService flush fixes." into lmp-dev
* commit '71ec4a8179a3f24de04e9a6ac824d896f1835170':
  SensorService flush fixes.
2014-09-05 21:33:33 +00:00
Aravind Akella 253c4720af Merge "SensorService flush fixes." into lmp-dev 2014-09-05 19:53:36 +00:00
Eric Laurent 1e73a2def7 am 2c1eae25: am 437353a0: Merge "IPowerManager: make all binder call one way" into lmp-dev
* commit '2c1eae259c90d5cfcb7715655f3afd59b7bea9ac':
  IPowerManager: make all binder call one way
2014-09-05 18:04:49 +00:00
Eric Laurent 437353a0ef Merge "IPowerManager: make all binder call one way" into lmp-dev 2014-09-05 17:30:05 +00:00
Jesse Hall d2e514f717 surfaceflinger: fix -Wunused-parameter warning
warning: unused parameter 'mustRecompose' [-Wunused-parameter]

Change-Id: I6b8c671189639d851bfa5548742de988d6fa2687
2014-09-05 09:25:01 -07:00
Jesse Hall f9bfdc6c94 surfaceflinger: fix -Wsign-compare warnings
warning: comparison of integers of different signs: 'int' and 'size_t'
(aka 'unsigned int') [-Wsign-compare]

arning: comparison of integers of different signs: 'int32_t' (aka
'int') and 'const uint32_t' (aka 'const unsigned int')
[-Wsign-compare]

Change-Id: I823257aa7218c5fd492a3277853210db539bb2e2
2014-09-05 09:25:01 -07:00
Eric Laurent f20c329a8a IPowerManager: make all binder call one way
make all binder call to power manager service one way so that
they don't block calling thread and are processed in the
incoming order.

Bug: 16408906.
Change-Id: I94034df7f0a36d967e085b53fdc37fff7b44757b
2014-09-05 09:14:19 -07:00
Michael Wright 22371776ff am 41943dd0: am 9e24c319: Merge "Fix type for temp variable" into lmp-dev
* commit '41943dd027740873180bea8d30b65d71f0077654':
  Fix type for temp variable
2014-09-04 22:23:17 +00:00
Jesse Hall 382574d116 surfaceflinger: fix -Woverloaded-virtual warning
warning: 'android::LayerDim::isOpaque' hides overloaded virtual function
[-Woverloaded-virtual]

Change-Id: Ie27a6c943f485bc89ce11e424a4e7d99805d4dd0
2014-09-04 10:07:28 -07:00
Jesse Hall 646f541050 surfaceflinger: fix -Wmismatched-tags warnings
warning: struct 'HWComposer' was previously declared as a class
[-Wmismatched-tags]

warning: class 'DisplayInfo' was previously declared as a struct
[-Wmismatched-tags]

Change-Id: I13db9f8aab3a957ce8ff8d64598dae1807d6fe7e
2014-09-04 10:07:28 -07:00
Aravind Akella 9e3adfcebf SensorService flush fixes.
i) Fix a possible race condition when adding a pending flush connection
 to mActiveSensors data structure.
 ii) Invalidate flush_complete_events as soon as they are consumed by a
 connection so that they are not used by other connections which are
 registered for the same sensor.

Change-Id: I1491bea8c2081c4aab1feacc60add13b7aa26bb7
2014-09-03 18:24:05 -07:00
Michael Wright 53047e593d am 883fccb5: am bcbf97ef: Add logging for switch state
* commit '883fccb5f89c005502af27a18322f9fa302ac1b3':
  Add logging for switch state
2014-09-02 07:09:26 +00:00
Michael Wright 3da3b8436c Fix type for temp variable
Change-Id: I8e2d229da326e5182692f94660336169fb249da7
2014-08-29 16:16:26 -07:00
Michael Wright bcbf97ef8f Add logging for switch state
Bug: 17004602
Change-Id: I15c9feb7b28274183742936c20e34e7fb07e0b70
2014-08-29 14:31:32 -07:00
Jesse Hall 5c14317f68 am d1a65da9: am 4d407a0f: surfaceflinger: Trace HW vsync enable
* commit 'd1a65da9e841db9514eac0900a27c1f9a93dd424':
  surfaceflinger: Trace HW vsync enable
2014-08-26 14:55:56 +00:00
Jesse Hall 4d407a0f05 surfaceflinger: Trace HW vsync enable
This makes it possible to tell whether two HW vsync signals are too
far apart because one was late, or because we turned HW vsync off
briefly between them.

Bug: 17259382
Change-Id: If4fba2a8a6013568349949ce87c5c36f0468d2a2
2014-08-25 16:05:01 -07:00
Aravind Akella 9782334b37 am 47b29a76: am 5466c3d2: SensorService fixes
* commit '47b29a76cf42856fac7b70e7d901d300231c51d2':
  SensorService fixes
2014-08-25 08:23:00 +00:00
Aravind Akella 5466c3d20d SensorService fixes
1) Limit maxEventsToWrite depending on the size of the socket
     buffer allocated (Fix for write failure on manta).
     2) Do not call flush() if the sensor is not activated (OEM issue).

Change-Id: I81ea78dbdef3a3773af505ca1c9a5e39492c0b48
2014-08-22 17:09:23 -07:00
Michael Lentine d6ae4a4844 am e2461245: am eb21986d: Merge "Update currentConfig variable when active display is changed." into lmp-dev
* commit 'e246124516add4f2ed14b21ae38dc76c3439a884':
  Update currentConfig variable when active display is changed.
2014-08-22 17:06:42 +00:00
Michael Lentine eb21986df0 Merge "Update currentConfig variable when active display is changed." into lmp-dev 2014-08-22 16:34:14 +00:00
Aravind Akella 533325d5ca am 5bee4fc9: am e74baf6c: SensorService fixes.
* commit '5bee4fc913f215e67503ba6d4e0b6d7e0ba1cc71':
  SensorService fixes.
2014-08-22 00:13:15 +00:00
Michael Lentine d3e6914cea Update currentConfig variable when active display is changed.
Bug: 17182607
Change-Id: I8631c105a9e0fa402a7d9670717becc9857af935
2014-08-21 14:43:13 -07:00
Aravind Akella e74baf6ca7 SensorService fixes.
i) Add more debug stats (acks needed, acks received)
  ii) Comment out write failure message.

Change-Id: Iac892a66530849a2dd023d6f5628cd070a79537d
2014-08-21 12:28:35 -07:00
Naseer Ahmed 62914ce664 am 3e70928f: am 949ea086: sf: Clear display configs when hot pluggable display is disconnected
* commit '3e70928f6e3cd46eb82c02c1cc5fccfd0378bb75':
  sf: Clear display configs when hot pluggable display is disconnected
2014-08-21 04:14:37 +00:00
Jesse Hall 42e9434e95 am 11cec5a0: am d4548dd0: am 514e30a9: am c3d1889e: Merge "surfaceflinger: skip composition for empty frames" into klp-modular-dev
* commit '11cec5a0ef2bc2934928ea476c7c7fad1414a8b2':
  surfaceflinger: skip composition for empty frames
2014-08-21 00:57:00 +00:00
Michael Lentine 64144c6562 am d435b56a: am 4d7c4100: Merge "Destroy eglSurface before recreating." into lmp-dev
* commit 'd435b56ab842f0787c1322d71bb8ed2f5e11b3bc':
  Destroy eglSurface before recreating.
2014-08-21 00:57:00 +00:00
Naseer Ahmed 949ea0868d sf: Clear display configs when hot pluggable display is disconnected
Display configs for external displays are stored in the framework
everytime we receive a hot plug to connect. However, since the
configs are not cleared on disconnect, framework will just assume
that the configs are valid. This does not work for use cases when
you connect/disconnect external displays with different resolutions.

e.g. 1080p to 4K and vice-versa

With this change we clear the display configs and repopulate when
we receive a hot plug to connect.

Change-Id: I2eeab186a8d8668a53390a2413b2ce5e044a1845
Acked-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2014-08-20 15:10:14 -07:00
Jesse Hall d4548dd027 am 514e30a9: am c3d1889e: Merge "surfaceflinger: skip composition for empty frames" into klp-modular-dev
* commit '514e30a96cefad109509ce01622fa7f82f3f318c':
  surfaceflinger: skip composition for empty frames
2014-08-20 20:02:02 +00:00
Jesse Hall 514e30a96c am c3d1889e: Merge "surfaceflinger: skip composition for empty frames" into klp-modular-dev
* commit 'c3d1889e508038efe240ed1974ed377a2e12835c':
  surfaceflinger: skip composition for empty frames
2014-08-20 19:52:40 +00:00
Michael Lentine 62d623c6bd am d0c20394: am 2cfbef25: Merge "Fix inverse orientation when original is not applied first." into lmp-dev
* commit 'd0c20394d26cb6d1662db6b8f489500c62f8c002':
  Fix inverse orientation when original is not applied first.
2014-08-20 15:56:31 +00:00
Michael Lentine 4d7c41008d Merge "Destroy eglSurface before recreating." into lmp-dev 2014-08-19 22:53:25 +00:00
Michael Lentine f2568dea41 Destroy eglSurface before recreating.
Bug: 16856208

Change-Id: Ifb5c8997afab4bc922356a3542d1f899a2546855
2014-08-20 10:56:34 -07:00
Michael Lentine 7b90258c7b Fix inverse orientation when original is not applied first.
Change-Id: I6f1a11950c77c99800acbf08a672bc1b2310b0b5
2014-08-19 18:16:01 -07:00
Michael Lentine 1440963470 Fix camera orientation by swapping horizontal and vertical flips when needed.
Bug: 16637957

Change-Id: I66de597546fdc19e0af9e6150ca20460ab36bf8b
2014-08-19 16:16:35 -07:00
Michael Lentine 2cfbef255b Merge "Fix inverse orientation when original is not applied first." into lmp-dev 2014-08-19 22:53:25 +00:00
Jesse Hall b7a0549c98 surfaceflinger: skip composition for empty frames
By not committing the results of composition for empty frames, we
avoid spitting out series of black frames for virtual displays that
don't have visible layers. We still draw one black frame when going
from having layers to not having any. In particular, this avoids
having a series of empty frames due to re-compositing the primary
display in the period between creating the virtual display and adding
layers to it.

Bug: 16786752
Change-Id: I7e9b2ed2e407d8d49c7af736b447d4c6181b0ad8
2014-08-19 22:15:43 -07:00
Michael Lentine 62205596b9 Merge "Fix camera orientation by swapping horizontal and vertical flips when needed." into lmp-dev 2014-08-19 02:43:23 +00:00
Michael Lentine b3abe7c06a Merge "Incorporate TransformToDisplayInverse into the crop calculation." into lmp-dev 2014-08-19 15:47:37 +00:00
Michael Lentine f755140794 Incorporate TransformToDisplayInverse into the crop calculation.
Change-Id: Ia9757b3a43d3b8f99df9fef2ed4d11c43b5abdd2
2014-08-18 16:35:43 -07:00
Aravind Akella a54f3b2f4a Merge "SensorService fixes." into lmp-dev 2014-08-18 21:31:41 +00:00
Riley Andrews 866399093f Take advantage of sync points during screen cap.
Do not wait for the screen capture to complete within surface flinger,
instead pass a sync point back with the captured gralloc buffer.

Change-Id: I7137c0e0fc710688d1d61f189159418fb27ea263
2014-08-19 19:27:14 +00:00
Aravind Akella 6c2664ae34 SensorService fixes.
1) Flush should only be received by the app calling flush(). Maintain
      a queue of all flush() calls and send flush_complete events in that
      order.
   2) Log warnings for older HALs. Remove batch() calls with DRY_RUN flag.
   3) Reallocate event cache when more sensors register and the desired
      maxCacheSize increases. Clear NEEDS_ACK flag in the buffer whenever
      there is a write() failure.
   4) More dump information. Add wake-up flag, maxDelay and timestamps for
      sensor events.

Bug: 16874778
Change-Id: I195646191059fd31f75f2f07886c0f98bf9b509a
2014-08-19 11:18:25 -07:00
Michael Lentine dcfa424548 am 1438f6da: am 62205596: Merge "Fix camera orientation by swapping horizontal and vertical flips when needed." into lmp-dev
* commit '1438f6da7ef3b35e1a20f7824f3fe3e5f9196c16':
  Fix camera orientation by swapping horizontal and vertical flips when needed.
2014-08-19 23:57:58 +00:00
Michael Lentine 5fdbe4fc93 am 1b20b8e6: am b3abe7c0: Merge "Incorporate TransformToDisplayInverse into the crop calculation." into lmp-dev
* commit '1b20b8e694a8019fd8da1c25323734c15ae9171b':
  Incorporate TransformToDisplayInverse into the crop calculation.
2014-08-19 21:19:17 +00:00
Aravind Akella 2fb04ee318 am d553ce40: am a54f3b2f: Merge "SensorService fixes." into lmp-dev
* commit 'd553ce4092feefd625e4a4cd073a3d18d4b983c9':
  SensorService fixes.
2014-08-19 20:42:43 +00:00
Riley Andrews eed0479f68 am 66a99219: am 86639909: Take advantage of sync points during screen cap.
* commit '66a9921997e88bc9e89a337fe512a554293e8309':
  Take advantage of sync points during screen cap.
2014-08-19 20:10:18 +00:00
Michael Wright 62fbb16383 Shelve InputFlinger for another release. DO NOT MERGE
Change-Id: I0f034a2b8b1d9192f61f5001799bd3aa4b3964c7
2014-08-18 10:17:18 -07:00
Michael Lentine 25db8dc7c6 Merge "Change output format to not throw warning on volantis." into lmp-dev 2014-08-06 23:49:20 +00:00
Michael Lentine b54ee7704e Change output format to not throw warning on volantis.
Change-Id: Id66eb61bdb1ceccfb7aefa0aa70793dac807c257
2014-08-07 14:54:23 -07:00
Michael Lentine 5af281f4ab Fix HWComposer Surface Crop when surface is rotated
Bug: 15091149

Change-Id: I97ecd8af9636da9403fafdb3f9b846f95053ebb7
2014-08-07 13:44:14 -07:00
Michael Lentine 5a35059600 Merge "Fix HWComposer Surface Crop when surface is rotated" into lmp-dev 2014-08-07 15:00:45 +00:00
Michael Wright 78f2444aaf Revert "Revert "Add system accelerators for BACK and HOME.""
This reverts commit d671f98a27.

Change-Id: Ibec48f81653bd2f755fc59a241fa7836baf53233
2014-08-06 16:59:54 -07:00
Michael Wright d671f98a27 Revert "Add system accelerators for BACK and HOME."
This reverts commit 278b525d25.
2014-08-06 15:50:43 -07:00
Michael Wright 278b525d25 Add system accelerators for BACK and HOME.
Meta+Backspace -> BACK
Meta+Enter -> HOME

Bug: 14066931
Change-Id: Iff1d027300fa9911626785944a6d8efe4f62235e
2014-08-06 19:01:19 +00:00
Eric Penner a02e9484be Merge "SurfaceFlinger: Prevent deadlock by updating an atomic layer set." into lmp-dev 2014-07-29 21:36:00 +00:00
Eric Penner 51c59cd1e7 SurfaceFlinger: Prevent deadlock by updating an atomic layer set.
Bug: 12934849

Change-Id: I9dede7316f1e967de4140bd731ac810115ea302f
2014-07-30 19:05:38 -07:00
Michael Lentine 9ae79d869a Build fix for size_t on 64bit.
Change-Id: Ic16895b30d78ba8a635b709adbae31a590501b20
2014-07-30 16:42:12 -07:00
Michael Lentine 258ee43fbc Build fix for printf with int64 and size_t
Change-Id: I642584cce7dd43e6d491a49228b0bce047d53354
2014-07-30 16:24:48 -07:00
Michael Lentine fd9d183cd8 Build fix to use the correct source.
Change-Id: If36710be600dd0e15c31682e0343f281baa55627
2014-07-30 15:39:17 -07:00
Michael Lentine 7306c670eb Add error for format and make sure setActiveConfig fails with an invalid mode.
Change-Id: Iacdb5cbad125787f96c64c88d432fc541c4cad1a
2014-07-30 14:36:25 -07:00
Michael Lentine 47e45405d1 Allow for resizing of Virtual Displays.
Modify SurfaceFlinger to use VirtualDisplaySurface in all cases when a virtual
display is used. Add functionality in VirtualDisplaySurface to resize the
buffers aquired in the QueueBufferOutput. Add transaction support in
SurfaceFlinger for resize. Add the modification of the size in DisplayDevice.

Change-Id: Iae7e3556dc06fd18d470adbbd76f7255f6e6dd6b
Tested: None
2014-07-30 14:36:25 -07:00
Michael Wright 1f6078aef7 Have VirtualDisplays send SF resize messages when resizing
Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f
2014-07-30 11:23:44 -07:00
Michael Lentine 6c9e34a98a Modified SurfaceFlinger to implment setActiveConfig and getActiveConfig.
This can be used to change the current display mode of the device.

Change-Id: Icdc3fb58389b861dc77b68102083da6f7a96eccb
Tested: None
(cherry picked from commit 2651fa9463)
2014-07-29 16:56:30 +00:00
Riley Andrews 03414a1cfe Turn on support for async cursor update in surfaceflinger.
If available, surfaceflinger will use the hwc setCursorPositionAsync()
api to change the position of supported cursor layers outside of
the usual prepare/set loop.

Change-Id: Ib3fc5c0c390b3489ddbba202379840a1d2748917
2014-07-28 22:07:41 +00:00
Aravind Akella 56ae42613c SensorService performance improvements.
i) Send ack for wake_up sensors on the socket connection instead of using Binder RPC.
  ii) Cache events per connection in case there are write failures. Compute cache size
      from FIFO counts of sensors.
 iii) Send FlushCompleteEvent only for apps that explicitly called flush().

Change-Id: I018969736b7794b1b930529586f2294a03ee8667
2014-07-24 17:23:01 -07:00
Sean Wan 7869e224aa CW on L: Fix a SIGSEGV crash in sensor service.
This is to fix b/16189080.

BUG: 16189080
Change-Id: I78d44e82f797c0808891acde609040c46745a0bb
2014-07-15 11:10:44 -07:00
Ruben Brunk 2ad9d8a6e7 Merge "Add sticky transform to surfaceflinger." into lmp-dev 2014-07-14 18:37:51 +00:00
Ruben Brunk 1681d95989 Add sticky transform to surfaceflinger.
Bug: 15116722

- Adds a sticky transform field that can be set from a
  SurfaceFlinger client Surface.  This transform is
  added to any transform applied to the Surface.

Change-Id: Idaa4311dfd027b2d2b8ea5e2c6cba2da5779d753
2014-07-14 22:14:32 +00:00
Jesse Hall b154c42c39 Improve memory coherence management in screenshot code [DO NOT MERGE]
The existing code worked in practice, but wasn't quite correct in
theory and relied on implementation details of other code. It's still
somewhat unusual and subtle, but now is correct-in-theory (I believe)
and a little better documented.

Bug: 16044767
Change-Id: I22b01d6640f0b7beca7cbfc74981795a3218b064
(cherry picked from commit c61576794e)
2014-07-14 19:29:09 +00:00
Jesse Hall 24cd98eef8 Compile libsurfaceflinger with Clang and -std=c++11 [DO NOT MERGE]
This is necessary to use C11/C++11 stdlib atomics, which the next
change will do. This change also fixes a couple bits of syntax that
both GCC and Clang refuse to compile in -std=c++11 mode.

Change-Id: Ia14d9d6b537a3bb106c23e19a277e48be180754c
2014-07-14 12:18:00 -07:00
Jesse Hall e9b23b6588 surfaceflinger: Make all sources depend on Android.mk
This forces all SurfaceFlinger sources to be recompiled when the
Makefile changes; that's overkill sometimes but makes sure everything
gets recompiled when compile options (or similar) changes.

Change-Id: I2b3c3090fc1c35078e13c77fbb1a78d447c39158
2014-07-14 15:32:59 -07:00
Sreeram Ramachandran 224bcea7b4 Remove unnecessary code and APIs.
This stuff has been replaced by setNetworkForUser() in NetdClient.

Change-Id: If525ee259b74314191d1913f7c2a3e828e05c38f
2014-07-11 17:43:51 -07:00
Dan Stoza dc56bf721a Merge "BufferQueue: Add allocateBuffers method" 2014-06-27 15:56:14 +00:00
Dan Stoza e49ba8e2ed GLConsumer: Stop using default constructor params
Removes the dependency on default constructor parameters for
GLConsumer so that a different constructor prototype can safely be
added.

Change-Id: I0da924bbd4c141edbf305598c1be8bc575654680
2014-06-24 13:09:19 -07:00
Dan Stoza 29a3e90879 BufferQueue: Add allocateBuffers method
This adds an allocateBuffers method to BufferQueue, which instructs
it to allocate up to the maximum number of buffers allowed by the
current configuration. The goal is that this method can be called
ahead of render time, which will prevent dequeueBuffers from blocking
in allocation and inducing jank.

This interface is also plumbed up to the native Surface (and, in
another change, up to the Java Surface and ThreadedRenderer).

Bug: 11792166
Change-Id: I4aa96b4351ea1c95ed5db228ca3ef98303229c74
2014-06-20 13:13:57 -07:00
Dan Albert 677d87ec50 Use openssl's SHA1 instead of bionic's.
Bionic is removing its SHA1.

Change-Id: I7d15986ebac9e0f0eb7ff93457780bd90a4f1d4f
2014-06-20 11:34:29 -07:00
Ruchi Kandoi cd13f9da99 Merge "SurfaceFlinger: send VSYNC power hints to IPowerManager" 2014-06-20 02:15:46 +00:00
Ruchi Kandoi ef472ec40a SurfaceFlinger: send VSYNC power hints to IPowerManager
VSYNC power hints are now sent via binder to IPowerManager.
SurfaceFlinger no longer loads a second copy of the PowerHAL.
VSYNC power hints are sent in batches and not on per frame basis.

Change-Id: Ia5a839ab3c857cffae7089f810b4315d4ed23fcf
2014-06-18 18:51:24 -07:00
Dan Stoza eac96b9bfd Merge "SurfaceFlinger: Fix rect out-of-bounds checks" 2014-06-17 21:43:29 +00:00
Andy McFadden 91b2ca8562 Add two new display info fields
This adds SurfaceFlinger's app VSYNC offset and buffer deadline
values to DisplayInfo.

Bug 14612039

Change-Id: Ie0ab21d388fe2764f2b6f71bd1cefa33dc861a73
2014-06-17 10:41:46 -07:00
Mark Salyzyn 20914f0ad3 am a4e345e1: Merge "sensorservice: 64-bit compile issues"
* commit 'a4e345e169fd9101011e358abdfb9308bc065bdb':
  sensorservice: 64-bit compile issues
2014-06-12 16:09:59 +00:00
Dan Stoza be31f44798 SurfaceFlinger: Fix rect out-of-bounds checks
Rects' right and bottom edges are treated as exclusive, so when
checking against maximum width and height, we should use > instead
of >=.

Change-Id: Ifcdf6813c13fcab1a55f16c21064e765e93d49f0
2014-06-11 11:20:54 -07:00
Wengang Wu 20071e5028 am e3d37a7b: Enable support RGBX_8888 for omap3
* commit 'e3d37a7b55f86f5d005dd67f828dcf51fe60c0f6':
  Enable support RGBX_8888 for omap3
2014-06-11 18:17:19 +00:00
Wengang Wu e3d37a7b55 Enable support RGBX_8888 for omap3
Bug: 14995811
Change-Id: Iaeb5a5ad0e3bcf215613f24f2570ae0d8267c016
2014-06-11 11:13:40 -07:00
Mark Salyzyn db45861ff4 sensorservice: 64-bit compile issues
Change-Id: Ied7b779f39e71d041791729f7355b052b63903c5
2014-06-10 14:50:02 -07:00
Aravind Akella adb65d9add Merge "Surface reportingMode for Sensors." 2014-06-12 03:30:50 +00:00
Aravind Akella 0e025c5af3 Surface reportingMode for Sensors.
Change-Id: Iac8dd3408c90eb7d285a2e8043131fab3a7e58fa
2014-06-12 14:49:41 -07:00
Prashant Malani 7227b96a73 Merge "surfaceflinger: Replace blank/unblank with setPowerMode" 2014-06-12 03:30:50 +00:00
Mark Salyzyn c46422ed2b am 20914f0a: am a4e345e1: Merge "sensorservice: 64-bit compile issues"
* commit '20914f0ad3691d977f61f1d4b92b49535e8f6f33':
  sensorservice: 64-bit compile issues
2014-06-12 16:13:39 +00:00
Mark Salyzyn eeb0f39f76 Merge "inputflinger: 64-bit compile issues" 2014-06-12 05:34:42 +00:00
Wengang Wu 1210f2ab82 am 20071e50: am e3d37a7b: Enable support RGBX_8888 for omap3
* commit '20071e5028adb6d7ced81843d33e4d0baa0768ed':
  Enable support RGBX_8888 for omap3
2014-06-11 21:38:55 +00:00
Andy McFadden 645b1f7ffb Replace "lower power mode" experiment
This replaces the previous low-power mode experiment, which
discarded refresh events, with a new experiment that alters
the refresh period.

(see also I2849e5ea335c0d2509fea1c315392bce7f20451d )

The feature is enabled by specifying a nonzero value for the
"refresh skip count", which indicates the number of periods
to skip.  For example, the command:

  adb shell service call SurfaceFlinger 1016 i32 1

sets a skip count of '1', yielding a 30Hz refresh rate on a device
with a 60Hz display.  Changing the last value to '2' would set the
refresh to 20Hz.  '0' returns to the default behavior.

Bug 15523257

Change-Id: I00039c22a55750e74035644c63800e4bee1c774a
2014-06-11 10:19:08 -07:00
Andy McFadden 5167ec68fe Disable DispSync resync when not needed
If app and SF events aren't using phase offsets, we don't need
to maintain the DispSync model.  We just turn hardware VSYNC on
whenever something wants to draw.  This avoids some edge cases
where we were doing too much resync work.

Also, updated the systrace output.  The "VsyncOn" line was a
combination of SF and app event threads, and would occasionally
be very weird.  Removed VsyncOn, renamed VSYNC to VSYNC-app,
and added VSYNC-sf.

Also, added more details to the --dispsync dumpsys output.

Also, renamed global constants to not look like local variables.

Bug 15516453

Change-Id: I0da10b72f0d9a7b7eb5202d87cc18967f698adbd
2014-06-10 13:12:19 -07:00
Mark Salyzyn 5aa26b2745 inputflinger: 64-bit compile issues
Change-Id: I9861f96a8234d5f57b664baead7a465771b63bd5
2014-06-10 13:11:58 -07:00
Prashant Malani 2c9b11f029 surfaceflinger: Replace blank/unblank with setPowerMode
We replace the blank/unblank calls in surfaceFlinger with a more generic
setPowerMode() routine.

Some displays support different power modes (for example, with reduced
color palettes). Depending on the use case we should be able to toggle
these modes, so as to achieve incremental power savings.

Initially, three power modes will be supported:
- HWC_POWER_MODE_OFF
- HWC_POWER_MODE_DOZE
- HWC_POWER_MODE_NORMAL

HWC_POWER_MODE_OFF will correspond to blanking the display, while
HWC_POWER_MODE_NORMAL will correspond to unblanking. HWC_POWER_MODE_DOZE
will put the display into a low power setting, if it is supported in
hardware.

If such a low power mode is not supported, it should be treated as a
call to set the mode to HWC_POWER_MODE_NORMAL.

As a consequence of adding the mPowerMode field, the mScreenAcquired is
no longer required, and thus references to it are removed and replaced
equivalent references to mPowerMode.

We also add the glue code to connect the services invocation of setting
a power mode and the HAL implementation in HWComposer.

Bug: 13472578
Change-Id: I431595ecf16d2f2c94259272db3dd42f29636204
Signed-off-by: Prashant Malani <pmalani@google.com>
2014-06-05 16:35:52 -07:00
Brian Carlstrom 823bcce3ab am 4ae6a267: am f3e4fda0: Merge "Remove dependencies on runtime_libdvm and libdvm.so in general"
* commit '4ae6a26719feb21b7fa1cc5f307b591858a30f26':
  Remove dependencies on runtime_libdvm and libdvm.so in general
2014-05-29 19:43:02 +00:00
Brian Carlstrom 4ae6a26719 am f3e4fda0: Merge "Remove dependencies on runtime_libdvm and libdvm.so in general"
* commit 'f3e4fda09106cb93bddea35a2cc7dbd4b2c281e9':
  Remove dependencies on runtime_libdvm and libdvm.so in general
2014-05-29 19:39:48 +00:00
Brian Carlstrom 617f974e63 Remove dependencies on runtime_libdvm and libdvm.so in general
Bug: 14298175

(cherry picked from commit aefe55f0fb)

Change-Id: I05b1a7dd1ef30b3366b52b46bfc7b39cfb3be198
2014-05-29 09:39:26 -07:00
Brian Carlstrom 5cd72e457e am aefe55f0: Remove dependencies on runtime_libdvm and libdvm.so in general
* commit 'aefe55f0fb9e69be205497ef4fc3432d2f7a2d8b':
  Remove dependencies on runtime_libdvm and libdvm.so in general
2014-05-29 16:37:18 +00:00
Brian Carlstrom aefe55f0fb Remove dependencies on runtime_libdvm and libdvm.so in general
Bug: 14298175
Change-Id: I74b4a3dabf89c6b53bfe688c45d6e1167880fd95
2014-05-28 21:27:47 -07:00
Dan Stoza 3d5c8a98c1 Merge "SurfaceFlinger: Add sourceCrop to screenshot" 2014-05-28 18:31:40 +00:00
Aravind Akella d9441e4c27 Surface maxDelay and isWakeUpSensor flag in Sensor.java.
Change-Id: Idd1e9045190beeca87b086b272e8cbf0bed05bae
2014-05-23 18:58:01 -07:00
Dan Stoza c18790018b SurfaceFlinger: Add sourceCrop to screenshot
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.

Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
2014-05-23 09:19:03 -07:00
Andy McFadden f0058ca0e5 Add IMPLEMENTATION_DEFINED to dump
The "dumpsys SurfaceFlinger" output shows pixel formats in
human-readable form now.  Add IMPLEMENTATION_DEFINED.

Change-Id: If567e34dad4b940fbfb4d0b70c65f6ab8cd5f5e7
2014-05-20 13:28:50 -07:00
Todd Poynor a186e65368 BatteryProperty: Add property ENERGY_COUNTER and 64-bit integer properties
Also fixup comments to match recent changes in BatteryManager.

Change-Id: I6f40924f9e66d564ad1175f9650e2bfd2ad39a3a
2014-05-16 03:05:11 +00:00
Andy McFadden 39cde06aee am b6601961: Merge "DO NOT MERGE Add "dumpsys SurfaceFlinger --dispsync"" into klp-modular-dev
* commit 'b66019615da8750588f1233a77b9c686b0a248c3':
  DO NOT MERGE Add "dumpsys SurfaceFlinger --dispsync"
2014-05-09 17:57:12 +00:00
Andy McFadden a7f75c0dfb Merge "Add "dumpsys SurfaceFlinger --dispsync"" 2014-05-09 17:49:33 +00:00
Andy McFadden 232f5bc675 DO NOT MERGE Add "dumpsys SurfaceFlinger --dispsync"
Dumps the current DispSync state.

Bug 14651879

(this is a near-cherrypick of Ide4e6dbd58b117bc1a6b97b57d10cd92ec86dc84)

Change-Id: I6e6c8452ede5c2d5098db1b884d28226e77d9a03
2014-05-09 10:49:11 -07:00
Andy McFadden c751e92c56 Add "dumpsys SurfaceFlinger --dispsync"
Dumps the current DispSync state.

Bug 14651879

Change-Id: Ide4e6dbd58b117bc1a6b97b57d10cd92ec86dc84
2014-05-08 16:14:41 -07:00
Andy McFadden d0ed571be0 Merge "Add mutex" 2014-05-08 23:10:31 +00:00
Andy McFadden 150ecd8c1b Add mutex
Change-Id: I81072031e74a5cca8384e4e8bce4babf2187d8bb
2014-05-08 14:56:50 -07:00
Dan Stoza dd02391756 Merge "Enable changing display configuration" 2014-05-06 21:08:16 +00:00
Narayan Kamath 4522f5749d Merge "Change InputMessage.motion.pointerSize to a uint32_t." 2014-05-06 10:00:57 +00:00
Dan Stoza 7f7da32569 Enable changing display configuration
This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.

Bug: 14320401
Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
2014-05-05 16:45:26 -07:00
Andy McFadden 98e1ebc026 Merge "Improve SurfaceFlinger PTS estimation" 2014-05-02 17:59:23 +00:00
Andy McFadden 41d67d7ab4 Improve SurfaceFlinger PTS estimation
Get the next refresh time from DispSync instead of guessing based
on the current time.

Change-Id: I8dc72a3217bfd4e9b4c905034194d1a298cad69a
2014-05-02 10:56:54 -07:00
Narayan Kamath bc6001b026 Change InputMessage.motion.pointerSize to a uint32_t.
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.

Change-Id: I66bb8b8d8664763e7dcbd489686051f563d5e1dc
2014-05-02 17:58:43 +01:00
Jesse Hall 9471c69773 Merge "Handle failed requestBuffer after successful dequeueBuffer" 2014-05-02 16:50:41 +00:00
Ruchi Kandoi f52b3c88f1 SurfaceFlinger: Adds the functionality to reduce refresh rate to half of
the default.

Feature added for the low power mode.

Change-Id: I2849e5ea335c0d2509fea1c315392bce7f20451d
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-05-01 18:29:33 +00:00
Jesse Hall 0b63cd105c Handle failed requestBuffer after successful dequeueBuffer
If the virtual display consumer disconnects after the
VirtualDisplaySurface dequeues a buffer but before it requests it, the
request will fail. Previously the error was ignored, and the caller
would get a success result but a NULL buffer. Now the dequeued buffer
is cancelled and the error propagated to the caller.

Bug: 14140551
Change-Id: I91547885c2cf6063dc7a8f02d97f2df282cdde2c
2014-05-01 10:37:33 -07:00
Conley Owens 2eefe69f9e Merge "Add TYPE_MAGNIFICATION_OVERLAY to isTrustedOverlay" 2014-04-30 00:09:36 +00:00
Michael Wright 32ccf558ce Merge "Move key attribute information out of native." 2014-04-29 22:31:18 +00:00
Bill Yi e4f00b2aae Merge commit '6d05ef2310bdc84811d5b0385b009ad11447a749' into HEAD 2014-04-29 11:34:19 -07:00
Andy McFadden 466954565b Merge "Update HWC dump format" 2014-04-25 14:23:29 +00:00
Aravind Akella 9a844cf78f Enable wakeup sensors.
SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a
timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now.

Bug: 9774884
Change-Id: If3b5acb99c9cf0cd29012fcfa9d6b04c74133d01
2014-04-23 14:38:56 -07:00
Conley Owens 51eb29fa9a Add TYPE_MAGNIFICATION_OVERLAY to isTrustedOverlay
This fixes a bug where a View with filterTouchesWhenObscured will have
all touches filtered when in magnification accessibility mode. This is
due to magnification being a separate Window over top of the running
Activity. The method onFilterTouchEventForSecurity in View will then
always return false when filterTouchesWhenObscured is enabled on the
View. By adding the magnification Window to the list of Trusted Overlays
we can ensure that touches will work properly with this property
enabled.

This corresponds to AOSP change
I07706588a625682d05da5cb19f401139eb08a54c

Change-Id: Iba095433a1f9045349d1b47a58a33b850ed31c97
2014-04-23 13:51:20 -07:00
Dan Stoza bba1385d1c am f3c07d4f: Fix virtual display nesting
* commit 'f3c07d4f70f33c2fe5b14ca8fbcdfa4133cc72c7':
  Fix virtual display nesting
2014-04-23 14:36:20 +00:00
Michael Wright 872db4f11e Move key attribute information out of native.
Native doesn't ever actually care about the attributes of keys, so
move all of it up into the managed layer and move all of the key
names down so they're defined once.

Change-Id: Ic8ded13ce050b2b98744735ff50d11e8d882d7d5
2014-04-22 16:55:36 -07:00
Andy McFadden 4df87bd1f6 Update HWC dump format
Shortens a few fields.  Displays the format as a string.

Change-Id: Ib471f05603763e250bad165db610f8e173e8423a
2014-04-22 16:52:27 -07:00
Dan Stoza f3c07d4f70 Fix virtual display nesting
This fixes the cycling rendering loop caused by nesting virtual
displays by preventing them from recomposing if their contents
haven't changed.

(cherry-pick from master I600365c0fd5d3ad93e04295d26cf9de177ffc79b)

Bug: 12101046
Change-Id: I6182993d53537781aedb522f97a50f06eed8b80f
2014-04-22 16:19:02 -07:00
Dan Stoza fb39827ebc Merge "BufferQueue: Increase max slots from 32 to 64" 2014-04-21 16:11:22 +00:00
Dan Stoza febd4f4f46 BufferQueue: Increase max slots from 32 to 64
Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.

Bug: 13174352
Change-Id: Ie8ef0853916cfb91f83881c7241886bb1950f01a
2014-04-18 11:40:14 -07:00
Dan Stoza d9822a3843 BufferQueueProducer: add detachNextBuffer
Adds a new method, IGBP::detachNextBuffer, that effectively does
dequeue + request + detach in a single call, but does not need to
know anything about the dequeued buffer, and will not block on
dequeue. This is mostly for the upcoming StreamSplitter to use in
its onBufferReleased callback.

Change-Id: Ie88a69de109003acebaa486a5b44c8a455726550
2014-04-15 10:27:25 -07:00
Aravind Akella 93b84e39e6 am ef89f763: am cf818ebb: Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev
* commit 'ef89f7638c43ce5f73e32d487bf65c3375995e3b':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-11 19:40:33 +00:00
Aravind Akella ef89f7638c am cf818ebb: Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev
* commit 'cf818ebbf07c6a20ef48d71bf82f8d4bdf3a398c':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-11 19:34:53 +00:00
Dan Stoza fd34b65f71 Merge "BufferQueue: Add producer buffer-released callback" 2014-04-11 17:57:12 +00:00
Jeff Brown dc5992e48c Plumb display power state through display manager.
Eliminated the bright here and woke here policy flags since they
were unused.  Simplified the input dispatch policy somewhat.

Bug: 13133142
Change-Id: I74b4dc866c44c46ed43006a48a857f0da4c07cc9
2014-04-11 01:27:26 -07:00
Aravind Akella 700180487f Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
This reverts commit 4369a4ebd5.

Change-Id: Ifa8619cc6873470a07a987763d818d78d4232610
2014-04-11 00:06:06 +00:00
Svetoslav cf8684b206 Merge "Adding render stats APIs to UiAutomation (framework native)." 2014-04-10 19:32:44 +00:00
Svetoslav d85084b2b6 Adding render stats APIs to UiAutomation (framework native).
bug:12927198

Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
2014-04-10 12:32:19 -07:00
Wonsik Kim 4cd47b2e0e Merge "Fix sideband stream issues" 2014-04-10 00:35:24 +00:00
Dan Stoza b3d0bdf0db BufferQueue: Remove Bn version of create*
It turns out that there's no reason to have both I* and Bn* versions
of the createBufferQueue method, so I removed the Bn* version.

Change-Id: I66aeb09e10458ae540ddf1f38d2d0154ea8f315b
2014-04-07 17:00:26 -07:00
Wonsik Kim afe3081e0e Fix sideband stream issues
- Notify a listener when sideband stream is set
- Mark a layer as visible when sideband stream is set, even though
no buffer is queued.

Change-Id: I9652bf530f2b5ce331533ec1bb3b10a815ca191c
2014-04-07 15:59:22 +09:00
Etienne Le Grand 75b332037f am 4369a4eb: Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
* commit '4369a4ebd5ae7567e7075bc82830b83178099ed5':
  Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
2014-04-05 09:06:00 +00:00
Etienne Le Grand 30d6fd6b28 Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
This reverts commit c57a019e11.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
(cherry picked from commit 4369a4ebd5)
2014-04-05 06:13:41 +00:00
Etienne Le Grand 4369a4ebd5 Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
This reverts commit c57a019e11.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
2014-04-05 05:02:22 +00:00
Etienne Le Grand 33458f72e1 am 00f4dde1: am c57a019e: Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit '00f4dde1aa88576811bca79bc8242e1fc1edb333':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-05 03:53:51 +00:00
Etienne Le Grand 00f4dde1aa am c57a019e: Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit 'c57a019e117117c5a76c772970b26cd0f5db8c6a':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-05 01:52:28 +00:00
Ruchi Kandoi 4098f03d5c Revert "SurfaceFlinger: send VSYNC power hints to IPowerManager"
This reverts commit d469a1c328.
2014-04-04 18:09:30 -07:00
Etienne Le Grand c57a019e11 Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
2014-04-04 16:31:09 -07:00
Ruchi Kandoi d469a1c328 SurfaceFlinger: send VSYNC power hints to IPowerManager
VSYNC power hints are now sent via binder to IPowerManager.
SurfaceFlinger no longer loads a second copy of the PowerHAL.
VSYNC power hints are sent in batches and not on per frame basis.

Change-Id: Icc2eee5df56135bd24dc244a84e7c12dd5511fec
2014-04-04 20:22:31 +00:00
Dianne Hackborn f74865eb52 Update to follow interface change.
Change-Id: I3ef37a32144e79b481af1b12c89531f3757689ef
2014-04-03 12:06:48 -07:00
Michael Wright 149a45c840 Merge "Misc. buttons aren't gamepad keys." 2014-04-02 23:01:21 +00:00
Michael Wright 0516ed85c8 Misc. buttons aren't gamepad keys.
BUTTON_[1-9] are intended to be misc. buttons so the kernel will
assign them to non-gamepad devices.  As such, we shouldn't treat them
as belonging to gamepads at all.

Bug: 13432364
Change-Id: Ida52ec45dadb53df1a9d36ac3ab212a2d2b56359
2014-04-02 15:59:11 -07:00
Ruchi Kandoi ca13fa7dd4 PowerManager: add powerHint binder method
Change-Id: Ide1d50bb1580698b25296fbfc1cc63c3b21a00bc
2014-04-02 21:24:01 +00:00
Dan Stoza f0eaf25e92 BufferQueue: Add producer buffer-released callback
Add a callback to the producer side, onBufferReleased, which will be
called every time the consumer releases a buffer back to the
BufferQueue. This will enable a buffer stream splitter to work
autonomously without having to block on dequeueBuffer.

The binder object used for the callback replaces the generic IBinder
token that was passed into IGraphicBufferProducer::connect to detect
the death of the producer. If a producer does not wish to listen for
buffer release events, it can pass in an instance of the
DummyProducerListener class defined in IProducerListener.h, if it even
cares about death events (BufferQueue doesn't enforce the token being
non-NULL, though perhaps we should).

Change-Id: I23935760673524abeafea2b58dccc3583b368710
2014-03-31 14:10:07 -07:00
Jesse Hall 8b834ffd9b am 1b751203: am 50ef8562: Merge "GraphicProducerWrapper may return false transact status"
* commit '1b7512036f3ea55cb1f62777ba6e56aad781f11c':
  GraphicProducerWrapper may return false transact status
2014-03-28 09:02:02 +00:00
Jesse Hall 1b7512036f am 50ef8562: Merge "GraphicProducerWrapper may return false transact status"
* commit '50ef8562fe7289495ad8592226f3c4d546119892':
  GraphicProducerWrapper may return false transact status
2014-03-28 08:50:09 +00:00
Narayan Kamath 37764c71a0 Cherry pick parts of f5df700e6ce.
This is logically a part of the merge conflict resolution for
22d07464 to master. These files moved across git repositories.

Change-Id: Id95bfa0bf503295f2c02a201f4bec5243d169ec4
2014-03-27 14:27:42 +00:00
bdeng3X c2633ce19b GraphicProducerWrapper may return false transact status
GraphicProducerWrapper(GPW) changed how the methods of
BpGraphicBufferProducer(BpGBP) are executed.
First, "fake" BpGBP is created. Its remote is GPW. The GPW has
wrapped the real BpGBP.
All the method calls to the fake BpGPB will be intercepted by
the GPW inside it when the methods run into remote()->transact().
Then the GPW will invoke the transact() of the real BpGBP. And
Everything runs well except that the GPW forgets to store the
transact status and always return NO_ERROR to the fake BpGBP.

It would be disastrous if the binder call of the IGBP failed and
the out parameter "reply" of transact() was in unkown state.
E.g. the queueBuffer() in the fake BpGBP will try to operate on
the "reply". This will crash the SurfaceFlinger.

Change-Id: I01b31f64e1fc92804da3f16c1fb1420dcfb3b855
Signed-off-by: bdeng3X <bingx.deng@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
2014-03-27 09:09:19 +08:00
Mark Salyzyn 41d2f80739 inputflinger: 64 bit compile issues
Change-Id: I73c37eb19b28d987ff13632a999e71d6c96cc3e0
2014-03-21 15:34:51 -07:00
Paul Lawrence 0a32461524 batteryservice: Native client read exception returned from getProperty
C++ binder client for IBatteryPropertiesRegistrar interface getProperty method
fails to read the exception code returned by the server.  Add the missing read of the exception code.

Bug: 11985952
Change-Id: I8a9b145160aafbcf9976e6c5ba9fcb883126a5e3
2014-03-21 19:22:37 +00:00
Michael Wright 38dcdff308 Generate ACTION_CANCEL on joystick disconnect.
Bug: 11480300
Change-Id: I46706838eec0711c6bf345301e7b4ccbad83b063
2014-03-20 01:54:00 +00:00
Michael Wright dcfcf5d0ae Add idc config option for handling key repeats
Bug: 13285870
Change-Id: I3c1cd5fb0a02dfb3432c1f04d0eef2d4970857ea
2014-03-20 01:14:06 +00:00
Dan Stoza b9b088375d Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: I9fe15e45daa7351f1db34ee75bfee6f19cb347d3
2014-03-18 10:08:44 -07:00
Wonsik Kim 8bf3b1a496 Merge "Revert "Implement video plane layer"" 2014-03-18 01:00:44 +00:00
Wonsik Kim 29fa9590ad Revert "Implement video plane layer"
This reverts commit f837c93a1b.

Change-Id: I6a1aa9ad0aca023267dc53d19c950b1535123ca7
2014-03-17 11:17:28 +00:00
Mark Salyzyn c45011f272 am cdbf28b3: Merge "native frameworks: 64-bit compile issues"
* commit 'cdbf28b3f7f5327f4cb0eb95b8326bf4c24c87ba':
  native frameworks: 64-bit compile issues
2014-03-13 23:18:43 +00:00
Mark Salyzyn 993146092f am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"
* commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb':
  native frameworks: 64-bit compile issues
2014-03-13 23:12:09 +00:00
Jesse Hall 73ed82f809 Merge "Add sideband streams to BufferQueue and related classes" 2014-03-13 20:28:17 +00:00
Mark Salyzyn d4dabf872a am cdbf28b3: Merge "native frameworks: 64-bit compile issues"
* commit 'cdbf28b3f7f5327f4cb0eb95b8326bf4c24c87ba':
  native frameworks: 64-bit compile issues
2014-03-13 15:26:10 +00:00
Michael Wright 0c28f11e22 Merge "Controllers must have buttons and a movement mechanism." 2014-03-12 21:56:24 +00:00
Mark Salyzyn 92dc3fc52c native frameworks: 64-bit compile issues
- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
2014-03-12 13:12:44 -07:00
Michael Wright 42f2c6a92c Controllers must have buttons and a movement mechanism.
Some devices have joystick axes or DPad keys, but no gamepad buttons (or vice
versa). We shouldn't count these as gamepads since games can't really be
expected to work with this setup in the general case. Instead, require that a
device has a movement mechanism (joystick axes or DPad buttons), as well as at
least one gamepad button before considering it a controller.

Bug: 13432364
Change-Id: I64372e69d29c775094e2b1faa89714da8c29e2be
2014-03-12 12:18:01 -07:00
Dan Stoza 88a459a9b3 VirtualDisplaySurface: no attach/detach support
Change-Id: I630dd6e352940318c33a4e072d2f33a6ec58c556
2014-03-12 09:34:36 -07:00
Dan Stoza c9ed7d3768 Merge "BufferQueue: Allow detaching/reattaching buffers" 2014-03-11 23:47:15 +00:00
Jesse Hall 399184a4cd Add sideband streams to BufferQueue and related classes
Sideband streams are essentially a device-specific buffer queue that
bypasses the BufferQueue system. They can be used for situations with
hard real-time requirements like high-quality TV and video playback
with A/V sync. A handle to the stream is provided by the source HAL,
and attached to a BufferQueue. The sink HAL can read buffers via the
stream handle rather than acquiring individual buffers from the
BufferQueue.

Change-Id: Ib3f262eddfc520f4bbe3d9b91753ed7dd09d3a9b
2014-03-11 12:23:14 -07:00
Greg Hackmann 645427aeac am 112aa42e: Merge "SurfaceFlinger: fix 64-bit format string warnings"
* commit '112aa42e91b4bb0cde334753e2ad05e3f248b377':
  SurfaceFlinger: fix 64-bit format string warnings
2014-03-11 18:51:43 +00:00
Jesse Hall 7bc5aa8905 am c9bf3ba4: Merge "Virtual Display async mode is overridden"
* commit 'c9bf3ba411c66dd1d977c81f1aca08109cbf8c86':
  Virtual Display async mode is overridden
2014-03-11 17:12:15 +00:00
Dan Stoza 9f3053de78 BufferQueue: Allow detaching/reattaching buffers
Adds detachBuffer and attachBuffer calls to both the producer and
consumer sides of BufferQueue. Buffers may be detached while dequeued
by the producer or acquired by the consumer, and when attached, enter
the dequeued and acquired states, respectively.

Bug: 13173343
Change-Id: Ic152692b0a94d99e0135b9bfa62747dab2a54220
2014-03-10 16:45:38 -07:00
Michael Wright f72b35ea02 Merge "Support unique calibration per orientation" 2014-03-10 23:40:41 +00:00
Michael Wright ab7ba13e3a Merge "Add test for InputReader location calibration" 2014-03-10 23:40:27 +00:00
Michael Wright 17bc9abdb5 Merge "Initialize mAffineTransform and update on modification" 2014-03-10 23:40:14 +00:00
Jason Gerecke 71b16e81f9 Support unique calibration per orientation
Updates the format of the calibration XML to store the Surface rotation
that a specific calibration applies to. Also updates the API to require
a rotation value for get/set, and has the native framework supply this
according to the current rotation whenever it changes.

Change-Id: If38563ceba27c9d8a75f9fd7928c8d7c9d187afb
2014-03-10 16:25:49 -07:00
Jason Gerecke 489fda8d47 Add test for InputReader location calibration
This patch adds a test for the new native location calibration
code. The Java interface is not tested.

Change-Id: Id7496486f6b6e2ade12ada607b62d1594af488e8
2014-03-10 16:25:41 -07:00
Michael Wright 9139bd1350 Merge "Introduce mAffineCalibration for location calibration" 2014-03-10 23:02:42 +00:00
Jason Gerecke 12d6baa9b8 Initialize mAffineTransform and update on modification
This patch causes the InputReader to update its mAffineTransform to reflect
the currently-set calibration on startup and whenever its value is changed
through the InputManagerService.

Change-Id: I4719122a28afa9833772040f0433780a84240b9d
2014-03-10 14:23:59 -07:00
Jason Gerecke af126fb538 Introduce mAffineCalibration for location calibration
The variable mAffineCalibration describes the affine transformation
that should be applied to the raw X/Y location in order to get it
into a calibrated state.

Change-Id: I68aa43420ffe7fcaa1ada4acd7390d37e6966a1f
2014-03-10 14:23:57 -07:00
Alan Viverette cd554e36a8 Don't simulate color space after correction
Change-Id: Ied0918ffa2be5f9382e693f442b142b3e068e735
2014-03-10 12:43:49 -07:00
Greg Hackmann 55886cb128 am 7429e4f7: am 112aa42e: Merge "SurfaceFlinger: fix 64-bit format string warnings"
* commit '7429e4f7d43cd42563ce77a3a4a861a392bc750f':
  SurfaceFlinger: fix 64-bit format string warnings
2014-03-08 07:28:19 +00:00
Greg Hackmann 7429e4f7d4 am 112aa42e: Merge "SurfaceFlinger: fix 64-bit format string warnings"
* commit '112aa42e91b4bb0cde334753e2ad05e3f248b377':
  SurfaceFlinger: fix 64-bit format string warnings
2014-03-08 01:56:32 +00:00
Colin Cross 40d580710b am 6b4ecf31: Merge "surfaceflinger: add BoardConfig.mk variable to force 32-bit"
* commit '6b4ecf314461067c0e05130edaf785fb010f471a':
  surfaceflinger: add BoardConfig.mk variable to force 32-bit
2014-03-07 23:19:26 +00:00
Greg Hackmann 86efcc0cbc SurfaceFlinger: fix 64-bit format string warnings
Change-Id: Idacfbf0601743fba1c5de7632201a66a307a2710
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-03-07 12:45:13 -08:00
Aravind Akella 3eb91b7ede am 19d64819: Bug fix for SensorFusion data rate.
* commit '19d648195673b106152610e3787c95886946460f':
  Bug fix for SensorFusion data rate.
2014-03-07 18:30:46 +00:00
Aravind Akella 19d6481956 Bug fix for SensorFusion data rate.
SensorFusion is always returning data at the slowest possible sampling rate (5 Hz). batch() is getting called twice, first time with the requested rate and second time with the slowest rate (which overwrites the requested rate). Fix batch call in SensorFusion::activate()

Bug: 12064319
Change-Id: If62f3e514233f69810336fd22b136b4395b667d3
(cherry picked from commit 8850909038)
2014-03-06 19:07:18 +00:00
Aravind Akella 35348dc712 am e7643e43: am 8ae7c02e: am ffac23b2: am 4b84704b: Ignore flush complete events when recording last value for a sensor.
* commit 'e7643e431abc2d1b42ab1d68913ec22d0b180554':
  Ignore flush complete events when recording last value for a sensor.
2014-03-06 02:57:23 +00:00
Aravind Akella e7643e431a am 8ae7c02e: am ffac23b2: am 4b84704b: Ignore flush complete events when recording last value for a sensor.
* commit '8ae7c02e6ffb5533958d04ac0d8f4a8d77fdb734':
  Ignore flush complete events when recording last value for a sensor.
2014-03-06 02:35:17 +00:00
Aravind Akella 8ae7c02e6f am ffac23b2: am 4b84704b: Ignore flush complete events when recording last value for a sensor.
* commit 'ffac23b210a96e769fd79ae912b44a185e7d69bd':
  Ignore flush complete events when recording last value for a sensor.
2014-03-06 02:24:29 +00:00
Aravind Akella ffac23b210 am 4b84704b: Ignore flush complete events when recording last value for a sensor.
* commit '4b84704b97300eff3ebfab85652e64d54149d205':
  Ignore flush complete events when recording last value for a sensor.
2014-03-06 02:18:29 +00:00
Aravind Akella 4b84704b97 Ignore flush complete events when recording last value for a sensor.
Bug: 11822806
Change-Id: I1402d6684ed71ed413aef6a7be3aad945b331ec2
2014-03-06 00:48:59 +00:00
Jeff Brown c5e2442e59 Add touch.wake IDC property to control wakeup.
Normally we do not wake the device when the internal touch screen is
touched.  This behavior can now be configured by setting a property
in the input device configuration file.  Add the following line to
the IDC file to enable an initial touch to wake the device from sleep.

  touch.wake = 1

Change-Id: Ifd6d4f51afacd30d85f475725a66e6fcccde9cbb
2014-02-26 18:49:36 -08:00
Wonsik Kim e4cf2f20dd Merge "Implement video plane layer" 2014-02-27 00:09:56 +00:00
Wonsik Kim f837c93a1b Implement video plane layer
Binding with video source will follow.

Change-Id: Ic14e9757f5b61f4055cbeda47c1bafae0a621abb
2014-02-27 00:08:22 +00:00
Jesse Hall a9d27063a1 am 9d65631f: am c9bf3ba4: Merge "Virtual Display async mode is overridden"
* commit '9d65631f5de153b50331d9f63225fe60ba70f8bc':
  Virtual Display async mode is overridden
2014-02-25 21:57:51 +00:00
Jesse Hall 9d65631f5d am c9bf3ba4: Merge "Virtual Display async mode is overridden"
* commit 'c9bf3ba411c66dd1d977c81f1aca08109cbf8c86':
  Virtual Display async mode is overridden
2014-02-25 21:51:10 +00:00
John Dong 4ee5696dfb Virtual Display async mode is overridden
Virtual Display async setting is overridden by eglApi.c causing
stall during composition.

Set the async mode after eglCreateWindowSurface()

b/13139121

Change-Id: I336ca145552e387217cd8bea6e4b7f5f490a274d
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
2014-02-21 16:10:54 -08:00
Colin Cross d14b0c1860 am 361d9df3: am 6b4ecf31: Merge "surfaceflinger: add BoardConfig.mk variable to force 32-bit"
* commit '361d9df38cf9760baffc863d5364a1df9cf8be6b':
  surfaceflinger: add BoardConfig.mk variable to force 32-bit
2014-02-21 13:54:24 +00:00
Colin Cross 361d9df38c am 6b4ecf31: Merge "surfaceflinger: add BoardConfig.mk variable to force 32-bit"
* commit '6b4ecf314461067c0e05130edaf785fb010f471a':
  surfaceflinger: add BoardConfig.mk variable to force 32-bit
2014-02-21 00:22:18 +00:00
Colin Cross 89450d45ac surfaceflinger: add BoardConfig.mk variable to force 32-bit
Individual devices may need to force surfaceflinger to compile for
32-bit if they don't have 64-bit GL libraries.

Change-Id: I3703b2f8e36e90cf125d9ed5e6318c3506861948
2014-02-20 15:37:14 -08:00
Patrick Tjin f72aa27a2a Merge "Add uid to sensorservice's dump of active connections" 2014-02-20 20:51:13 +00:00
Andy McFadden 44c35ec4a9 Allow "opaque" flag to be updated. DO NOT MERGE
Moves the "opaque layer" from Layer to Layer::State.  This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
2014-02-18 15:55:42 -08:00
Dan Stoza c701401f8c Allow disabling layer rotation during screenshots
Add the ability to ignore layers' transformation matrices during
screenshot capture, which will allow the window manager to capture
unrotated images for recents during the device rotation animation.

Bug: 11805195
Change-Id: I854d87bc84ca06ef9a054a454af1c080ee66fbb8
2014-02-14 23:10:42 +00:00
Jeff Brown f086ddbb97 Add support for injecting events into ActivityContainers.
Enhanced the input system to support concurrent dispatch of touch
events on multiple displays which is required for this to work.

Add method to apply offset to PointerCoords.

Change-Id: I55fe4a9a8785ae5a2d3341d214fa3c5107f3963a
2014-02-11 14:51:24 -08:00
Michael Wright d02c5b6aac Move inputservice over to frameworks/native
Add all of the underlying input system pieces, minux PointerController and
SpriteController, to inputflinger. This is in preparation for moving input to
its own process and the addition of the input HAL.

Try 2.

Change-Id: I5f571fe86eb570885ae994e1f0552fb558930346
2014-02-11 10:47:14 -08:00
Michael Wright 1b1fe314c4 Revert "Move inputservice over to frameworks/native"
This reverts commit 2dceb67f1f.
2014-02-10 15:08:18 -08:00
Michael Wright 2dceb67f1f Move inputservice over to frameworks/native
Add all of the underlying input system pieces, minux PointerController and
SpriteController, to inputflinger. This is in preparation for moving input to
its own process and the addition of the input HAL.

Change-Id: I1419a740b38756bd0d54fef5f5ca337e6815b1b0
2014-02-10 14:12:49 -08:00
Patrick Tjin eefced119b Add uid to sensorservice's dump of active connections
Change-Id: I1c365157bcd28a93635dbde4a8d91c79750e03ae
2014-02-05 15:06:03 -08:00
Dan Stoza 7143316af2 Fix virtual display nesting
This fixes the cycling rendering loop caused by nesting virtual
displays by preventing them from recomposing if their contents
haven't changed.

Bug: 12101046
Change-Id: I600365c0fd5d3ad93e04295d26cf9de177ffc79b
2014-02-04 16:46:54 -08:00
Aravind Akella ebff73c37d Bug fix for SensorFusion data rate.
SensorFusion is always returning data at the slowest possible sampling rate (5 Hz). batch() is getting called twice, first time with the requested rate and second time with the slowest rate (which overwrites the requested rate). Fix batch call in SensorFusion::activate()

Bug: 12064319
Change-Id: If62f3e514233f69810336fd22b136b4395b667d3
2014-01-31 22:33:51 +00:00
Andy McFadden d592f32df9 Merge "Allow "opaque" flag to be updated" 2014-01-30 21:42:02 +00:00
Andy McFadden 4125a4ffaf Allow "opaque" flag to be updated
Moves the "opaque layer" from Layer to Layer::State.  This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
2014-01-29 17:36:49 -08:00
Jesse Hall ef11a6c887 am ade9a911: am f65ebc3b: am f5bcb391: Merge "SurfaceFlinger: mFbProducerSlot initailization"
* commit 'ade9a911d04dbd4bfbd3e80a917ea67a581b4797':
  SurfaceFlinger: mFbProducerSlot initailization
2014-01-28 18:26:56 +00:00
mayank parshar fdfde88d0b SurfaceFlinger: mFbProducerSlot initailization
b/12487813

SurfaceFlinger crash is observed during simulation of
Secondary display

Note: change 14e8b01a76
removed the initialization leading to the crash when
simulating secondary display.  Restore the initialization
to solve the problem.

Change-Id: Iae5845fb82735e01de5cc0dc582d13c27e3c614f
Signed-off-by: mayank parshar <mayankp@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
2014-01-28 09:33:33 -08:00
Jesse Hall 467113c6fc am 25f75c36: am 8c303f7e: am fcf9c1ba: Merge "SurfaceFlinger: mFbFence initialization"
* commit '25f75c361098086ffa2b87dcc3f22ac5f64c05be':
  SurfaceFlinger: mFbFence initialization
2014-01-26 16:50:36 +00:00
mayank parshar b988f85fc4 SurfaceFlinger: mFbFence initialization
MobC00383030
b/12487813

SurfaceFlinger crash is observed while connecting
to Wi-Fi display.

Note: change 14e8b01a76
removed the initialization leading to the crash when
running through the HWC composition path.  Restore the
initialization to solve the problem.

Change-Id: I581defc7135ac512080c0da06a62b1dae7d218c4
Signed-off-by: mayank parshar <mayankp@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
2014-01-25 06:35:24 -08:00