summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware/HWComposer.h
Commit message (Collapse)AuthorAgeFilesLines
* Reset compositionType to HWC_FRAMEBUFFER before calling prepare()Mathias Agopian2012-11-141-0/+1
| | | | | | Honor the documentation. this broke in JB-MR1. Change-Id: I841a93b409fc940374bc748c4e143d82a192669c
* fix dumpsys Layer name when using multiple displaysMathias Agopian2012-10-081-2/+1
| | | | | Bug: 7288401 Change-Id: I14beeef58fac5270cef3b611e18c163060efe6c3
* make sure we don't call into the HWC HAL when not neededMathias Agopian2012-10-041-4/+9
| | | | | | | | | when enabling/disabling vsync we now make sure to not call into the HAL if the state wouldn't change. Bug: 7274951 Change-Id: Ie24a6d68888a51b577acf9c2a973d85437cbacaf
* Fix crashes after HDMI disconnectAndy McFadden2012-10-041-0/+3
| | | | | | | | | | | | | | | | | The display was being removed from SurfaceFlinger's list before we had a chance to reset HWComposer's layer list, so we were passing stale data into the hardware composer (which has its own per-display data). This resulted in "invalid gralloc handle" complaints. We now clear the layer list immediately after removing the display. The display was being removed while its EGLSurface was still "current", resulting in "cancelBuffer: BufferQueue has been abandoned" complaints. We now call makeCurrent on the primary display before removing the external display. Bug 7274254 Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4
* Pass display arg to blank/unblankAndy McFadden2012-09-281-2/+2
| | | | | | | | This allows us to blank and unblank displays other than the built-in display (e.g. HDMI). Bug: 7240511 Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
* we now correctly set-up connected screens during bootMathias Agopian2012-09-201-1/+3
| | | | Change-Id: Ie8b1a3b97ad1821cc970e43abe96c8cec7135b66
* We now report hotplug events to the frameworkMathias Agopian2012-09-201-0/+1
| | | | Change-Id: I2d6b7787d39e5929485a551e4982498c5053c211
* one more step toward HDMI supportMathias Agopian2012-09-201-1/+1
| | | | | | | | | | | | getDisplayInfo() now returns proper information for HWC managed displays. hotplug is sitll not supported; so this is not fully correct as the information returned will be bogus if the HDMI screen is not plugged in. Bug: 7191563 Change-Id: If55d8e829fae0443571548155007f486cdf9bc9f
* add support hwc 1.1Mathias Agopian2012-09-171-3/+17
| | | | | | Bug: 7124069 Change-Id: I53d705105c4ad8954d3f50ee4f4c8b7ec936b871
* refactor things a bitMathias Agopian2012-09-171-0/+4
| | | | | | | | - decouple GL and main display initialization - ensure that each "supported" display has its own FramebufferSurface - onScreenAcquired/Released now takes a display Change-Id: If34a05f3dea40f6c79db77f4dde283a2580daac4
* Initialize new HWC 1.2 fieldsJesse Hall2012-09-121-4/+4
| | | | | | Also rename resolution* to width/height. Change-Id: Ia5f0c50d3f0a349160f314a3257c3b985e13ef1d
* Reshuffle FramebufferSurfaceAndy McFadden2012-09-111-7/+21
| | | | | | | | | | FramebufferSurface no longer speaks directly to the FB HAL. Now everything goes through HWComposer (which may or may not be connected to a hardware composer). Added display index arg to some query methods. Change-Id: Id3e157d2d4e3555d33afbb703e518b6e92e2d6d5
* the visible region sent to HWC was garbageMathias Agopian2012-08-311-0/+1
| | | | | | | | | | | | | | | we used to have a visibleRegion object per layer, but now it's per screen; so at somepoint the code got changed to calculate the per-screen visible region on the stack and that's what got passed to HWC. we're now setting the visibleRegionScreen at each frame and freeing at after the HWC set() call. We use the underlaying SharedBuffer so that in most cases we don't have to allocate, free or copy memory around. Bug: 7089478 Change-Id: I24fa556c76613a225d9fe7a6c6b727bb476144d8
* HWC 1.1: hook up hotplug event, use new display config queriesJesse Hall2012-08-311-3/+7
| | | | Change-Id: I2fd359e5fc7e1948072c6bc6b6fe47ea5e8025c1
* teach HWC about multiple displaysMathias Agopian2012-08-231-6/+8
| | | | Change-Id: I5e72a83d419a729835cb0e1ec45557b4d3fb56b1
* remove support for HWC < 1.0Mathias Agopian2012-08-231-1/+1
| | | | Change-Id: If7e676a6e3524afeb9af3875125d2131d95db38b
* HWComposer now has its own concept of display IDsMathias Agopian2012-08-231-12/+33
| | | | | | | | | | | | HWComposer can now create IDs representing a display it can deal with. IDs MAIN and HDMI are reserved. SurfaceFlinger associate HWComposer IDs with a DisplayDevice and uses that when it talks to HWComposer. A DisplayDevice doesn't have to have a HWComposer ID, in that case it just can't use h/w composer composition. Change-Id: Iec3d7ac92e0c22bf975052ae2847402f58bade71
* Update for cleanups in hwc interfaceJesse Hall2012-08-221-2/+3
| | | | Change-Id: I363fd8b085167a1af6c14b68012bda5c62bfe59f
* Pass the correct number of displays based on HWC versionJesse Hall2012-08-221-3/+2
| | | | Change-Id: I27372f5d3102ad56f6d67722d631ae18d37f8330
* xdpi / ydpi were reported as 0Mathias Agopian2012-08-131-1/+10
| | | | | Bug: 6975723 Change-Id: Ia7fa37ec11e2308804f5034959a37e508d292d31
* Add a display parameter to HWComposer where neededMathias Agopian2012-08-101-9/+14
| | | | | | | | - also replace C casts with C++ casts - only the interface is changed, HWComposer still doesn't fully handle multiple displays Change-Id: I48eb89bff2edb76bf1d4d41f46802b9b2a7166a8
* Changes to support multi-display HWCJesse Hall2012-08-071-2/+7
| | | | Change-Id: I07efff54f2980dcb013935747b03e099b8f1181b
* surfaceflinger: refactor FrambufferSurfaceJamie Gennis2012-08-061-0/+1
| | | | | | | | This change refactors the FramebufferSurface class to inherit from the new ConsumerBase class. Bug: 6620200 Change-Id: I46ec942ddb019658e3c5e79465548b171b2261f2
* remove a dependency of DisplayDevice on the refresh rateMathias Agopian2012-08-041-2/+2
| | | | | | this remove a dependency (not all) on FramebufferSurface Change-Id: Ie07ce70760cdcedfb41b5b41bea8da45637bf474
* cleanups in preparation of bigger changesMathias Agopian2012-08-021-0/+6
| | | | | | | | | | | - 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
* Move eglSwapBuffers out of HWComposerJesse Hall2012-07-301-8/+1
| | | | | | | | | | | | | Commit 8630320 moved the eglSwapBuffers fallback (for devices with no HWC implementation) from DisplayHardware to HWComposer. But HWComposer only knows about the framebuffer EGL display and surface handles if there is a HWC, so it was always passing bogus handles. This change moves the eglSwapBuffers fallback up to SurfaceFlinger, which has access to the framebuffer EGL handles. Bug: 6886613 Change-Id: Iad3f5ff7c90ee48d7053999e6a4548d6794b6ebd
* SurfaceFlinger cleanupMathias Agopian2012-07-241-2/+6
| | | | | | | mostly refactored SurfaceFlinger.h, but also removed dead code. cleaned-up a few includes as well. Change-Id: Ib15f4ffe567912b61ee98aa076c6a283b72811b5
* surfaceflinger: call into hardware composer to blank screenColin Cross2012-07-131-1/+4
| | | | | | | | | Call into the new HWC blank operation to blank or unblank the screen. Legacy systems may have already blanked the screen via early suspend, and can choose to not implement the blank operation in their hardware composer implementation. Change-Id: Ib403c8c0e36367a2cfef3e1d124872fcfeb9e7cb
* Pass fence to HWC on first use of bufferJesse Hall2012-06-301-0/+1
| | | | | | Also do a CPU-wait on the fence before using it for GL composition. Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
* Transfer HWC release fences to BufferQueueJesse Hall2012-06-211-0/+1
| | | | | | | | | | | | | | | | | | 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
* Add support for HWC_DEVICE_API_VERSION_1_0Jesse Hall2012-06-141-17/+17
| | | | | | | | The acquire and release fences aren't yet used; this is just support for the new version and temporary backwards compatibility for older versions. Change-Id: Ia5ccc05a97c86f649042b9a35e11042fa0187e84
* refactor HWComposer to break dependency with the HAL headersMathias Agopian2012-06-141-22/+109
| | | | | | | | | | | | | 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
* set vsync power hintMathias Agopian2012-04-261-1/+1
| | | | Change-Id: I28c2faf9ff584df3e74392712971cbcf75eb9e98
* Added vsync debugging information in dumpsys logMathias Agopian2012-04-101-0/+1
| | | | Change-Id: I20ef05a73d89caaf6a70dc9ca25ada6e6a1f6ff9
* VSYNC handling cleanupMathias Agopian2012-04-081-49/+5
| | | | Change-Id: I1376bf864c4e03c11fb6d1333a8b7cfdda08c9e4
* SurfaceFlinger now uses the new VSYNC HAL API.Mathias Agopian2012-04-041-6/+93
| | | | | | | If h/w composer doesn't support vsync (version < 0.3) we "fake" it with a timer. Change-Id: I1e3be79f43c9631d1293ad7d6cf52f9bfc42d65b
* Add HWC vsync hook. Currently unused.Mathias Agopian2012-04-031-1/+13
| | | | Change-Id: I849d56f375813a044c5e2d0b25f791476a60fa01
* fix transition from full overlays to fbMathias Agopian2011-09-201-0/+5
| | | | | | | | | | we need to clear the whole framebuffer in that situation because we can't trust the content of the FB when partial (fb preserving) updates are used. Bug: 5318492 Change-Id: I3f0e01b0fb665a34e44d88ad9f0f54a5d990060b
* Improve SF dumpsys output wrt HWCMathias Agopian2011-09-091-1/+4
| | | | Change-Id: Ibdb7930fa3b521bfd3f44750ed98cfd75f9a01fe
* fix a bug that caused the off animation to not show sometimesMathias Agopian2011-09-021-0/+3
| | | | | | | | | this happened when the overlays were in use, since the animation is rendered in the FB and the FB is not used. we now have a way to turn hwc off temporarily. Change-Id: I3385f0c25bb9cc91948e7b26e7cd31ed18c36ace
* Add a h/w composer API to allow the HAL to trigger a redrawMathias Agopian2011-08-011-1/+13
| | | | | | | | This is useful in various situations, for instance if the HAL wants to change its compositing strategy. Bug: 4488017 Change-Id: I5afc14e5917c6db7926d7417d48677d5aba50caa
* dump HWC state in dumpsysMathias Agopian2010-09-231-0/+5
| | | | Change-Id: Ifbb38ca1ac9685776250e01c8d02021b35af72cf
* surfaceflinger: give hwcomposer a chance to release buffersAntti Hatala2010-09-091-0/+2
| | | | Change-Id: I605fa779702022865dd58df3b36f37c2644ade36
* Fix a couple issues with the new hwcomposer HALMathias Agopian2010-08-121-5/+3
| | | | | | | | - we now clear the framebuffer upon request from the HAL - the HAL list size could get out of sync with reality - there was also an issue where sometime we could run past the list Change-Id: Ic3a34314aed24181f2d8cc787096af83c046ef27
* call into hwcomposer HAL when presentMathias Agopian2010-08-111-0/+70
Change-Id: I70f31c69a9436a43860e78977442863ecba6d27b