Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2197)

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 1785153004: Made full screen video with DevTools not flash black on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LOG_IF and rebased (sorry) Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/android_video_decode_accelerator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4167133bc26c6f57a8e52b710d860219af7038b8 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();
+ LOG_IF(WARNING, !have_context)
+ << "Failed to 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);
« no previous file with comments | « content/common/gpu/media/android_video_decode_accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698