summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libgui includes refactoringMathias Agopian2012-08-101-3/+3
| | | | Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
* turn DisplayDevice into a reference-counted objectMathias Agopian2012-08-051-10/+9
| | | | | | | | | | it's safer this way because this object owns an EGLSurface which cannot be easily reference-counted. it also gives us the ability to sub-class it, which we might want to do soon. Change-Id: I07358bb052dc5a13b4f2196b2c2b6e6e94c4bb4f
* remove a dependency of DisplayDevice on the refresh rateMathias Agopian2012-08-041-1/+1
| | | | | | this remove a dependency (not all) on FramebufferSurface Change-Id: Ie07ce70760cdcedfb41b5b41bea8da45637bf474
* cleanups in preparation of bigger changesMathias Agopian2012-08-021-18/+23
| | | | | | | | | | | - fix typo drawForSreenshot misspelled - get rid of DisplayDeviceBase - removed unused or unneeded code - always pass a DisplayDevice to Layer methods that are called on a per-display basis (to make it clear that this could be called more than once per composition). Change-Id: Id948b7e09fe5c06db0e42d40d6ed75dd095c7f44
* rename DisplayHardware to DisplayDeviceMathias Agopian2012-08-021-8/+8
| | | | Change-Id: I3f7250cd914e0da4f9ec2c9403587bbe12f3cc62
* getting closer to final main composition loopMathias Agopian2012-08-021-1/+1
| | | | Change-Id: Icd63782366ffd11d9ea00c925ae5783ed7440cdb
* SurfaceFlinger cleanupMathias Agopian2012-07-241-2/+1
| | | | | | | mostly refactored SurfaceFlinger.h, but also removed dead code. cleaned-up a few includes as well. Change-Id: Ib15f4ffe567912b61ee98aa076c6a283b72811b5
* factor EGL/GL and surface creation out of DisplayHardwareMathias Agopian2012-07-191-4/+1
| | | | Change-Id: Icd85a6a4caad06f056578008af3e21666fa8b1f4
* one more step towards multiple display supportMathias Agopian2012-07-101-47/+31
| | | | | | | | | - remove dependency on cached state in validateVisibility - get rid of mVertices and mTransformedBounds - get rid of validateVisibility - get rid of unlockPageFlip - handleTransaction now returns a dirty region - computevisibileregion now uses window-manager space
* Only set acquire fences on overlay layersJesse Hall2012-07-021-4/+5
| | | | Change-Id: I08e8173f83580de5a4e43a0ba5ea03e5ec6e8782
* Pass fence to HWC on first use of bufferJesse Hall2012-06-301-0/+25
| | | | | | Also do a CPU-wait on the fence before using it for GL composition. Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
* get rid of GraphicPlaneMathias Agopian2012-06-281-20/+14
| | | | | its functionality is now folded into DisplayHardware there will be more changes in that area.
* Transfer HWC release fences to BufferQueueJesse Hall2012-06-211-1/+5
| | | | | | | | | | | | | | | | | | After a HWC set, each SurfaceFlinger Layer retrieves the release fence HWC returned and gives it to the layer's SurfaceTexture. The SurfaceTexture accumulates the fences into a merged fence until the next updateTexImage, then passes the merged fence to the BufferQueue in releaseBuffer. In a follow-on change, BufferQueue will return the fence along with the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the fence to signal before returning. The releaseFence default value for BufferQueue::releaseBuffer() is temporary to avoid transient build breaks with a multi-project checkin. It'll disappear in the next change. Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
* refactor HWComposer to break dependency with the HAL headersMathias Agopian2012-06-141-22/+12
| | | | | | | | | | | | | HWComposer must abstract the HWC HAL entirely, so that the HAL can continue to evolve (and break binary compatibility) without breaking SurfaceFlinger. The HWC data structure had leaked outside of HWComposer, this is now fixed. We now have an abstract interface that provide all the needed functionality, HWCompose provides concrete implementations of it based on the the HWC version. Change-Id: I40c4676dc986b682ede5520a1c60efe64037b0bb
* sometimes we would incorrectly scale the content of a surfaceMathias Agopian2012-06-071-6/+19
| | | | | | | | | | | | | | | | | | | | this would happen when a resize was pending (ie: we have received and processed a resize transaction but have not received a buffer with the right size) and a new transaction came in that didn't involve a resize, for instance a translate-only transaction. in this case, we would incorrectly update the drawing state with the pending size, eventhough we still don't have a buffer for it. the solution is quite simple, we never allow the size to propagate from current to drawing state during the regular transaction processing (unless we are in fixed-size mode -- meaning we don't need to have a matching size buffer), this propagation happens later once we receive the buffer. Bug: 6624163 Change-Id: I11a97e4b88a7f3a0571ddcfe99c86cb04ce01a4d
* sometimes SF would not process a surface resizeMathias Agopian2012-06-041-3/+4
| | | | | | | | | | | | | | | this would happen when a window started with size A, was resized to B and immediately resized to A. In this situation the erquested and active size would be the same, and SF would think a transaction wasn't needed. we fix this by always comparing the requested sizes. Also, make sure to set mRefreshPending once we're sure we have succesfully called updateTexImage(). Bug: 6580962 Change-Id: I2c48b4df7f05fd35c9e1d2dd82095b0f3d5a0b6a
* Fix a crasher is surfaceflinger.Mathias Agopian2012-05-291-5/+7
| | | | | | | | this bug introduced recently would happen when the very first buffer of a surface was rejected for not having the right size Bug: 6577035 Change-Id: I9fabf20006019f2a6c308be7c7f5c05bdcfd5014
* add the ability to reject buffers in SurfaceTexture::updateTexImageMathias Agopian2012-05-231-67/+95
| | | | | | | | SurfaceFlinger is using this new feature to reject buffers that don't have the right size. Bug: 6498869 Change-Id: I8a7250a47db6c082a357b703feb3b9d0fc8d3443
* refactoring in preparation for bug:6498869 fixMathias Agopian2012-05-231-42/+47
| | | | | | | | here we just shuffle a bit the code inside lockPageFlip(), we move the code that handles the buffer size closer to the call to updateTexImage(). no functionality change. Change-Id: Ie3193cd86cd32cf3c89532449fd747d145ca0ab6
* improve resize transactionsMathias Agopian2012-05-231-4/+3
| | | | | | | | | | | | use a flag instead of pre-committing the "requested" state to prevent propagation or "requested" to "active", which makes things a lot clearer when reading the code. also avoid going through the "resized" code-path when requested size is equal to "active" size. Bug: 6498869 Change-Id: I24f893ba0ec5ca06aac5b8da9818989ae7ce4005
* Improve debug logs and minor clean-upMathias Agopian2012-05-231-25/+52
| | | | | Bug: 6498869 Change-Id: I14d1b4d6960b87b5a7c4d7e20b92538edd9331ff
* Fix "Battery/Status/Clock status bar area flickers when dragging down"Mathias Agopian2012-05-161-13/+21
| | | | | | | | | The crop is now handled like a resize, it's latched only when we receive a new buffer in the case we have a resize in the same transaction. Bug: 6498869 Change-Id: I9f3cbbe08fb19443899461ec441c714748a4fd1a
* minor refactoring in praparation of crop fixMathias Agopian2012-05-161-28/+29
| | | | | Bug: 6498869 Change-Id: I12a6f9a9fdfd2ea1db3fbe5fc8cb443aeaedb328
* SurfaceFlinger: recompute visible regions lessJamie Gennis2012-05-141-2/+0
| | | | | | | | | This change removes some visible region recomputation that was needed to handle the SCALING_MODE_FREEZE cropping. We've changed things to use a window crop from the WindowManager instead, so this is no longer needed. Bug: 6299171 Change-Id: I32fbc2b689c985837126d8ba3d9a91e79613ffbf
* SurfaceFlinger: add a crop to the layer stateJamie Gennis2012-05-111-58/+45
| | | | | | | | | This change adds a crop rectangle specified in window coordinates to the layer state. The all window pixels outside this crop rectangle are treated as though they were fully transparent. This change also adds the plumbing necessary for WindowManager to set that crop. Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
* SurfaceFlinger: recompute visible regions moreJamie Gennis2012-05-101-0/+2
| | | | | | | | | | This change makes a change in the crop, scaling mode, transform, or buffer dimensions trigger a recomputation of the visible regions of a window. With the new cropping behavior for SCALING_MODE_FREEZE all of these can now affect the visible region. Bug: 6470541 Change-Id: I1904e47efbd708e28bf189f637d24dbef65cd41e
* SurfaceFlinger: SCALING_MODE_FREEZE cropping supportJamie Gennis2012-05-091-1/+42
| | | | | | | | | This change adss support for applying a buffer crop to layers with the SCALING_MODE_FREEZE scaling mode. These layers do not scale the image, but rather treat all pixels outside the crop rectangle as fully transparent. Change-Id: I762518e56a37aef7747f9b581df2f2589b232c49 Bug: 6299171
* SurfaceFlinger: tell SurfaceTex about filteringJamie Gennis2012-05-091-10/+11
| | | | | | | This change makes SurfaceFlinger set the filtering-enable on each layer's SurfaceTexture before querying the texture matrix to use for GLES composition. Change-Id: I40c3defd73ebf96e3cabb3bfdb1fc97f2036753a
* remove SurfaceTexture::connect()Mathias Agopian2012-04-231-4/+1
| | | | | | use BufferQueue::connect() instead Change-Id: I04aab7cf11304bf962cde38470747f3b19ddba42
* triple buffering is now controled by BoardConfig and enabled by defaultMathias Agopian2012-04-231-4/+4
| | | | | | | use TARGET_DISABLE_TRIPLE_BUFFERING := true to disable triple buffering. Change-Id: I9875d6ddefd23c1af9e51e7ee7dec1bacd1e6799
* SurfaceTexture: Fully refactored from BufferQueueDaniel Lam2012-03-131-3/+22
| | | | | | SurfaceTexture and BufferQueue are separate objects. Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
* Merge "a window could get stuck to gpu composition"Mathias Agopian2012-02-271-0/+6
|\
| * a window could get stuck to gpu compositionMathias Agopian2012-02-271-0/+6
| | | | | | | | | | | | | | | | this could happen after an orientation change. basically we need to triger a geometry-changed when the very first buffer is received Change-Id: I097e411fd6612c18725737cffccdbf6b2af3511c
* | Add tracing to various graphics components.Jamie Gennis2012-02-271-0/+11
|/ | | | | | | This change adds ATRACE call tracing to BufferQueue, SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL. Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
* fix libgui header locationMathias Agopian2012-02-271-2/+2
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* deprecate L_8, LA_88 and RGB_332 in sdkMathias Agopian2012-02-241-1/+5
| | | | | | | | | | re-add support for pixelformats L_8, LA_88 and RGB_332 in libui for backward compatibility. This may or may not fix 6058926 Bug: 6049685 Change-Id: Ic1b8b4cc994522f7fe664da64c0ef76b98bc6d53
* fix an issue in SF where we could miss some updatesMathias Agopian2012-02-231-30/+23
| | | | Change-Id: I7d350bc05d1596655baddff3deaebaba58c9bcc0
* ui freeze workaround: reenable triple buffering modeMathias Agopian2012-02-051-0/+5
| | | | | | | | | we're seeing UI freezes when window updates and composition are separated. for now we workaround this by always doing a composition after window updates on vsync. triple buffering is reenabled for performance. Change-Id: I693d705000b7452489bb0b4918fbeadb9879315c
* separate transactions from updatesMathias Agopian2012-02-011-9/+30
| | | | | | | | | | with this changes, SF transactions are handled as soon as possible but do not trigger updates. the update is delayed until the next vsync. this allows us to work much better without requiring triple-buffering. Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
* SF now synchronizes to VSYNCMathias Agopian2012-01-301-0/+5
| | | | Change-Id: Ic5e4f2ea9927ce133eef9499c03161325e9d02c5
* added a few more commands to SF's dumpsysMathias Agopian2012-01-281-2/+6
| | | | | | | | | | | --latency-clear [name] clears the latency data for the specified layer or for all layers if none is specified --list prints the list of all layers regardless of their visibility Change-Id: I7c07ae020f838c173b98ee50f3fb3e93da78acbb
* improve SurfaceFlinger dumpsysMathias Agopian2012-01-241-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | It is now possible to say: dumpsys SurfaceFlinger --latency to print latency information about all windows dumpsys SurfaceFlinger --latency window-name to print the latency stats of the specified window for instance: dumpsys SurfaceFlinger --latency SurfaceView The data consists of one line containing global stats, followed by 128 lines of tab separated timestamps in nanosecond. The first line currently contains the refresh period in nanosecond. Each 128 following line contains 3 timestamps, of respectively the app draw time, the vsync timestamp just prior the call to set and the timestamp of the call to set. Change-Id: Ib6b6da1d7e2e6ba49c282bdbc0b56a7dc203343a
* hack up frame latency measurementJamie Gennis2012-01-241-0/+29
| | | | Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-2/+2
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Fix software GL renderer.Xavier Ducrohet2011-10-211-1/+1
| | | | Change-Id: I07ab2709fa694e41aa3fcc5b9dfc809f55853ab4
* am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0Dave Burke2011-10-181-10/+2
|\ | | | | | | | | * commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac': Add a LayerScreenshot
| * Add a LayerScreenshotMathias Agopian2011-10-181-10/+2
| | | | | | | | | | | | | | | | | | | | A LayerScreenshot is a special type of layer that contains a screenshot of the screen acquired when its created. It works just like LayerDim. Make sure to call compositionComplete() after rendering into a FBO. Bug: 5446982, 5467587, 5466259 Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
* | am 23bf2505: Merge "Make sure set GL state properly" into ics-mr0Mathias Agopian2011-10-181-12/+12
|\ \ | |/ | | | | | | * commit '23bf250522b7dff9acd14c5900b66b1df9c76745': Make sure set GL state properly
| * Make sure set GL state properlyMathias Agopian2011-10-181-12/+12
| | | | | | | | | | | | | | | | | | when taking a screenshot, in particular, we could end up with stale GL state when drawing LayerDim which resulted in incortect rendering. Bug: 5467587 Change-Id: Id9fbed2843481d31063620f3662b364c7e3ac781
* | am 840b8a67: Revert "Add a LayerScreenshot"Mathias Agopian2011-10-171-2/+10
|\ \ | |/ | | | | | | * commit '840b8a678537519c27ddf2f818494eaa20a135d4': Revert "Add a LayerScreenshot"