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..ef40cd4a1d137c111d325364584dd2622eb5f6ec 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -52,6 +52,7 @@ |
#include "cc/trees/quad_culler.h" |
#include "cc/trees/single_thread_proxy.h" |
#include "cc/trees/tree_synchronizer.h" |
+#include "gpu/GLES2/gl2extchromium.h" |
#include "ui/gfx/size_conversions.h" |
#include "ui/gfx/vector2d_conversions.h" |
@@ -2586,14 +2587,29 @@ 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: |
+ NOTREACHED(); |
+ break; |
+ } |
+ |
// Allow for multiple creation requests with the same UIResourceId. The |
// previous resource is simply deleted. |
ResourceProvider::ResourceId id = ResourceIdForUIResource(uid); |
if (id) |
DeleteUIResource(uid); |
- id = resource_provider_->CreateResource( |
+ id = resource_provider_->CreateGLTexture( |
enne (OOO)
2013/09/03 22:18:52
This seems like an unfortunate restriction to only
ccameron
2013/09/03 22:52:08
Good point -- done (crbug.com/284796).
|
bitmap->GetSize(), |
resource_provider_->best_texture_format(), |
+ GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, |
+ wrap_mode, |
ResourceProvider::TextureUsageAny); |
ui_resource_map_[uid] = id; |