This change adds support for the EGL_ANDROID_native_fence_sync extension to the
Android EGL layer. It also fixes a couple minor issues with the extension spec.
Change-Id: Ic8829d21f37b701f33aa9c72c3d25e88e03fa3cd
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
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
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
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
This change updates the extension spec to refer to generic "native fence sync
objects" rather than "Android fence sync objects."
Change-Id: I15a79f08571586431845b54c58c8420b652f40ef
- the library is dlopened from libsurfaceflinger
- the library built only when libnativehelper exists
Bug: 7089510
Change-Id: Ib3ea1029d7e8f6e055f4b759d0bf68f5123fa8a1
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
We used to keep the bounds of the region as a
separate rectangle. Instead we now store it as the last
element of the Vector<> of Rects.
This has the benefit of being slightly more efficient when
copying regions and reduces the overhead of small regions,
but more importantly will allow us to export the underlaying
SharedBuffer (eventually).
Change-Id: I80790e4fb1a09a747a5616000cfef852ac4ce9e9
since regions are copy-on-write, this prevents to
duplicate the region entirely and offseting by 0,0 is
fairly common.
Change-Id: I9b8c286315a2e00dda01c2456397d72b5e12006b
This change adds some infrastructure for testing the BufferQueue class. It
also includes a test that tests the new check in BufferQueue::acquireBuffer
that prevents the consumer from acquiring more than one buffer beyond the max
acquired buffer count that was set.
Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
This change disables the CpuConsumer tests because they require a Gralloc
format that is not supported on all devices.
Change-Id: Ifaa618062c1dae53d9fcb9e16ba92c480d3dbd0c
This change adds an error check to ensure that consumers don't acquire more
buffers than the maximum that they set.
Change-Id: I026643564bde52732e4ee6146972b207ddbbba77
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
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