Commit Graph

1575 Commits

Author SHA1 Message Date
Jesse Hall
5b730570be Merge "surfaceflinger: use Mutex timedLock instead of tryLock loop" 2015-01-12 23:33:07 +00:00
Jesse Hall
fcd15b478c surfaceflinger: use Mutex timedLock instead of tryLock loop
Rather than trying to acquire the state lock without waiting three
times at 1 second intervals in SurfaceFlinger::dump(), just try to
acquire the lock once with a 1 second timeout. Avoids spurious mutex
acquire failures that lead to flaky
com.android.cts.jank.opengl.CtsHostJankOpenGl results.

Bug: 18842510
Change-Id: I00ce6109647de2aef8831dd2f8fa98652ba7f4e0
2015-01-10 15:41:01 -08:00
Elliott Hughes
e0e29de5c1 am 23958e14: am a7dcab69: Merge "We have POSIX clocks, and we don\'t need to ask for the openssl headers."
* commit '23958e1436565b333ce7f3022bc52a10d4732ef6':
  We have POSIX clocks, and we don't need to ask for the openssl headers.
2015-01-10 00:18:15 +00:00
Elliott Hughes
23958e1436 am a7dcab69: Merge "We have POSIX clocks, and we don\'t need to ask for the openssl headers."
* commit 'a7dcab6954467fa3726824a099b83d0e7490d6d5':
  We have POSIX clocks, and we don't need to ask for the openssl headers.
2015-01-10 00:14:12 +00:00
Elliott Hughes
5ea47f7a32 We have POSIX clocks, and we don't need to ask for the openssl headers.
This code doesn't need to run on the Mac, and the BoringSSL transition
will be easier without references to external/openssl.

Change-Id: I14ea11fa2911af0f4e95e69636e6a2c26126cbe0
2015-01-09 15:56:15 -08:00
Narayan Kamath
a3ef067c00 am 106547c1: am 033f7e8e: Merge "InputDispatcher: Optimize count()"
* commit '106547c1e33453b7e20b7b387087092d36aa6a72':
  InputDispatcher: Optimize count()
2014-12-24 10:37:38 +00:00
Narayan Kamath
106547c1e3 am 033f7e8e: Merge "InputDispatcher: Optimize count()"
* commit '033f7e8e35ac76404fe823a67e07ba7c42bc357c':
  InputDispatcher: Optimize count()
2014-12-24 10:32:20 +00:00
Narayan Kamath
033f7e8e35 Merge "InputDispatcher: Optimize count()" 2014-12-24 10:25:43 +00:00
Dmitriy Ivanov
e9b6f1f7bb Switch to libsigchain.a
Use LOCAL_WHOLE_STATIC_LIBRARIES to instruct static linker
  to export symbols from the static library.

(cherry picked from commit 4340a14fbf)

Bug: 18701723
Change-Id: I70f6fdb64b0d1adbadf96c8de85870a903ec186a
2014-12-10 10:28:50 -08:00
Dan Stoza
dd883c0b08 libgui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

This is a squashed commit based on an initial change with a couple of
fixes to avoid breaking certain targets. The source commits are:
  d723bd7669
  00d504c06e
  429ba89cd2

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
2014-12-05 14:59:29 -08:00
Dan Stoza
d723bd7669 libgui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
2014-12-05 11:06:44 -08:00
Dan Albert
7530114619 am 5588d900: Merge "Enable clang for libui/libgui/surfaceflinger"
* commit '5588d9000cd1ef217185c9001d6b5ecd84db9741':
  Enable clang for libui/libgui/surfaceflinger
2014-12-05 18:01:48 +00:00
Dan Stoza
01049c8321 Enable clang for libui/libgui/surfaceflinger
Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
(cherry picked from commit f10c46ef85)
2014-12-04 17:56:17 -08:00
Dan Stoza
d6739d5e44 am db5827d3: am 5878444f: SurfaceFlinger: Listen to HWC invalidate
* commit 'db5827d314ddca3d473947b4ef49e811fad70069':
  SurfaceFlinger: Listen to HWC invalidate
2014-12-04 16:15:54 +00:00
Dan Stoza
db5827d314 am 5878444f: SurfaceFlinger: Listen to HWC invalidate
* commit '5878444fb8da043021f30d3de739531f15390df5':
  SurfaceFlinger: Listen to HWC invalidate
2014-12-03 20:43:29 +00:00
Dan Stoza
5878444fb8 SurfaceFlinger: Listen to HWC invalidate
"Do less work when using PTS" broke the invalidate path up from HWC
to SurfaceFlinger. When HWC would signal an invalidate, SurfaceFinger
would wake up, see no new buffers, and go back to sleep. This is fine,
except when the invalidate is a result of an HDMI hotplug, in which
case the screen remains blank. This change makes that functionality
work again.

Bug: 18564815
Bug: 18558468
Change-Id: I2e2171d86839945f4e4e6555d66f7e2895bd096a
2014-12-02 16:58:17 -08:00
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