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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 1406013007: cc: Remove GL_TEXTURE_2D hard-coding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set upstream right Created 5 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
« no previous file with comments | « cc/resources/resource_provider.cc ('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 fd3221258de64ece6c64980a144eb95a29f424db..1adfe0e698be2dcb50122cde967a129479729d61 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -168,8 +168,10 @@ VideoResourceUpdater::AllocateResource(const gfx::Size& plane_size,
gl->GenMailboxCHROMIUM(mailbox.name);
ResourceProvider::ScopedWriteLockGL lock(resource_provider_, resource_id);
- gl->ProduceTextureDirectCHROMIUM(lock.texture_id(), GL_TEXTURE_2D,
- mailbox.name);
+ gl->ProduceTextureDirectCHROMIUM(
+ lock.texture_id(),
+ resource_provider_->GetResourceTextureTarget(resource_id),
+ mailbox.name);
}
all_resources_.push_front(
PlaneResource(resource_id, plane_size, format, mailbox));
@@ -384,8 +386,10 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
SetPlaneResourceUniqueId(video_frame.get(), i, &plane_resource);
}
- external_resources.mailboxes.push_back(TextureMailbox(
- plane_resource.mailbox, gpu::SyncToken(), GL_TEXTURE_2D));
+ external_resources.mailboxes.push_back(
+ TextureMailbox(plane_resource.mailbox, gpu::SyncToken(),
+ resource_provider_->GetResourceTextureTarget(
+ plane_resource.resource_id)));
external_resources.release_callbacks.push_back(
base::Bind(&RecycleResource, AsWeakPtr(), plane_resource.resource_id));
}
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/test/fake_delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698