• chadversary's avatar
    egl/android: Cancel any outstanding ANativeBuffer in surface destructor · 2548f73c
    chadversary authored
    That is, call ANativeWindow::cancelBuffer in droid_destroy_surface().
    
    This should prevent application deadlock when the app destroys the
    EGLSurface after EGL has acquired a buffer from SurfaceFlinger
    (ANativeWindow::dequeueBuffer) but before EGL has released it
    (ANativeWindow::enqueueBuffer).
    
    This patch is part of a series for fixing
    android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface
    on Chrome OS x86 devices.
    
    Cc: mesa-stable@lists.freedesktop.org
    Cc: Tomasz Figa <tfiga@chromium.org>
    Cc: Tapani Pälli <tapani.palli@intel.com>
    Reviewed-by: default avatarNicolas Boichat <drinkcat@chromium.org>
    Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 0212db35)
    2548f73c
platform_android.c 35.4 KB