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

Unified Diff: media/gpu/v4l2_video_decode_accelerator.cc

Issue 2462393002: Use texture ids passed from ARC as service ids in ArcGVDA (Closed)
Patch Set: Fixup DXVA Created 4 years, 1 month 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 | « media/gpu/v4l2_slice_video_decode_accelerator.cc ('k') | media/gpu/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_video_decode_accelerator.cc
diff --git a/media/gpu/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2_video_decode_accelerator.cc
index 470eb27e3e51684f18ced41c4cb7b84fbc6337fb..416ea3dfa347d49f089f2bf909b8b650ba6829f9 100644
--- a/media/gpu/v4l2_video_decode_accelerator.cc
+++ b/media/gpu/v4l2_video_decode_accelerator.cc
@@ -385,11 +385,13 @@ void V4L2VideoDecodeAccelerator::AssignPictureBuffersTask(
DCHECK_EQ(output_record.egl_sync, EGL_NO_SYNC_KHR);
DCHECK_EQ(output_record.picture_id, -1);
DCHECK_EQ(output_record.cleared, false);
- DCHECK_EQ(1u, buffers[i].service_texture_ids().size());
DCHECK(output_record.processor_input_fds.empty());
output_record.picture_id = buffers[i].id();
- output_record.texture_id = buffers[i].service_texture_ids()[0];
+ output_record.texture_id = buffers[i].service_texture_ids().empty()
+ ? 0
+ : buffers[i].service_texture_ids()[0];
+
// This will remain kAtClient until ImportBufferForPicture is called, either
// by the client, or by ourselves, if we are allocating.
output_record.state = kAtClient;
@@ -446,6 +448,7 @@ void V4L2VideoDecodeAccelerator::CreateEGLImageFor(
uint32_t fourcc) {
DVLOGF(3) << "index=" << buffer_index;
DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK_NE(texture_id, 0u);
if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) {
DLOGF(ERROR) << "GL callbacks required for binding to EGLImages";
« no previous file with comments | « media/gpu/v4l2_slice_video_decode_accelerator.cc ('k') | media/gpu/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698