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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 11 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 | « cc/resources/video_resource_updater.h ('k') | cc/test/fake_delegated_renderer_layer_impl.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 54e4a5cd3d4603278b6926c2a2711a4c075a0cae..bd914179fade171507746dde9fa64be321e94d0f 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -306,7 +306,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
};
external_resources.mailboxes.push_back(
- TextureMailbox(plane_resources[i].mailbox));
+ TextureMailbox(plane_resources[i].mailbox, GL_TEXTURE_2D, 0));
external_resources.release_callbacks.push_back(
base::Bind(&RecycleResource, AsWeakPtr(), recycle_data));
}
@@ -316,9 +316,9 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
}
static void ReturnTexture(const scoped_refptr<media::VideoFrame>& frame,
- unsigned sync_point,
+ uint32 sync_point,
bool lost_resource) {
- frame->texture_mailbox()->Resync(sync_point);
+ frame->mailbox_holder()->sync_point = sync_point;
}
VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
@@ -332,8 +332,9 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
if (!context_provider_)
return VideoFrameExternalResources();
+ gpu::MailboxHolder* mailbox_holder = video_frame->mailbox_holder();
VideoFrameExternalResources external_resources;
- switch (video_frame->texture_target()) {
+ switch (mailbox_holder->texture_target) {
case GL_TEXTURE_2D:
external_resources.type = VideoFrameExternalResources::RGB_RESOURCE;
break;
@@ -349,13 +350,10 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
return VideoFrameExternalResources();
}
- media::VideoFrame::MailboxHolder* mailbox_holder =
- video_frame->texture_mailbox();
-
external_resources.mailboxes.push_back(
- TextureMailbox(mailbox_holder->mailbox(),
- video_frame->texture_target(),
- mailbox_holder->sync_point()));
+ TextureMailbox(mailbox_holder->mailbox,
+ mailbox_holder->texture_target,
+ mailbox_holder->sync_point));
external_resources.release_callbacks.push_back(
base::Bind(&ReturnTexture, video_frame));
return external_resources;
@@ -365,7 +363,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
void VideoResourceUpdater::RecycleResource(
base::WeakPtr<VideoResourceUpdater> updater,
RecycleResourceData data,
- unsigned sync_point,
+ uint32 sync_point,
bool lost_resource) {
if (!updater.get()) {
// Resource was already deleted.
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/test/fake_delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698