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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 1316493004: Add support for converting I420 software frames into NV12 hardware frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Created 5 years, 4 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 | « no previous file | cc/test/test_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 5911d347597a3800dc5e10d4ffe0c97019dff53b..5b6fc9a4d37ad0009998e3a69d92303a6067a71b 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -407,6 +407,10 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
external_resources.type = VideoFrameExternalResources::YUV_RESOURCE;
break;
case media::PIXEL_FORMAT_NV12:
+ DCHECK(video_frame->mailbox_holder(0).texture_target ==
+ GL_TEXTURE_RECTANGLE_ARB);
+ external_resources.type = VideoFrameExternalResources::IO_SURFACE;
+ break;
case media::PIXEL_FORMAT_YV12:
case media::PIXEL_FORMAT_YV16:
case media::PIXEL_FORMAT_YV24:
@@ -420,6 +424,8 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
for (size_t i = 0; i < textures; ++i) {
const gpu::MailboxHolder& mailbox_holder = video_frame->mailbox_holder(i);
+ if (mailbox_holder.mailbox.IsZero())
+ break;
external_resources.mailboxes.push_back(
TextureMailbox(mailbox_holder.mailbox, mailbox_holder.texture_target,
mailbox_holder.sync_point, video_frame->coded_size(),
« no previous file with comments | « no previous file | cc/test/test_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698