Call release() on ImageReader's surface.
Previously, ImageReaderGLOwner created a ScopedJavaSurface that did not call Surface.release() upon destruction. Unfortunately, this meant that nobody called release(). This was never noticed because we also leaked the Surface object, so it was never finalized => no helpful diagnostics. After https://chromium-review.googlesource.com/c/chromium/src/+/2453270 the leak was fixed, but now the lack of release() caused strict- mode violations. This change switches ImageReader's ScopedJavaSurface to call release properly. It's safe because CodecSurfaceBundle makes sure that the surface outlives the MediaCodec instance that's using it. This change also reverts https://chromium-review.googlesource.com/c/chromium/src/+/2527563 which replaced the leak-the-surface behavior intentionally, as part of the investigation. Bug: 1146071 Change-Id: Ib8187530299ba7790e30e630250cc2a7fd4eebf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537782Reviewed-by:Richard Coles <torne@chromium.org> Reviewed-by:
vikas soni <vikassoni@chromium.org> Commit-Queue: Frank Liberato <liberato@chromium.org> Cr-Commit-Position: refs/heads/master@{#827468}
Showing
Please register or sign in to comment