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

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

Issue 1751323002: Allow multiple texture ids per picture buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/common/gpu/media/fake_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/fake_video_decode_accelerator.cc b/content/common/gpu/media/fake_video_decode_accelerator.cc
index 230c4f34c86e48bbf2f73e852a7297cc4ae6c3af..6401e6f35af9c30c9e46844271cd8cbf83639792 100644
--- a/content/common/gpu/media/fake_video_decode_accelerator.cc
+++ b/content/common/gpu/media/fake_video_decode_accelerator.cc
@@ -59,8 +59,7 @@ bool FakeVideoDecodeAccelerator::Initialize(const Config& config,
// V4L2VideoDecodeAccelerator waits until first decode call to ask for buffers
// This class asks for it on initialization instead.
client_ = client;
- client_->ProvidePictureBuffers(kNumBuffers,
- frame_buffer_size_,
+ client_->ProvidePictureBuffers(kNumBuffers, 1, frame_buffer_size_,
kDefaultTextureTarget);
return true;
}
@@ -108,7 +107,8 @@ void FakeVideoDecodeAccelerator::AssignPictureBuffers(
return;
}
for (size_t index = 0; index < buffers.size(); ++index) {
- glBindTexture(GL_TEXTURE_2D, buffers[index].texture_id());
+ DCHECK_LE(1u, buffers[index].texture_ids().size());
+ glBindTexture(GL_TEXTURE_2D, buffers[index].texture_ids()[0]);
// Every other frame white and the rest black.
uint8_t* data = index % 2 ? white_data.get() : black_data.get();
glTexImage2D(GL_TEXTURE_2D,
« no previous file with comments | « content/common/gpu/media/dxva_video_decode_accelerator_win.cc ('k') | content/common/gpu/media/gpu_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698