diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-05 15:30:16 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-05 15:30:16 +0000 |
commit | efa4841b71067fdadf7ab1012f8eb6a0ffef50e4 (patch) | |
tree | c1669f190250db8368c75cd10810b949e12f26e9 /cc/output/renderer_pixeltest.cc | |
parent | f5073b6aad9eaec6f9235baf1446c4c9cf3d0d05 (diff) | |
download | chromium_src-efa4841b71067fdadf7ab1012f8eb6a0ffef50e4.zip chromium_src-efa4841b71067fdadf7ab1012f8eb6a0ffef50e4.tar.gz chromium_src-efa4841b71067fdadf7ab1012f8eb6a0ffef50e4.tar.bz2 |
[cc] Allow resources and ui resources to specify wrap mode
All textures are currently GL_CLAMP_TO_EDGE. This is good for tiles,
but not good for the background linen texture, which needs to be
repeated.
Add a mechanism to specify the texture wrap mode.
BUG=133097
Review URL: https://chromiumcodereview.appspot.com/22529002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/renderer_pixeltest.cc')
-rw-r--r-- | cc/output/renderer_pixeltest.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc index cd74e50..daa5039 100644 --- a/cc/output/renderer_pixeltest.cc +++ b/cc/output/renderer_pixeltest.cc @@ -112,7 +112,8 @@ scoped_ptr<TextureDrawQuad> CreateTestTextureDrawQuad( std::vector<uint32_t> pixels(rect.size().GetArea(), pixel_color); ResourceProvider::ResourceId resource = resource_provider->CreateResource( - rect.size(), GL_RGBA, ResourceProvider::TextureUsageAny); + rect.size(), GL_RGBA, GL_CLAMP_TO_EDGE, + ResourceProvider::TextureUsageAny); resource_provider->SetPixels( resource, reinterpret_cast<uint8_t*>(&pixels.front()), @@ -409,22 +410,26 @@ class VideoGLRendererPixelTest : public GLRendererPixelTest { resource_provider_->CreateResource( this->device_viewport_size_, GL_LUMINANCE, + GL_CLAMP_TO_EDGE, ResourceProvider::TextureUsageAny); ResourceProvider::ResourceId u_resource = resource_provider_->CreateResource( this->device_viewport_size_, GL_LUMINANCE, + GL_CLAMP_TO_EDGE, ResourceProvider::TextureUsageAny); ResourceProvider::ResourceId v_resource = resource_provider_->CreateResource( this->device_viewport_size_, GL_LUMINANCE, + GL_CLAMP_TO_EDGE, ResourceProvider::TextureUsageAny); ResourceProvider::ResourceId a_resource = 0; if (with_alpha) { a_resource = resource_provider_->CreateResource( this->device_viewport_size_, GL_LUMINANCE, + GL_CLAMP_TO_EDGE, ResourceProvider::TextureUsageAny); } |