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
Loading
Please register or sign in to comment