summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* don't call hwc with non-empty layer lists for blanked displaysMathias Agopian2012-09-122-17/+20
| | | | | | | | | | | | we now make sure to take the blanked state of a display into account when we build its list of visible layers, this ensures that we won't call prepare/set with a non-empty list when the display is blanked. Possibly fixes 7075380, 7103553, 7130187, 7016215 Bug: 7075380 Change-Id: I9fdd2e73d1b7621eaeca3d4ac2ae60d9fb1b3631
* Merge "Fix emulator" into jb-mr1-devAndy McFadden2012-09-121-3/+6
|\
| * Fix emulatorAndy McFadden2012-09-121-3/+6
| | | | | | | | | | | | Emulator has no HWC. Change-Id: I7810b27034f6772823142e5bf877681db1c8ee49
* | Merge "fix typo in LayerBase::dump()" into jb-mr1-devMathias Agopian2012-09-111-1/+1
|\ \ | |/ |/|
| * fix typo in LayerBase::dump()Mathias Agopian2012-09-111-1/+1
| | | | | | | | Change-Id: Ie4861a58baed003b7ef643931d41f6be3fbfd00c
* | Reduce failure uncertaintyAndy McFadden2012-09-112-0/+13
|/ | | | | | | | | This adds a trivial workaround for a one-shot boot time crash, plus an explicit check and abort for a failure condition that currently presents as a less obvious failure. Bug: 7145521, 7147557 Change-Id: I548f6a9caa9f0bd5710aaecea0e1c6c7c8f2f281
* Reshuffle FramebufferSurfaceAndy McFadden2012-09-116-158/+202
| | | | | | | | | | 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
* SurfaceTexture: use eglWaitSyncJamie Gennis2012-09-101-5/+3
| | | | | | | | | | | This change adds a compile-option to use eglWaitSyncANDROID to ensure that texturing operations that access the current buffer of a SurfaceTexture do not occur until the buffer is completely written. It also moves this synchronization into a new SurfaceTexture method called doGLFenceWait and changes SurfaceFlinger's Layer class to use that method rather than performing its own wait on the fence. Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
* Ensure that viewport and frame are initialized.Jeff Brown2012-09-092-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | onInitializeDisplays() was posting a transaction with changes to the display projection. Unfortunately, it only set the display orientation field and left viewport and frame uninitialized. The uninitialized values flowed downstream and found themselves baked into a bogus DisplayDevice mGlobalTransform. That transform was then applied to some Rects which were turned into Regions that were them combined with other Regions. Under certain situations, the uninitialized data might have a largish value, resulting in the creation of Regions with components in excess of the Region max-value limit of 0x7ffffff (note that this is not INT_MAX). Later when performing a binary operation using the Region, the Spanner would loop indefinitely trying to figure out how to stuff a humongous region inside of a max-value region. Not content to try just once, the Spanner would continue trying again and again, pegging the CPU and hanging surface flinger during boot. Insanity soon followed. Bug: 7130713 Change-Id: I0016f0c9662185be833474c212a1dd408096ae23
* Fix display projection.Jeff Brown2012-09-071-3/+3
| | | | Change-Id: I0f253dc3759b99e05ff8344b0f513d8c289702e7
* libgui: move fence handling into ConsumerBaseJamie Gennis2012-09-061-1/+1
| | | | | | | | This change moves some common fence handling code into the base class for BufferQueue consumer classes. It also makes the ConsumerBase class initialize a buffer slot's fence with the acquire fence every time a buffer is acquired. Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
* fix a problem where all hwc layers would have the SKIP flags setMathias Agopian2012-09-052-1/+1
| | | | | | | | | the problem was that LayerBase::setPerFrameData() was always setting this flag. in fact there was no reason to do this at that point since the layer is initialized to a default state in setGeometry(). Bug: 7111259 Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
* Merge "Always reset layer acquireFenceFd after commit" into jb-mr1-devJesse Hall2012-09-051-0/+2
|\
| * Always reset layer acquireFenceFd after commitJesse Hall2012-09-051-0/+2
| | | | | | | | | | | | | | | | | | | | If SurfaceFlinger needs to refresh the screen but the dirty region is empty, it won't set the layer acquire fences, and stale file descriptors will be passed to HWC commit(). Now we make sure to clear the stale file descriptors for each layer right after commit(). Bug: 7078301 Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
* | minor cleanupMathias Agopian2012-09-041-5/+5
| | | | | | | | Change-Id: Ied80e14878e92a506930f7a5a55adde8f260ec70
* | Merge "display projection API now has a single function instead of 3" into ↵Mathias Agopian2012-09-043-36/+16
|\ \ | | | | | | | | | jb-mr1-dev
| * | display projection API now has a single function instead of 3Mathias Agopian2012-09-043-36/+16
| | | | | | | | | | | | Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
* | | the visibleRegion was never set in hwcomposerMathias Agopian2012-09-041-2/+2
|/ / | | | | | | | | Bug: 7089478 Change-Id: I13b031b23ce908d33f431a04e1cf87831b551260
* | implement display viewport and frameMathias Agopian2012-09-044-47/+125
| | | | | | | | | | | | note: viewport clipping is not implemented yet Change-Id: I7fde7c4de075d409d95c48bb20ba8ee017f6f00a
* | Merge "Add timeout when waiting for HW vsync" into jb-mr1-devAndy McFadden2012-09-041-9/+34
|\ \ | |/ |/|
| * Add timeout when waiting for HW vsyncAndy McFadden2012-08-311-9/+34
| | | | | | | | | | | | | | This way we don't get stuck if, say, the driver decides not to send us vsync events. Change-Id: I4af6358b3a1f304eaae5fd926ed3403fa1091827
* | add libsurfaceflinger_ddmconnection for PDK buildKeun young Park2012-08-315-2/+47
| | | | | | | | | | | | | | | | - the library is dlopened from libsurfaceflinger - the library built only when libnativehelper exists Bug: 7089510 Change-Id: Ib3ea1029d7e8f6e055f4b759d0bf68f5123fa8a1
* | the visible region sent to HWC was garbageMathias Agopian2012-08-315-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | If there is no hwc, call eglSwapBuffers for the main displayJesse Hall2012-08-311-2/+3
| | | | | | | | | | Bug: 7068568 Change-Id: I6a0309613fe3619d065b9047af6c3fb32b510d97
* | Merge "HWC 1.1: hook up hotplug event, use new display config queries" into ↵Jesse Hall2012-08-312-16/+110
|\ \ | |/ |/| | | jb-mr1-dev
| * HWC 1.1: hook up hotplug event, use new display config queriesJesse Hall2012-08-312-16/+110
| | | | | | | | Change-Id: I2fd359e5fc7e1948072c6bc6b6fe47ea5e8025c1
* | BufferQueue: use max acquired buffer countJamie Gennis2012-08-301-2/+1
| | | | | | | | | | | | | | | | | | This change makes BufferQueue derive the min undequeued buffer count from a max acquired buffer count that is set by the consumer. This value may be set at any time that a producer is not connected to the BufferQueue rather than at BufferQueue construction time. Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
* | Merge "BufferQueue: clean up buffer counting" into jb-mr1-devJamie Gennis2012-08-302-3/+3
|\ \
| * | BufferQueue: clean up buffer countingJamie Gennis2012-08-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This change is a clean up of some of the handling of the maximum number of buffers that are allowed at once. It mostly renames a few member variables and methods, but it includes a couple small refactorings. Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
* | | Merge "Handle new device api version encoding" into jb-mr1-devJesse Hall2012-08-301-9/+39
|\ \ \ | | |/ | |/|
| * | Handle new device api version encodingJesse Hall2012-08-291-9/+39
| |/ | | | | | | Change-Id: I3d36058bd5d31c23b3cc4a7eb5aa033b6f3c1955
* | fix a crasher when setting a display to a null surfaceMathias Agopian2012-08-291-27/+32
| | | | | | | | | | Bug: 7076303 Change-Id: I843dd4ee4a603b8ad51bc1ad14e429db15050bec
* | we were sometimes not setting fences properlyMathias Agopian2012-08-291-26/+36
|/ | | | | | | | | this would happen when the composition was handled entirely in h/w composer, in this case, we would not set the fences for any involved layers. Bug: 7049373 Change-Id: I1439dc156ce23c24041cdfbbebfe8ff4fdf790f8
* the layer list per display could contain non-visible layersMathias Agopian2012-08-281-7/+12
| | | | | | | | this happened because we didn't check that the visible region was within the bounds of the display. Bug: 7064121 Change-Id: I2e81850a3dc3d1474253520ad7f9e559c26d5a96
* we were not always clearing the screen properlyMathias Agopian2012-08-272-13/+13
| | | | Change-Id: I269dd866e965aebd9b3c4667095818202982f4a3
* Eradicate DisplayID.Mathias Agopian2012-08-2715-149/+125
| | | | | | | | DisplayDevices are now keyed of the wp<IBinder> the client uses. DisplayID has now become DisplayType which is just used to identify physical displays (as opposed to virtual displays such as wifi displays). Change-Id: I0c5968f2c902dcd699a7e0afacf833ff070c12ea
* Banish DisplayID from the SurfaceFlinger API.Jeff Brown2012-08-278-37/+42
| | | | | | | | | | | | | | | Use only display tokens in the API to refer to new displays. Don't require the caller to specify the display when creating a surface (since in general a surface could be shown on any display). This is intended to be a minimum change just to update the API. Note that SurfaceFlinger still uses DisplayID in a few places internally that might cause some features not to work properly when there are multiple displays (LayerScreenshot, for example). Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
* Added display initialization methodAndy McFadden2012-08-243-12/+43
| | | | | | | | | | The primary display device was being configured to "blank" by default, which prevented the boot animation from appearing (unless you got lucky with the hardware composer state). Bug 6975688 Change-Id: I0fa52e9e719c6e997c5725a7baf15d9718461b78
* surfaceflinger: fix display id selectionJamie Gennis2012-08-242-1/+25
| | | | | | | This change fixes display ID selection so that it never chooses negative numbers as display IDs. Change-Id: I5af1acc7b1270b371595e096b18e2a6ad250c7ba
* Revert "Added display initialization method"Andy McFadden2012-08-242-42/+11
| | | | | | | | Something doesn't seem right (again). This reverts commit 53ade0853ca003c9e917b5e7d34e1b1338d7b87d. Change-Id: Id5786997ca9dd2a447363e8ac95213ea37468504
* Added display initialization methodAndy McFadden2012-08-242-11/+42
| | | | | | | | | | The primary display device was being configured to "blank" by default, which prevented the boot animation from appearing (unless you got lucky with the hardware composer state). Bug 6975688 (This reverts an earlier revert.)
* teach HWC about multiple displaysMathias Agopian2012-08-233-130/+140
| | | | Change-Id: I5e72a83d419a729835cb0e1ec45557b4d3fb56b1
* remove support for HWC < 1.0Mathias Agopian2012-08-232-287/+60
| | | | Change-Id: If7e676a6e3524afeb9af3875125d2131d95db38b
* HWComposer now has its own concept of display IDsMathias Agopian2012-08-235-113/+169
| | | | | | | | | | | | 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
* Merge "simplify further vsync handling" into jb-mr1-devMathias Agopian2012-08-232-85/+78
|\
| * simplify further vsync handlingMathias Agopian2012-08-232-85/+78
| | | | | | | | | | | | | | | | | | | | | | | | - we now clean-up "dead" connection in the main loop, this entirely avoid the problem with the side effects of releasing strong references. We now only hold on to strong reference for the connection we will signal. - also simplify how we build the list of "ready" connections, by only adding them to the list when we did receive a vsync event Change-Id: I2a84da431320a2af8e8a93e07622a1d258236f43
* | Merge "Update for cleanups in hwc interface" into jb-mr1-devJesse Hall2012-08-232-18/+35
|\ \ | |/ |/|
| * Update for cleanups in hwc interfaceJesse Hall2012-08-222-18/+35
| | | | | | | | Change-Id: I363fd8b085167a1af6c14b68012bda5c62bfe59f
* | Merge "Revert "Added display initialization method"" into jb-mr1-devRamanan Rajeswaran2012-08-222-42/+11
|\ \ | |/ |/|
| * Revert "Added display initialization method"Ramanan Rajeswaran2012-08-222-42/+11
| | | | | | | | | | | | This reverts commit 3f3956236aac97b6aa25fa89f0983d5e9d065fdb Change-Id: Ia2a15d9a5db88add6019edf9d955cef1f73d432d