Commit 3ffda9ea authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu VDA unittest: Do not call ReusePictureBuffer on a dimissed picture buffer

A VDA client should not ReusePictureBuffer() on a dismissed picture buffer.
VDA doesn't have to handle this case.

BUG=chromium:834170
TEST=VDA unittest on eve and kevin
TEST=VDA unittest on non-Chrome OS platforms in CQ.

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: Ia3bc2534684b5448c01fdc86d7efc7db4389c21c
Reviewed-on: https://chromium-review.googlesource.com/1063890Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566655}
parent 99223904
...@@ -611,6 +611,12 @@ void GLRenderingVDAClient::ReturnPicture(int32_t picture_buffer_id) { ...@@ -611,6 +611,12 @@ void GLRenderingVDAClient::ReturnPicture(int32_t picture_buffer_id) {
return; return;
LOG_ASSERT(1U == pending_textures_.erase(picture_buffer_id)); LOG_ASSERT(1U == pending_textures_.erase(picture_buffer_id));
if (active_textures_.find(picture_buffer_id) == active_textures_.end()) {
// The picture associated with picture_buffer_id is dismissed.
// Do not execute ReusePictureBuffer().
return;
}
if (pending_textures_.empty() && state_ == CS_RESETTING) { if (pending_textures_.empty() && state_ == CS_RESETTING) {
SetState(CS_RESET); SetState(CS_RESET);
DeleteDecoder(); DeleteDecoder();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment