Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b96661ff authored by Mathias Agopian's avatar Mathias Agopian
Browse files

BufferQueueProducer: queueBuffer() CPU throttling only in async mode

BufferQueueProducer throttles an EGL client in queueBuffer() until
the GPU has finished the previous frame. This behavior was intended
to solve some issues with "swap interval 0" (aka async mode) but
was performed all the time.

In turn, is prevented a "well behaved" applications from throttling
itself, because it would be throttled by BufferQueueProduced
before it could get a chance to do so. From the app perspective,
eglSwapBuffers() would block.

Here we perform the throttling only in async mode, as was the
original intention. Applications that don't pace themselves,
will still be blocked in dequeueBuffer() eventually, albeit,
not necessarily in eglSwapBuffers().

Fix: 359252619
Test: manually tested on pixel8 using AGI and filament sample app
Flag: com.android.graphics.libgui.flags.bq_producer_throttles_only_async_mode
Change-Id: Ie73848fbf609061bb6feceba5b5c5ad86ec8e07c
parent dec962bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment