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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 1117423002: media: Let VideoFrame carry more than one native texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reveman's comments. Created 5 years, 7 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/trees/layer_tree_host_unittest_context.cc » ('j') | media/base/video_frame.h » ('J')
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 dea3176c43d65f9e59193049b459298e25c51f24..86cb6bff085e7fb444442c6c1b7bf3912420244f 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -408,9 +408,10 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
if (!context_provider_)
return VideoFrameExternalResources();
- const gpu::MailboxHolder* mailbox_holder = video_frame->mailbox_holder();
+ DCHECK_EQ(1u, media::VideoFrame::NumTextures(video_frame->texture_format()));
+ const gpu::MailboxHolder& mailbox_holder = video_frame->mailbox_holder(0);
VideoFrameExternalResources external_resources;
- switch (mailbox_holder->texture_target) {
+ switch (mailbox_holder.texture_target) {
case GL_TEXTURE_2D:
external_resources.type = VideoFrameExternalResources::RGB_RESOURCE;
break;
@@ -427,9 +428,8 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
}
external_resources.mailboxes.push_back(
- TextureMailbox(mailbox_holder->mailbox,
- mailbox_holder->texture_target,
- mailbox_holder->sync_point));
+ TextureMailbox(mailbox_holder.mailbox, mailbox_holder.texture_target,
+ mailbox_holder.sync_point));
external_resources.mailboxes.back().set_allow_overlay(
video_frame->allow_overlay());
external_resources.release_callbacks.push_back(
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_context.cc » ('j') | media/base/video_frame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698