FROMLIST: egl/android: Dequeue buffers inside EGL calls
Android buffer queues can be abandoned, which results in failing to
dequeue next buffer. Currently this would fail somewhere deep within
the DRI stack calling loader's getBuffers*(), without any error
reporting to the client app. However Android framework code relies on
proper signaling of this event, so we move buffer dequeue to
createWindowSurface() and swapBuffers() call, which can generate proper
EGL errors. To keep the performance benefits of delayed buffer handling,
if any, fence wait and DRI image creation is kept delayed until
getBuffers*() is called by the DRI driver.
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(backport from https://patchwork.freedesktop.org/patch/147320/)
BUG=b:36063477
TEST=cts run --module CtsCameraTest -t android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface on caroline
TEST=cts run --module CtsDeqpTestCases on reef
TEST=cts run --module CtsOpenGLTestCases on reef
TEST=cts run --module CtsTextureViewTestCases on reef
Change-Id: Iae0518c3af47070b0dbc40f557d5dd8b03dc9171
Reviewed-on: https://chromium-review.googlesource.com/461705
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2 files changed