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

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: Fix win_x64 build 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
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())
Daniele Castagna 2015/08/25 15:08:42 This is because |textures| == 2 while we created o
Andre 2015/08/25 18:19:57 Yes, let me see if I can find a better way to do t
+ 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') | content/common/gpu/gpu_memory_buffer_factory_io_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698