Chromium Code Reviews| Index: content/common/gpu/media/android_video_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc |
| index d058451b38bf5b7da68e6991668eaabd09447f29..6588728684af28cfea89760025b5b438bfc4abdd 100644 |
| --- a/content/common/gpu/media/android_video_decode_accelerator.cc |
| +++ b/content/common/gpu/media/android_video_decode_accelerator.cc |
| @@ -787,7 +787,8 @@ void AndroidVideoDecodeAccelerator::DecodeBuffer( |
| } |
| void AndroidVideoDecodeAccelerator::RequestPictureBuffers() { |
| - client_->ProvidePictureBuffers(kNumPictureBuffers, size_, |
| + client_->ProvidePictureBuffers(kNumPictureBuffers, |
| + strategy_->GetPictureBufferSize(), |
| strategy_->GetTextureTarget()); |
| } |
| @@ -802,8 +803,12 @@ void AndroidVideoDecodeAccelerator::AssignPictureBuffers( |
| return; |
| } |
| + const bool have_context = make_context_current_.Run(); |
| + if (!have_context) |
|
DaleCurtis
2016/03/29 17:38:41
LOG_IF(!have_context, "") if you want.
liberato (no reviews please)
2016/03/29 20:23:31
Done.
|
| + LOG(WARNING) << "Failed make GL context current for Assign, continuing."; |
| + |
| for (size_t i = 0; i < buffers.size(); ++i) { |
| - if (buffers[i].size() != size_) { |
| + if (buffers[i].size() != strategy_->GetPictureBufferSize()) { |
| POST_ERROR(INVALID_ARGUMENT, |
| "Invalid picture buffer size assigned. Wanted " |
| << size_.ToString() << ", but got " |
| @@ -818,7 +823,7 @@ void AndroidVideoDecodeAccelerator::AssignPictureBuffers( |
| // about "zombies" for why we maintain this set in the first place. |
| dismissed_picture_ids_.erase(id); |
| - strategy_->AssignOnePictureBuffer(buffers[i]); |
| + strategy_->AssignOnePictureBuffer(buffers[i], have_context); |
| } |
| TRACE_COUNTER1("media", "AVDA::FreePictureIds", free_picture_ids_.size()); |
| DoIOTask(true); |