Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index bf310f3acacc42792a996d7efb1ee96be0876351..f6fd11ac570f0bcba2db382de7a6f5b503218878 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -2586,6 +2586,19 @@ void LayerTreeHostImpl::CreateUIResource( |
DCHECK_GT(uid, 0); |
DCHECK_EQ(bitmap->GetFormat(), UIResourceBitmap::RGBA8); |
+ GLint wrap_mode = 0; |
+ switch (bitmap->GetWrapMode()) { |
+ case UIResourceBitmap::CLAMP_TO_EDGE: |
+ wrap_mode = GL_CLAMP_TO_EDGE; |
+ break; |
+ case UIResourceBitmap::REPEAT: |
+ wrap_mode = GL_REPEAT; |
+ break; |
+ default: |
enne (OOO)
2013/09/04 17:36:56
Can you remove this default case so that the compi
ccameron
2013/09/04 20:00:39
Done.
|
+ NOTREACHED(); |
+ break; |
+ } |
+ |
// Allow for multiple creation requests with the same UIResourceId. The |
// previous resource is simply deleted. |
ResourceProvider::ResourceId id = ResourceIdForUIResource(uid); |
@@ -2594,6 +2607,7 @@ void LayerTreeHostImpl::CreateUIResource( |
id = resource_provider_->CreateResource( |
bitmap->GetSize(), |
resource_provider_->best_texture_format(), |
+ wrap_mode, |
ResourceProvider::TextureUsageAny); |
ui_resource_map_[uid] = id; |