Commit Graph

1279 Commits

Author SHA1 Message Date
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 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 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 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 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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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
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 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
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
Michael Lentine eb21986df0 Merge "Update currentConfig variable when active display is changed." into lmp-dev 2014-08-22 16:34:14 +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
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
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
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
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 f755140794 Incorporate TransformToDisplayInverse into the crop calculation.
Change-Id: Ia9757b3a43d3b8f99df9fef2ed4d11c43b5abdd2
2014-08-18 16:35:43 -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
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
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
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
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
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
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
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
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
Prashant Malani 7227b96a73 Merge "surfaceflinger: Replace blank/unblank with setPowerMode" 2014-06-12 03:30:50 +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
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 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 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
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
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
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
Andy McFadden 466954565b Merge "Update HWC dump format" 2014-04-25 14:23:29 +00:00
Dan Stoza bba1385d1c am f3c07d4f: Fix virtual display nesting
* commit 'f3c07d4f70f33c2fe5b14ca8fbcdfa4133cc72c7':
  Fix virtual display nesting
2014-04-23 14:36:20 +00: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
Dan Stoza fd34b65f71 Merge "BufferQueue: Add producer buffer-released callback" 2014-04-11 17:57:12 +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
Ruchi Kandoi 4098f03d5c Revert "SurfaceFlinger: send VSYNC power hints to IPowerManager"
This reverts commit d469a1c328.
2014-04-04 18:09:30 -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
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
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
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 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
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
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
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
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
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
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
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
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
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
Jesse Hall 524672571f am 03691218: am e5f7bf74: am b6c21004: Merge "Implement per-display EGLConfig and configless EGLContext"
* commit '03691218ada2fb7e084ad4ae7ddd54f9b28d5611':
  Implement per-display EGLConfig and configless EGLContext
2014-01-03 18:36:29 +00:00
Jesse Hall 10ca42cbdc am 4c37d088: am 6c7dcfa9: am 662d3134: Merge "Move EGLConfig selection to RenderEngine"
* commit '4c37d0886ca06c290e205cad2798406361bbbf53':
  Move EGLConfig selection to RenderEngine
2014-01-03 18:36:28 +00:00
Jesse Hall 19e872912a Implement per-display EGLConfig and configless EGLContext
Bug: 12230666
Change-Id: Icca608b108cbdcab9cf01a9236d8cdbda000a836
Signed-off-by: Jesse Hall <jessehall@google.com>
2013-12-23 21:53:39 -08:00
Jesse Hall 05f8c703d4 Move EGLConfig selection to RenderEngine
Bug: 12230666
Change-Id: I8d1111a7e0fd9d9e2525e6a80da8ce46d7dd085d
Signed-off-by: Jesse Hall <jessehall@google.com>
2013-12-23 21:53:39 -08:00
Brian Carlstrom 494600a755 am 285bfefb: am c1bf6fa9: am 7fea2361: Merge "Track Looper decoupling from ALooper"
* commit '285bfefb01f24e98348628c115eb6c524417ea82':
  Track Looper decoupling from ALooper
2013-12-19 07:58:30 +00:00
Brian Carlstrom fe761ab6c7 Track Looper decoupling from ALooper
Change-Id: I612f0de7002e24948a4cbbea7b416b4fbb3929aa
2013-12-12 23:54:43 -08:00
Jesse Hall 324c69b542 am 1ee45c2d: am 14e8b01a: Don\'t change the framebuffer target until we render a new one
* commit '1ee45c2d2d816ee912624d81ff1b0aaa98e8fa74':
  Don't change the framebuffer target until we render a new one
2013-11-08 13:01:20 -08:00
Jesse Hall 14e8b01a76 Don't change the framebuffer target until we render a new one
Continuing to send the last-rendered framebuffer to HWC on subsequent
frames allows the HWC to read partially-composed regions that haven't
changed, instead of re-composing from scratch.

Bug: 11573910
Change-Id: I8829877d2a06001f1e1b3f168cbba71c7b217b2d
2013-11-07 12:37:13 -08:00
Jesse Hall ad78055746 am 2d32aa59: am 356c2386: Merge "Provide virtual display output buffer to HWC in prepare" into klp-dev
* commit '2d32aa5918de1c12c54a32e8eb28bbc96d430796':
  Provide virtual display output buffer to HWC in prepare
2013-11-06 21:12:40 -08:00
Jesse Hall 356c23865d Merge "Provide virtual display output buffer to HWC in prepare" into klp-dev 2013-11-07 04:43:20 +00:00
Jesse Hall 45c9c0477d am f111ee13: am 49318631: Merge "Don\'t use implementation-defined format with CPU consumers" into klp-dev
* commit 'f111ee13a6f5d8606c5dc7a5cc07cedf929e69a8':
  Don't use implementation-defined format with CPU consumers
2013-11-06 08:52:02 -08:00
Jesse Hall 493186312a Merge "Don't use implementation-defined format with CPU consumers" into klp-dev 2013-11-06 15:35:09 +00:00
Jesse Hall f7a675837b Provide virtual display output buffer to HWC in prepare
We were already making sure the HWComposer class had the handle before
prepare, but it wasn't passing the handle along to HWC as intended.

Partial fix for bug: 11430248
Change-Id: I25f672c4fdfaa6a81fe0acb24d9ad05153ee17dc
2013-11-05 16:27:14 -08:00
Jamie Gennis 1a8e6bf966 am 39c5ea2c: am ee874caa: Merge "DispSync: remove delay when enabling vsync events" into klp-dev
* commit '39c5ea2caaddd7ea44eaeed38d3760fbc421ad56':
  DispSync: remove delay when enabling vsync events
2013-11-05 12:02:26 -08:00
Jesse Hall 497ba0e085 Don't use implementation-defined format with CPU consumers
If the virtual display surface is being consumed by the CPU, it can't
be allowed with HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED since there is
no way for the CPU consumer to find out what format gralloc chose. So
for CPU-consumer surfaces, just use the BufferQueue's default format,
which can be set by the consumer.

A better but more invasive change would be to let the consumer require
a certain format (or set of formats?), and disallow the producer from
requesting a different format.

Bug: 11479817
Change-Id: I5b20ee6ac1146550e8799b806e14661d279670c0
2013-11-04 16:43:03 -08:00
Jamie Gennis 41c3c496ff DispSync: remove delay when enabling vsync events
This change fixes a bug that caused an extra frame of latency when enabling
vsync event callbacks in DispSync.  The bug was related to the logic that
prevents the two events from firing with very little time between them due to
updates to the vsync model.

Bug: 11479720
Change-Id: Ie7eaff9e92ffb7b7b6cb4d3d4402c96cbd29af7e
2013-11-01 13:58:56 -07:00
Jesse Hall 45cb6ec715 am 96002be4: am c354effe: Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
* commit '96002be4bd4b8bbfecba2cc45bdf0b47f06464bc':
  Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
2013-10-25 10:55:24 -07:00
Jesse Hall c354effe97 Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
related to b/8316155 - Implement HWComposer 1.3 w/ virtual display support
Change-Id: I2dc8d65a74174aa833cc491264f97f1f2df49307
2013-10-25 17:48:09 +00:00
Jesse Hall 6fdaaf5c7c am a54a8b63: am 93fcb823: Merge "Add a boardconfig to force HWC composition of virtual displays" into klp-dev
* commit 'a54a8b63d191d2c1c4669f89b32c4b8a9c04cd31':
  Add a boardconfig to force HWC composition of virtual displays
2013-10-23 15:20:43 -07:00
Jesse Hall 014dd9f0f2 am 48775386: am c5807f90: Merge "Use implementation-defined format when HWC writes to output buffer" into klp-dev
* commit '487753868aa86902f723dbdedd7083783701188d':
  Use implementation-defined format when HWC writes to output buffer
2013-10-23 15:20:42 -07:00
Naseer Ahmed 6a968462f9 Add a boardconfig to force HWC composition of virtual displays
When this boardconfig is defined, even when all virtual display
composition is done by GLES, the HWC will be forced to copy from the
GLES framebuffer to the output buffer. On some hardware this allows
HWC to do format conversions that would otherwise have to be done by
the consumer, with worse power and/or performance.

Bug: 8316155
Change-Id: If980ecc589f138cef063eafa757f7f748196713e
2013-10-17 13:57:58 -07:00
Jesse Hall 1e27ba234c Use implementation-defined format when HWC writes to output buffer
When GLES isn't writing to the output buffer directly, request an
implementation-defined format with minimal usage flags, leaving the
format choice up to gralloc. On some hardware this allows HWC to do
format conversions during composition that would otherwise need to be
done (with worse power and/or performance) by the consumer.

Bug: 8316155
Change-Id: Iee6ee8404282036f9fd1833067cfe11dbadbf0bf
2013-10-17 11:20:22 -07:00
Jamie Gennis cd65a2c51e am bbfbe93c: am 0a645cc5: SurfaceFlinger: give SF its own vsync phase
* commit 'bbfbe93c0d2d6c7818e23219d2925f02ddf5bd92':
  SurfaceFlinger: give SF its own vsync phase
2013-10-15 17:29:21 -07:00
Jamie Gennis 5727fc08ba am 47c772e8: am d1700756: SurfaceFlinger: Add EventControlThread
* commit '47c772e8ec28eb0a3df9c8edd252f292c7c8e152':
  SurfaceFlinger: Add EventControlThread
2013-10-15 17:29:21 -07:00
Jesse Hall c6694b4cb4 resolved conflicts for merge of e94d204a to master
Change-Id: Idb2030dbb25a2e4b972492587558b25a305e68bd
2013-10-15 17:22:33 -07:00
Jamie Gennis 0a645cc5a9 SurfaceFlinger: give SF its own vsync phase
This change allows SurfaceFlinger to run at a different vsync phase offset from
that used by external listeners.

Bug: 11175503
Change-Id: I561c53a5659fa6dc1e3e4ae30340f3c1a6adceb4
2013-10-15 14:31:41 -07:00
Jamie Gennis d1700756ec SurfaceFlinger: Add EventControlThread
This change adds a new thread for calling HWComposer's eventControl
asynchronously.  The DispSync-based vsync approach ends up enabling and
disabling HWComposer's vsync callbacks at arbitrary times, and some HWComposer
implementations do not have these calls optimized.

Bug: 11175503
Change-Id: I719be82bd200b391c61d40863b991c7b59acdfd6
2013-10-15 14:31:41 -07:00
Jesse Hall adbb3062e1 am a04fd39c: am 8e26b28b: Filter out vsync events from HWC with duplicate timestamps
* commit 'a04fd39cb88bb6df5f639464f70795f58cd0aefa':
  Filter out vsync events from HWC with duplicate timestamps
2013-10-15 05:05:36 -07:00
Jesse Hall 948fe0ce74 Disable hardware vsync when blanking the screen
Bug: 11220224
Change-Id: I99d0a42e1a6bb0aaf89706f6d100e9ef2a5deaa4
2013-10-14 16:25:01 -07:00
Jesse Hall 8e26b28be6 Filter out vsync events from HWC with duplicate timestamps
Bug: 11220224
Change-Id: I4efe0b66ea8969bf0ec3c4fcb325d354c8a0c315
2013-10-14 15:34:00 -07:00
Jesse Hall 4df2dae1c9 am 44b09f8b: am 44e45cfe: Merge "DispSync: don\'t compensate for wakeup latency" into klp-dev
* commit '44b09f8b55bef56e06ad584db231916c17e30f5b':
  DispSync: don't compensate for wakeup latency
2013-10-14 10:51:54 -07:00
Andy McFadden 9c8b3097e6 am af4ae923: am 6410c8c4: Merge "Use black for blackout layer" into klp-dev
* commit 'af4ae923c3f8a2e40d74eb6291da16b4a6514449':
  Use black for blackout layer
2013-10-14 10:48:32 -07:00
Jesse Hall 44e45cfeb3 Merge "DispSync: don't compensate for wakeup latency" into klp-dev 2013-10-13 20:13:59 +00:00
Andy McFadden 6410c8c409 Merge "Use black for blackout layer" into klp-dev 2013-10-11 21:39:49 +00:00
Andy McFadden c6f2169559 Use black for blackout layer
SurfaceFlinger was rendering dark purple for secure content, which
showed up when we took a screen shot for the orientation change
animation.  Use black instead.

Bug 11157921

Change-Id: I3895e8168891d49dc5b84eed599bcd0a303bb70a
2013-10-11 11:16:03 -07:00
Jesse Hall 19cd5bc78c am 8c76d2a1: am 5c65efe2: Merge "Wake up disp sync thread when setting display period" into klp-dev
* commit '8c76d2a16ede579fd2069647ff73591bb6d6a235':
  Wake up disp sync thread when setting display period
2013-10-10 16:08:22 -07:00
Jesse Hall 5c65efe2b1 Merge "Wake up disp sync thread when setting display period" into klp-dev 2013-10-10 22:24:32 +00:00
Jesse Hall 72f69d9f23 Wake up disp sync thread when setting display period
Bug: 10624956
Change-Id: I272c15f319521bfbd1bb70451366c7dd84d60bf9
2013-10-10 14:48:22 -07:00
Andy McFadden 95e4a7d9f3 am c00ab7b5: am 2d8d120d: Fix blank / partial screenshots
* commit 'c00ab7b5aafb7625ad7ebd2af107936df3efc98b':
  Fix blank / partial screenshots
2013-10-10 08:38:36 -07:00
Jamie Gennis 0d5c60edf1 DispSync: don't compensate for wakeup latency
This change removes the wakeup latency compensation from the software-generated
vsync events.  Choreographer can't handle timestamps in the future, so don't
aim for early wake-ups with the expectation that the actual wake-up will be
late.

Bug: 11153576
2013-10-09 17:56:42 -07:00
Andy McFadden 2d8d120dc1 Fix blank / partial screenshots
The screen capture code wasn't waiting for the render to finish,
so sometimes you'd see an empty or partial image.

Bug 11131777

Change-Id: Ic64087322ce3bb15bb5f4fb1eb07579880fe6197
2013-10-09 16:38:02 -07:00
Jamie Gennis b85d2cf0a2 resolved conflicts for merge of 790b6d09 to master 2013-10-08 17:50:36 -07:00
Jamie Gennis faf77cce9d SurfaceFlinger: SW-based vsync events
This change adds the DispSync class, which models the hardware vsync event
times to allow vsync event callbacks to be done at an arbitrary phase offset
from the hardware vsync.  This can be used to reduce the minimum latency from
Choreographer wake-up to on-screen image presentation.

Bug: 10624956
Change-Id: I8c7a54ceacaa4d709726ed97b0dcae4093a7bdcf
2013-10-07 17:59:53 -07:00
Alan Viverette 794c5ba973 Simplify color adjustment using homogeneous coordinates
Change-Id: Ie31abacb134c29d82a6041fa7d521f68a1a273af
2013-10-03 16:40:52 -07:00
Dave Burke c5214289d6 am 9b4b1180: am 06993503: Merge "only clear FB when asked for the opaque layer" into klp-dev
* commit '9b4b1180941f4d2ef9d3e7bd26bc1855ff9fb141':
  only clear FB when asked for the opaque layer
2013-10-02 10:44:44 -07:00
Dave Burke 0699350336 Merge "only clear FB when asked for the opaque layer" into klp-dev 2013-10-02 17:36:40 +00:00
Jesse Hall fee52e20b9 am f3fa0712: am 93573e91: Merge "Treat composition frames with no layers as using GLES composition" into klp-dev
* commit 'f3fa0712282e760c316f44cba05f884f9399b98f':
  Treat composition frames with no layers as using GLES composition
2013-10-02 09:57:03 -07:00
Jesse Hall 10a9ca1c69 am 72d270c5: am b716e570: Set the outbuf acquire fence after we actually have it.
* commit '72d270c5f0918d1dc7a6a1774b80469c9f28b7ea':
  Set the outbuf acquire fence after we actually have it.
2013-10-02 09:57:02 -07:00
Jesse Hall 93573e91c2 Merge "Treat composition frames with no layers as using GLES composition" into klp-dev 2013-10-02 14:54:03 +00:00
Jesse Hall 0c6fd94c13 am 92d7c3ee: am b65f32eb: Fix two EGLConfig selection bugs
* commit '92d7c3ee03109cf2d465a103b828b7d7d3ee9848':
  Fix two EGLConfig selection bugs
2013-10-01 20:58:49 -07:00
Jesse Hall b716e57048 Set the outbuf acquire fence after we actually have it.
In GLES-only mode, we don't have the outbuf acquire fence until after
GLES composition is done for the frame. We were setting the fence in
HWC's state immediately after dequeueing the buffer from the consumer,
before GLES had started. This fence got passed through HWC and on to
the consumer, so the consumer was reading the buffer before GLES was
done writing to it.

Now we update HWC's state just before set(), when we know we have the
right fence.

Bug: 11000763
Change-Id: Iea9db4c69634c352dc2d600f0bdb6bef2a432636
2013-10-01 17:25:20 -07:00
Mathias Agopian ac68302e1c only clear FB when asked for the opaque layer
a layer need to be considered NOT opaque if it has a
plane-alpha.

Bug: 10846930
Change-Id: Ibd8981b63ede4560c7096bacc4cff46a7eb2a8bb
2013-10-01 15:36:52 -07:00
Jesse Hall d05a17fbb3 Treat composition frames with no layers as using GLES composition
When there are no window layers for a display, SurfaceFlinger clears
the undefined region using GLES. Some of the places that check for
GLES composition weren't considering this special case, in particular:

- We were skipping the eglSwapBuffers() on these frames.
- We were putting VirtualDisplaySurface in HWC-only composition mode.

This change centralizes the logic for this special case.

Bug: 10957068
Change-Id: I2deaf2ed101e8ea76708862a6bb67751b6078794
2013-09-30 17:08:28 -07:00
Jesse Hall b65f32ebe2 Fix two EGLConfig selection bugs
This fixes two bugs introduced by
  Change-Id: Ia8cc084c02a0e3de910def024da8a08d02bbd89d

(a) There is no invalid EGLConfig value, in particular zero is valid.
    Checking return values of eglGetConfigs and eglChooseConfig is the
    only way to determine success.
(b) The "simple" EGLConfig query used as the emulator fallback should
    not include EGL_RECORDABLE; the emulator doesn't have it.

Bug: 10935622
Change-Id: Ib798a24e7cf06a679811c46eaa45d39174a715ec
2013-09-30 10:49:16 -07:00
Mathias Agopian ff98f3e598 am 338acd68: am 86206b41: Merge "fix initialization of framebuffer target crop rect on hwc 1.3" into klp-dev
* commit '338acd6869532f2684cbd1e4f273eaffc6d4ef6d':
  fix initialization of framebuffer target crop rect on hwc 1.3
2013-09-26 12:47:35 -07:00
Mathias Agopian 2b3d0c4079 am 0ff4b283: am 6da15f46: fix crashers with wifi/virtual displays
* commit '0ff4b28396d77a0ed2f191836895a891108a8b5b':
  fix crashers with wifi/virtual displays
2013-09-26 12:47:35 -07:00
Mathias Agopian 86206b41b2 Merge "fix initialization of framebuffer target crop rect on hwc 1.3" into klp-dev 2013-09-26 19:41:22 +00:00
Mathias Agopian 8f63c2049b fix initialization of framebuffer target crop rect on hwc 1.3
Bug: 10936771
Change-Id: If283e5e231ca34b93e0b1784bb4e8e4c7bfd75de
2013-09-25 20:44:34 -07:00
Mathias Agopian 6da15f46f5 fix crashers with wifi/virtual displays
Bug: 10647742
Change-Id: I4b8ed9da52ef95af3a3b3a04b98514a3776a674d
2013-09-25 20:40:07 -07:00
Mathias Agopian 1c479c56da am 754bad45: am d555684c: reinstate black-screenshot debugging code
* commit '754bad4534e9a2de8b4e3ecbe097993c71246f91':
  reinstate black-screenshot debugging code
2013-09-20 11:20:44 -07:00
Mathias Agopian 4d5755389d am f589dd29: am e2a3e872: Merge "Fix GLES context version selection" into klp-dev
* commit 'f589dd2915587994d3dd36eff2191962fe0b71c0':
  Fix GLES context version selection
2013-09-20 11:19:58 -07:00
Mathias Agopian d555684cb3 reinstate black-screenshot debugging code
turned off by default.

Bug: 10809349
Change-Id: I3e6b8c7860e6b0e122b8f07de4020967cd1f005c
2013-09-19 17:09:26 -07:00
Christopher Ferris 6de9653ac8 Merge "Remove unnecessary include." 2013-09-19 23:16:10 +00:00
Christopher Ferris d142f4b787 Remove unnecessary include.
All these files are including utils/CallStack.h, but none of the code
uses any CallStack objects.

Change-Id: I38c3a346a3bd0ddbff368d0f7f8b3f3d78fc0432
2013-09-19 15:45:03 -07:00
Mathias Agopian 2185f8b420 Fix GLES context version selection
Explicitly selects an ES 2.0 config first, then an ES 1.x config,
before attempting the fallback path for the emulator.

Bug: 10820214
Change-Id: Ia8cc084c02a0e3de910def024da8a08d02bbd89d
2013-09-18 16:20:26 -07:00
Mathias Agopian 0f0e845113 am a7e1660b: am c1c05de4: fix camera API 2.0 orientation
* commit 'a7e1660b257326f99261e7c9b2d58c9d2e68d0b0':
  fix camera API 2.0 orientation
2013-09-18 15:36:00 -07:00
Mathias Agopian c1c05de415 fix camera API 2.0 orientation
we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
2013-09-17 23:45:22 -07:00
Mathias Agopian 7229e98229 am 3f342c11: am 02b62df7: Merge "Make sure do disconnect from a BQ when its client dies." into klp-dev
* commit '3f342c113360eacc1e9c1ff481cb03f700a50117':
  Make sure do disconnect from a BQ when its client dies.
2013-09-17 14:35:29 -07:00
Mathias Agopian 02b62df711 Merge "Make sure do disconnect from a BQ when its client dies." into klp-dev 2013-09-17 21:31:14 +00:00
Jesse Hall cd9fd427ac am b8080d9a: am 2a36497e: Merge "Stop using default value for Surface producerControlledByApp parameter" into klp-dev
* commit 'b8080d9a3b760617c5dde7b1d2d63aa2bcecf3a7':
  Stop using default value for Surface producerControlledByApp parameter
2013-09-16 20:32:34 -07:00
Mathias Agopian 365857df8b Make sure do disconnect from a BQ when its client dies.
Bug: 5679534

Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
2013-09-16 16:15:21 -07:00
Jesse Hall 83cafffeac Stop using default value for Surface producerControlledByApp parameter
Bug: 10785749
Change-Id: Ifbf9340e5eabe621a69e990ec3e05ac51f8db66a
2013-09-16 15:39:55 -07:00
Alan Viverette 9c5a333511 Add API for pushing color transforms to SurfaceFlinger
BUG: 9057596
Change-Id: Iea0953366eac875b7968897a75472c25a137edb5
2013-09-12 20:04:35 -07:00
Mathias Agopian ff2ed70fa3 color blindness enhancement
This is an attempt at improving the experience of
users with color vision impairement.

At this time this feature can only be enabled for
debugging:

  adb shell service call SurfaceFlinger 1014 i32 PARAM

  with PARAM:
   0 : disabled
   1 : protanomaly/protanopia simulation
   2 : deuteranomaly/deuteranopia simulation
   3 : tritanopia/tritanomaly simulation
  11, 12, 13: same as above w/ attempted correction/enhancement

The enhancement algorithm tries to spread the "error"
such that tones that would otherwise appear similar can be
distinguished.

Bug: 9465644

Change-Id: I860f7eed0cb81f54ef9cf24ad78155b6395ade48
2013-09-04 22:11:15 -07:00
Mathias Agopian 9b5534b0e5 Merge changes I8283a989,I64add89a into klp-dev
* changes:
  switch to use mat4
  vector and matrix classes for graphics use
2013-08-31 01:30:10 +00:00
Jesse Hall 87967c1869 Merge "Force async behavior for the virtual display output BufferQueue" into klp-dev 2013-08-30 21:14:55 +00:00
Jesse Hall 8db92553e9 Force async behavior for the virtual display output BufferQueue
Bug: 10551087
Change-Id: I40bbb2b87d64420939a0ea309254f281437dab56
2013-08-29 16:09:11 -07:00
Mathias Agopian 19733a3279 minor clean-up of the GLESRenderer
Change-Id: I978dea25b7687fbbbb283f09c24e115d9bad49a2
2013-08-28 18:13:56 -07:00
Mathias Agopian 931bda1c47 reset the gl viewport at each frame for each display
Bug: 10097128, 9506003
Change-Id: Ie0403a631e339a9134216224f3366f46ece58b53
2013-08-28 18:11:46 -07:00
Mathias Agopian a8c386f1c3 switch to use mat4
Change-Id: I8283a989cfd2b74d53958150bc90298bc083fee7
2013-08-26 20:42:07 -07:00