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

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: DCHECK and format fixup 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
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..670e5a722520c19e7b8b2240b4253fcc6f6aa5c7 100644
--- a/media/gpu/v4l2_video_decode_accelerator.cc
+++ b/media/gpu/v4l2_video_decode_accelerator.cc
@@ -385,11 +385,19 @@ 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();
+
+ if (buffers[i].service_texture_ids().empty()) {
+ LOGF(ERROR) << "No texture ids provided";
+ NOTIFY_ERROR(INVALID_ARGUMENT);
+ return;
+ }
+ // We only support one texture per buffer currently.
+ DCHECK_EQ(1u, buffers[i].service_texture_ids().size());
output_record.texture_id = 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;

Powered by Google App Engine
This is Rietveld 408576698