summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove files that moved to frameworks/nativeMathias Agopian2012-03-071-657/+0
| | | | Change-Id: I140d291e520097b1148930f736823650e08488f7
* 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"
| * Revert "Add a LayerScreenshot"Mathias Agopian2011-10-161-2/+10
| | | | | | | | This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
* | Merge branch 'master' of ssh://android-git:29418/platform/frameworks/baseElliott Hughes2011-10-171-31/+3
|\ \ | |/ |/|
| * SurfaceFlinger: Remove display freezing codeJamie Gennis2011-10-141-31/+3
| | | | | | | | | | | | | | This change removes the dead code from SurfaceFlinger that resulted from disabling support for freezing the display. Change-Id: I4e5ff00c94b4c7a79af2f65c9850c135210068ed
* | Add a LayerScreenshotMathias Agopian2011-10-141-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. Bug: 5446982 Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
* SurfaceFlinger: screenshots w/ protected buffersJamie Gennis2011-10-071-12/+21
| | | | | | | | | This change modifies SurfaceFlinger's screenshot behavior when a layer with a protected buffer is visible. The previous behavior was to simply fail the screenshot. The new behavior is to render the screenshot using a placeholder texture where the protected buffer would have been. Change-Id: I5e50cb2f3b31b2ea81cfe291c9b4a42e9ee71874
* Merge changes Ib302d79e,Ib4ee085fJamie Gennis2011-09-271-0/+5
|\ | | | | | | | | | | * changes: SurfaceFlinger: set layer names on SurfaceTextures SurfaceTexture: add name support
| * SurfaceFlinger: set layer names on SurfaceTexturesJamie Gennis2011-09-221-0/+5
| | | | | | | | | | | | | | This change sets the SurfaceTexture name string to match that of the layer to which it belongs. Change-Id: Ib302d79e916a36ab1e54cb9ff477c3b857bd957b
| * SurfaceFlinger: fix isOpaque check in lockPageFlipJamie Gennis2011-09-141-10/+10
| | | | | | | | | | | | | | | | | | This change fixes an issue where Layer::isOpaque was being called in lockPageFlip to get the opaqueness for the new buffer before mActiveBuffer was updated. Bug: 5321313 Change-Id: Ibb5d7d3f4e9a2b1448e117a484a0d9f9ca5fc9de
* | Merge "SurfaceFlinger: fix setting default buffer size" into ics-factoryromJamie Gennis2011-09-271-4/+5
|\ \
| * | SurfaceFlinger: fix setting default buffer sizeJamie Gennis2011-09-261-4/+5
| |/ | | | | | | | | | | | | | | | | This change makes SurfaceFlinger update a SurfaceTextureLayer's default buffer size in response to a window resize even if the Layer is in fixed size mode. Change-Id: I3871c8f19a045d03904d1284390cad7659be71ff Bug: 5366426
* | Merge "(DO NOT MERGE) SurfaceFlinger: fix isOpaque check in lockPageFlip" ↵Jamie Gennis2011-09-261-10/+10
|\ \ | | | | | | | | | into ics-factoryrom
| * | (DO NOT MERGE) SurfaceFlinger: fix isOpaque check in lockPageFlipJamie Gennis2011-09-161-10/+10
| |/ | | | | | | | | | | | | | | | | This change fixes an issue where Layer::isOpaque was being called in lockPageFlip to get the opaqueness for the new buffer before mActiveBuffer was updated. Bug: 5321313 Change-Id: Ibb5d7d3f4e9a2b1448e117a484a0d9f9ca5fc9de
* | SurfaceFlinger: fix the transform hintJamie Gennis2011-09-241-1/+1
|/ | | | | | | | | This change fixes the transform hint to use only the global display transform rather than incorporating the transient layer-specific transform used during animations. Bug: 5366891 Change-Id: I5408dcd3f4771d010953e8a696a484c835bfe81e
* fix display artifacts in preview screen in timelapse video modeMathias Agopian2011-08-301-19/+34
| | | | | | | | | | | | | | | | | We were not updating the h/w composer state when the buffer size changed. We also didn't update the h/w composer state when the transformation matrix changed (which is related to the above issue, since it would probably change when the buffer size changes). Also moved updating the crop to setGeometry(), since we decided that the "crop" change requires the GEOMETRY_CHANGED flag (ie: not need to do this every frame) Bug: 5238473 Change-Id: Ia7b47e145b48581b568d89d9aa2c14ff778be862
* Merge "SurfaceFlinger: use the HWC gralloc usage bit"Jamie Gennis2011-08-241-0/+1
|\
| * SurfaceFlinger: use the HWC gralloc usage bitJamie Gennis2011-08-221-0/+1
| | | | | | | | | | | | | | | | This change makes SurfaceFlinger always use the GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be passed to the HWComposer. Change-Id: I70362a8ede2b359fb2046853f85149d597465817
* | Merge changes I14e03939,I9aafe6f2Mathias Agopian2011-08-231-2/+13
|\ \ | | | | | | | | | | | | | | | * changes: Fix an issue where Surface::lock() would never update the output region Add a debug option to turn the "transformation hint" off
| * | Add a debug option to turn the "transformation hint" offMathias Agopian2011-08-231-2/+13
| |/ | | | | | | | | | | | | | | transformation hint is disabled with: adb shell service call SurfaceFlinger 1009 i32 1 Change-Id: I9aafe6f280f88ce41569ed69a06dc522b10e3a88
* | Minor cleanupMathias Agopian2011-08-231-8/+5
|/ | | | Change-Id: Ic042043c54631b5a5c74d20136addb2c08515ea9
* give the proper orientation to the h/w composer HALMathias Agopian2011-08-181-3/+2
| | | | | | | | | | | | we were using the "orientation" value instead of the real transform, which may contain arbitrary rotations for instance, and in some case ended up with a final "orientation" that looked valid, but wasn't. this fixes a problem on devices with a h/w composer hal where the rotation animation looked weird. Change-Id: I4be8a2a1bde49c33456fcf5c8d87ab515c216763
* SurfaceTexture: fix queues-to-composerJamie Gennis2011-08-171-0/+5
| | | | | | | | | | | This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of Surface and SurfaceTextureClient. Surface now uses the inherited SurfaceTextureClient implementation of this query. SurfaceTextureClient now queries SurfaceFlinger to determine whether buffers that are queued to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to some other process). Change-Id: Iff187e72f30d454229f07f896b438198978270a8
* fix an orientation change drawing artifact.Mathias Agopian2011-08-121-3/+2
| | | | | | | | | | | a wrong orientation would be briefly shown when rotation the screen. this happened when the window manager set a custom transformation and the h/w composer was used. the custom transformation was applied twice in that case. Bug: 5037522 Change-Id: Ic1f87b63cd843f4475e4265d1624463825d775c4
* SurfaceFlinger doesn't rely on having a custom RefBase destructorMathias Agopian2011-08-111-6/+10
| | | | | we just use a message to the main thread to destroy our GLES state.
* improve dumpsys SurfaceFlinger outputMathias Agopian2011-08-081-1/+1
| | | | | | we now output the handle and size of all buffers of each layer. Change-Id: I8d011ee4ae9199f4198bd07bed770ec3bcf02986
* fix a crasher in surfaceflingerMathias Agopian2011-08-021-2/+7
| | | | | | | this would happen if being told to draw before a buffer was available. Change-Id: I46d121c73e883078cdbf952063e38b0076f79038
* update HWC data structures even when a layer is marked for SKIPMathias Agopian2011-08-021-27/+7
| | | | Change-Id: I16bcf44cd617814a14a795429bde2f39f411077d
* SurfaceFlinger: abandon Layer SurfaceTexturesJamie Gennis2011-07-301-0/+1
| | | | | | | | | | | | This change makes the Layer::onRemoved method call SurfaceTextures::abandon on the layer's SurfaceTexture. This will cause all client-initiated operations on the SurfaceTexture to fail. In particular, this will result in an error on the client side, rather than a deadlock when removing a layer that used a SurfaceTexture in synchronous mode. Change-Id: I14014d00369f29560a21b606831edee432bb8867 Bug: 5020874
* SurfaceFlinger: fix a layer occlusion bugJamie Gennis2011-07-281-4/+6
| | | | | | | | | | | | | This change fixes a bug where the window visibility would be computed before any buffers were available, causing the window to be treated as non-opaque. When the first buffer arrived, if both mCurrentOpacity and the opacity determined by the buffer's format were 'opaque', a recomputation of the opacity would not be done, and the window would continue to be treated as non-opaque. SurfaceFlinger could then unnecessarily draw fully occluded layers. Change-Id: I2b95da2f4b50e68d50fc5afd8b772e26e62f58d6 Bug: 5057122
* remove dead code and member variables.Mathias Agopian2011-07-251-2/+11
| | | | | | also fix some comments and improve debugging logs. Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
* implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an ↵Mathias Agopian2011-07-191-13/+18
| | | | | | | optimal buffer orientation" Bug: 4487161 Change-Id: I883f34efe542c2a566d04966f873374f40c50092