Commit Graph

1350 Commits

Author SHA1 Message Date
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 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 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 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 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 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 8b81ce563f am cb8a9fcc: Merge "Switch to libsigchain.a"
* commit 'cb8a9fcc56288378d05d80c55396db7981e3828d':
  Switch to libsigchain.a
2014-10-21 03:30:55 +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 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 0b6acb2231 Add version number to SensorService dump output.
Change-Id: I64f9482ade523ec3fafe14bff14db7196e32413f
2014-10-19 20:30:58 +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
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 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 9cc849500d Merge "Don't check if this == NULL." 2014-10-15 22:45:07 +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 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 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 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 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 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 a7eb4b74f7 Merge "Fix sockfd leakage in SensorService." into lmp-dev 2014-10-03 21:45:37 +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 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 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 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