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

Unified Diff: cc/resources/resource_provider.cc

Issue 635543002: cc: Make ResourceProvider use bindless Produce/ConsumeTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 0e7c938f224f8d9f5dd2ff20f3b7899b4c8b29da..94bee962499c603946976bb835ceafd6daee54e4 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -843,11 +843,10 @@ const ResourceProvider::Resource* ResourceProvider::LockForRead(ResourceId id) {
GLES2Interface* gl = ContextGL();
DCHECK(gl);
- resource->gl_id = texture_id_allocator_->NextId();
- GLC(gl, gl->BindTexture(resource->target, resource->gl_id));
+ resource->gl_id = 0;
GLC(gl,
- gl->ConsumeTextureCHROMIUM(resource->mailbox.target(),
- resource->mailbox.name()));
+ gl->CreateAndConsumeTextureCHROMIUM(resource->mailbox.target(),
danakj 2014/10/06 15:25:28 This returns the texture id, you're just setting i
sohanjg 2014/10/07 11:23:47 Done.
+ resource->mailbox.name()));
}
if (!resource->pixels && resource->has_shared_bitmap_id &&
@@ -1407,9 +1406,7 @@ void ResourceProvider::TransferResource(GLES2Interface* gl,
LazyCreate(source);
DCHECK(source->gl_id);
DCHECK(source->origin == Resource::Internal);
- GLC(gl,
- gl->BindTexture(resource->mailbox_holder.texture_target,
- source->gl_id));
+
if (source->image_id) {
DCHECK(source->dirty_image);
BindImageForSampling(source);
@@ -1418,8 +1415,11 @@ void ResourceProvider::TransferResource(GLES2Interface* gl,
// Don't set a sync point, the caller will do it.
GLC(gl, gl->GenMailboxCHROMIUM(resource->mailbox_holder.mailbox.name));
GLC(gl,
- gl->ProduceTextureCHROMIUM(resource->mailbox_holder.texture_target,
- resource->mailbox_holder.mailbox.name));
+ gl->ProduceTextureDirectCHROMIUM(
+ source->gl_id,
+ resource->mailbox_holder.texture_target,
+ resource->mailbox_holder.mailbox.name));
+
source->mailbox = TextureMailbox(resource->mailbox_holder);
} else {
DCHECK(source->mailbox.IsTexture());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698