Reland: v4l2: Remove GLImage from OutputRecord
This CL was originally (crrev.com/c/911841) reverted since it broke ARC++ video playback where we initialize the decoder with bind_cb_ set to null. The new patch removes the call to bind_cb_ unconditionally. That's what we want, since we need the client mapping from texture id to GLImage to stay valid for scanout to work. Additionally, unbinding the images doesn't actually free the underlying memory, since the driver texture keeps a reference. The buffers will be freed when either the client textures are freed or a different GLImage is bound. Original description: When GLImages were introduced to v4l2 in crrev.com/c/517883 to replace EGLImages, a scoped ref to a GLImage was added to OutputRecord in place of the EGLImage. This was not necessary since when we bind the GLImage in GLES2 cmd decoder, the decoder increases the ref count and keeps the GLImage alive. Additionally, copying the scoped_refptr<GLImage> in a different thread than it was created, when we associate GLImage to OutputRecords, causes a DCHECK to go off. This CL removes GLImage scoped_refptr from V4L2SliceVideoDecodeAccelerator::OutputRecord. Test: Youtube video on kevin. ARC++ video on kevin Bug: b/73751133 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ie5f70db57e2ae1dc906cb8197dc5996651be08db Reviewed-on: https://chromium-review.googlesource.com/1022373 Commit-Queue: Daniele Castagna <dcastagna@chromium.org> Reviewed-by:Kristian H. Kristensen <hoegsberg@chromium.org> Cr-Commit-Position: refs/heads/master@{#552446}
Showing
Please register or sign in to comment