media/gpu/vaapi: Reuse surface if size doesn't change between jpeg encodes.
When decoding a jpeg the generated surface is reused when the video frame size doesn't change. When encoding a jpeg a new surface is created every time. This change enables reusing of surfaces for jpeg encoding. This also fixes a bug that causes the jpeg_encode_accelerator_unittest to always fail in debug, because surfaces are not properly destroyed before creating new ones. TEST=JPEG encode tests on nocturne BUG=905502 Change-Id: I9a6b0b5703813e518a3e82687b289e94745e1c62 Reviewed-on: https://chromium-review.googlesource.com/c/1337130 Commit-Queue: David Staessens <dstaessens@chromium.org> Reviewed-by:Pawel Osciak <posciak@chromium.org> Reviewed-by:
Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#608683}
Showing
Please register or sign in to comment