summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/SurfaceFlinger.h
Commit message (Collapse)AuthorAgeFilesLines
* SurfaceFlinger: Limit to 4k LayersDan Stoza2015-04-301-1/+3
| | | | | | | | | Sets a limit of 4k Layers which SurfaceFlinger will allow to be in existence at any given time. An attempt to create Layers in excess of this limit will fail with NO_MEMORY. Bug: 20674586 Change-Id: I2dfaf59643d826f982b2fa44e8a9ed643176d972
* SurfaceFlinger: Pass surface damage to HWCDan Stoza2015-04-151-0/+1
| | | | | | | | | Passes the surface damage from the incoming SurfaceFlingerConsumer BufferQueue down to the hardware composer HAL interface, if the HWC version number is 1.5 or greater. Bug: 11239309 Change-Id: Ic4305210593874a8d6deba3319055b2b8c57e926
* SurfaceFlinger: Do less work when using PTSDan Stoza2014-11-171-5/+10
| | | | | | | | | | | | | | | | Currently, SurfaceFlinger is very dumb about how it handles buffer updates at less than 60fps. If there is a new frame pending, but its timestamp says not to present it until later SurfaceFlinger will wake up every vsync until it is time to present it. Even worse, if SurfaceFlinger has woken up but nothing has changed, it still goes through the entire composition process. This change (mostly) fixes that inefficiency. SurfaceFlinger will still wake up every refresh period while there is a new frame pending, but if there is no work to do, it will almost immediately go back to sleep. Bug: 18111837 Change-Id: I7825bacd37f40bf26edcc6a5e0f051dce45291fb
* When eglMakeCurrent fails we need to fix the egl state.Michael Lentine2014-10-011-1/+4
| | | | | | Bug: 16676660 Change-Id: Ie7bee9c78378b9e9206060444319e6ee35e1ab74
* surfaceflinger: add getDisplayStats() methodLajos Molnar2014-09-181-0/+2
| | | | | | | | This is used by media service to schedule video frames at the proper time, based on precise vsync timings. Bug: 14659809 Change-Id: I1a90603f3dc09dca9aa4f90a3aa845fab56e0a5e
* Add rotation to surfaceflingers screen cap.Riley Andrews2014-09-091-3/+3
| | | | | | | | + This is needed so that activity manager does not have to do cpu side rotations when capturing recents thumbnails. Change-Id: If998008e675ad01305db8399fd643cf4608b7025
* Have VirtualDisplays send SF resize messages when resizingMichael Wright2014-07-301-0/+1
| | | | Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f
* Modified SurfaceFlinger to implment setActiveConfig and getActiveConfig.Michael Lentine2014-07-291-0/+2
| | | | | | | | This can be used to change the current display mode of the device. Change-Id: Icdc3fb58389b861dc77b68102083da6f7a96eccb Tested: None (cherry picked from commit 2651fa94635a96d653038fb389a0dd827338f8d3)
* Turn on support for async cursor update in surfaceflinger.Riley Andrews2014-07-281-0/+2
| | | | | | | 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
* surfaceflinger: Replace blank/unblank with setPowerModePrashant Malani2014-06-051-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* SurfaceFlinger: Add sourceCrop to screenshotDan Stoza2014-05-231-3/+3
| | | | | | | | | 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
* Enable changing display configurationDan Stoza2014-05-051-1/+4
| | | | | | | | This allows querying and switching display device configurations through the ISurfaceComposer/SurfaceComposerClient interface. Bug: 14320401 Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
* Adding render stats APIs to UiAutomation (framework native).Svetoslav2014-04-101-0/+2
| | | | | | bug:12927198 Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
* Remove deprecated BufferQueue constructorDan Stoza2014-03-181-1/+1
| | | | | Bug: 13415624 Change-Id: I9fe15e45daa7351f1db34ee75bfee6f19cb347d3
* Revert "Implement video plane layer"Wonsik Kim2014-03-171-4/+0
| | | | | | This reverts commit f837c93a1b392dbc4f7099d0c4fb723e32ca438e. Change-Id: I6a1aa9ad0aca023267dc53d19c950b1535123ca7
* Implement video plane layerWonsik Kim2014-02-271-0/+4
| | | | | Binding with video source will follow. Change-Id: Ic14e9757f5b61f4055cbeda47c1bafae0a621abb
* Allow disabling layer rotation during screenshotsDan Stoza2014-02-141-3/+5
| | | | | | | | 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
* am 4c37d088: am 6c7dcfa9: am 662d3134: Merge "Move EGLConfig selection to ↵Jesse Hall2014-01-031-6/+0
|\ | | | | | | | | | | | | RenderEngine" * commit '4c37d0886ca06c290e205cad2798406361bbbf53': Move EGLConfig selection to RenderEngine
| * Move EGLConfig selection to RenderEngineJesse Hall2013-12-231-6/+0
| | | | | | | | | | | | Bug: 12230666 Change-Id: I8d1111a7e0fd9d9e2525e6a80da8ce46d7dd085d Signed-off-by: Jesse Hall <jessehall@google.com>
* | am bbfbe93c: am 0a645cc5: SurfaceFlinger: give SF its own vsync phaseJamie Gennis2013-10-151-0/+1
|\ \ | |/ | | | | | | * commit 'bbfbe93c0d2d6c7818e23219d2925f02ddf5bd92': SurfaceFlinger: give SF its own vsync phase
| * SurfaceFlinger: give SF its own vsync phaseJamie Gennis2013-10-151-0/+1
| | | | | | | | | | | | | | | | This change allows SurfaceFlinger to run at a different vsync phase offset from that used by external listeners. Bug: 11175503 Change-Id: I561c53a5659fa6dc1e3e4ae30340f3c1a6adceb4
* | am 47c772e8: am d1700756: SurfaceFlinger: Add EventControlThreadJamie Gennis2013-10-151-1/+2
|\ \ | |/ | | | | | | * commit '47c772e8ec28eb0a3df9c8edd252f292c7c8e152': SurfaceFlinger: Add EventControlThread
| * SurfaceFlinger: Add EventControlThreadJamie Gennis2013-10-151-1/+2
| | | | | | | | | | | | | | | | | | | | 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
* | resolved conflicts for merge of e94d204a to masterJesse Hall2013-10-151-2/+3
|\ \ | |/ | | | | Change-Id: Idb2030dbb25a2e4b972492587558b25a305e68bd
| * Disable hardware vsync when blanking the screenJesse Hall2013-10-141-2/+3
| | | | | | | | | | Bug: 11220224 Change-Id: I99d0a42e1a6bb0aaf89706f6d100e9ef2a5deaa4
* | resolved conflicts for merge of 790b6d09 to masterJamie Gennis2013-10-081-0/+12
|\ \ | |/
| * SurfaceFlinger: SW-based vsync eventsJamie Gennis2013-10-071-0/+12
| | | | | | | | | | | | | | | | | | | | 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
* | am 92d7c3ee: am b65f32eb: Fix two EGLConfig selection bugsJesse Hall2013-10-011-2/+2
|\ \ | |/ | | | | | | * commit '92d7c3ee03109cf2d465a103b828b7d7d3ee9848': Fix two EGLConfig selection bugs
| * Fix two EGLConfig selection bugsJesse Hall2013-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am 754bad45: am d555684c: reinstate black-screenshot debugging codeMathias Agopian2013-09-201-1/+1
|\ \ | |/ | | | | | | * commit '754bad4534e9a2de8b4e3ecbe097993c71246f91': reinstate black-screenshot debugging code
| * reinstate black-screenshot debugging codeMathias Agopian2013-09-191-1/+1
| | | | | | | | | | | | | | turned off by default. Bug: 10809349 Change-Id: I3e6b8c7860e6b0e122b8f07de4020967cd1f005c
* | am f589dd29: am e2a3e872: Merge "Fix GLES context version selection" into ↵Mathias Agopian2013-09-201-1/+2
|\ \ | |/ | | | | | | | | | | klp-dev * commit 'f589dd2915587994d3dd36eff2191962fe0b71c0': Fix GLES context version selection
| * Fix GLES context version selectionMathias Agopian2013-09-181-1/+2
| | | | | | | | | | | | | | | | 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
* | Add API for pushing color transforms to SurfaceFlingerAlan Viverette2013-09-121-0/+4
|/ | | | | BUG: 9057596 Change-Id: Iea0953366eac875b7968897a75472c25a137edb5
* color blindness enhancementMathias Agopian2013-09-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* SurfaceFlinger now runs in the process's main threadMathias Agopian2013-08-201-8/+8
| | | | | | | | | | it used to spawn its own thread and return the main thread to the binder thread pool -- this was confusing the naming of things in the kernel. Bug: 10331839 Change-Id: I2d13a6d73409a38109300fcbe6a04b4c41cb5d00
* Use new HWC display type/count constants.Jesse Hall2013-08-161-1/+1
| | | | Change-Id: I774d0c68906ac6dc69268f708c30a6b0868b8816
* SurfaceFlinger now uses GLES 2.x when availableMathias Agopian2013-08-131-22/+15
| | | | | | Bug: 8679321 Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
* Add ISurfaceComposer::destroyDisplayJesse Hall2013-08-081-0/+1
| | | | | Bug: 10191053 Change-Id: Ia89286f95421344a60ffedaaca5825c4e3cd7f9e
* remove support for glReadPixels screenshot pathMathias Agopian2013-08-061-3/+2
| | | | | | | this was only needed on some chipset we're not supporting in KLP. Change-Id: I2e8fc07f135030bd61d2e241a8e426f1a4316425
* surfaceflinger: add frame duration loggingJamie Gennis2013-07-231-0/+6
| | | | Change-Id: Ib414a45e7e191f23a2726cbbbeb606e9ce68a3b5
* Merge "Refactor SF. Move all GL operations in their own class."Mathias Agopian2013-07-081-22/+7
|\
| * Refactor SF. Move all GL operations in their own class.Mathias Agopian2013-07-031-22/+7
| | | | | | | | | | | | | | | | | | | | this is the first step to add support for GLES 2.x, this change breaks the dependency of SF on GLES 1.x by moving all operation into their own class. Bug: 8679321 Change-Id: I0d2741eca2cefe67dfd9cf837cac10c4d126928b
* | Debug code for detecting all black pixels screenshotsMathias Agopian2013-07-081-0/+3
|/ | | | | Bug: 9120292 Change-Id: If60db32524db973bb1f905ba3cb415c2a1cd7e71
* Prevent opaque windows from making framebuffer translucentJesse Hall2013-05-241-0/+13
| | | | | | | | | To keep the code readable now that we have four different texenv configurations, this change separates the decisions about what configuration to use from the GL calls to set up the configuration. Bug: 8963244 Change-Id: Ia07a306a7809ba8f93493d0160ccbd509e948581
* make all libsurfaceflinger and libsensorservice symbols's visibility hiddenMathias Agopian2013-05-091-2/+2
| | | | | | | we only export the main entry-point. this saves about 150KB. Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
* use a Framebuffer Object to render all screenshotsMathias Agopian2013-04-291-8/+2
| | | | | | | | | this allows us to render into a buffer with a pixelformat of our own choice; this is much faster on all platform. Bug: 8582615 Change-Id: I61298fc8e43fa6f92044c5123955cb5c7897dab7
* clean-up/simplify all dump() APIsMathias Agopian2013-04-221-4/+5
| | | | | | | remove the scratch buffer parameter and use String8::appendFormat() instead. Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
* Improve screenshot performance on some devices (DO NOT MERGE)Mathias Agopian2013-04-111-0/+6
| | | | | | | | | | | | this affects devices that need a glReadPixels(). We use a FBO instead of a GlConsumer as an intermediate render target, this saves 2 calls to eglMakeCurrent(). On Galaxy Nexus this allows us to go from ~135ms to ~35ms for recent's screenshots. Bug: 8582615 Change-Id: I6b25291ecc235f1927579bbb2db3c731e985c6e8
* Clean up HWC state when releasing a DisplayDeviceJesse Hall2013-03-271-3/+3
| | | | | | | | | | DisplayDevices can be released when DisplayManager removes them from the display list, or (for virtual displays) when the surface is set to NULL. We were only cleaning up HWC resources associated with the display in the first case. Bug: 8384764 Change-Id: Id3d226dd7178fbe6d0a2ac4e2660b864ee073de3