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

Unified Diff: cc/resources/resource_provider.cc

Issue 303063002: Transfer texture wrap mode in in cc::Resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/resources/transferable_resource.h » ('j') | cc/resources/transferable_resource.h » ('J')
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 de683e707d1302630732905490000848954c9735..e3c21ff7c6b225ef2d207437a0748c465c37fe81 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -1445,7 +1445,7 @@ void ResourceProvider::ReceiveFromChild(
it->size,
Resource::Delegated,
GL_LINEAR,
- GL_CLAMP_TO_EDGE);
+ it->is_repeated ? GL_REPEAT : GL_CLAMP_TO_EDGE);
} else {
resource = Resource(0,
it->size,
@@ -1453,7 +1453,7 @@ void ResourceProvider::ReceiveFromChild(
it->mailbox_holder.texture_target,
it->filter,
0,
- GL_CLAMP_TO_EDGE,
+ it->is_repeated ? GL_REPEAT : GL_CLAMP_TO_EDGE,
TextureUsageAny,
it->format);
resource.mailbox = TextureMailbox(it->mailbox_holder.mailbox,
@@ -1620,6 +1620,7 @@ void ResourceProvider::TransferResource(GLES2Interface* gl,
resource->mailbox_holder.texture_target = source->target;
resource->filter = source->filter;
resource->size = source->size;
+ resource->is_repeated = (source->wrap_mode == GL_REPEAT);
if (source->type == Bitmap) {
resource->mailbox_holder.mailbox = source->shared_bitmap_id;
« no previous file with comments | « no previous file | cc/resources/transferable_resource.h » ('j') | cc/resources/transferable_resource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698