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

Unified Diff: content/common/gpu/media/v4l2_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/v4l2_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
index 3554be56efc0164073897f386ac40bcd65467297..f1045e7f80725128623a0e309720755a774aaa1c 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
@@ -362,14 +362,11 @@ void V4L2VideoDecodeAccelerator::AssignPictureBuffers(
DCHECK_EQ(output_record.egl_sync, EGL_NO_SYNC_KHR);
DCHECK_EQ(output_record.picture_id, -1);
DCHECK_EQ(output_record.cleared, false);
+ DCHECK_LE(1u, buffers[i].texture_ids().size());
- EGLImageKHR egl_image = device_->CreateEGLImage(egl_display_,
- egl_context_,
- buffers[i].texture_id(),
- coded_size_,
- i,
- output_format_fourcc_,
- output_planes_count_);
+ EGLImageKHR egl_image = device_->CreateEGLImage(
+ egl_display_, egl_context_, buffers[i].texture_ids()[0], coded_size_, i,
+ output_format_fourcc_, output_planes_count_);
if (egl_image == EGL_NO_IMAGE_KHR) {
LOG(ERROR) << "AssignPictureBuffers(): could not create EGLImageKHR";
// Ownership of EGLImages allocated in previous iterations of this loop
@@ -1874,9 +1871,9 @@ bool V4L2VideoDecodeAccelerator::CreateOutputBuffers() {
<< "buffer_count=" << buffer_count
<< ", coded_size=" << coded_size_.ToString();
child_task_runner_->PostTask(
- FROM_HERE, base::Bind(&Client::ProvidePictureBuffers, client_,
- buffer_count, coded_size_,
- device_->GetTextureTarget()));
+ FROM_HERE,
+ base::Bind(&Client::ProvidePictureBuffers, client_, buffer_count, 1,
+ coded_size_, device_->GetTextureTarget()));
// Wait for the client to call AssignPictureBuffers() on the Child thread.
// We do this, because if we continue decoding without finishing buffer

Powered by Google App Engine
This is Rietveld 408576698