summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/ImageTexture.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-12-13 10:27:22 -0800
committerChris Craik <ccraik@google.com>2011-12-13 11:40:15 -0800
commitbfe61b92a059634950caed7cf9a65492cf2da8a0 (patch)
treebad808753589c221b5f3e99a0590a59b4fdb5174 /Source/WebCore/platform/graphics/android/ImageTexture.cpp
parentcc6205ef9a3d8f7e2710d5db536cc7c7fc7836a0 (diff)
downloadexternal_webkit-bfe61b92a059634950caed7cf9a65492cf2da8a0.zip
external_webkit-bfe61b92a059634950caed7cf9a65492cf2da8a0.tar.gz
external_webkit-bfe61b92a059634950caed7cf9a65492cf2da8a0.tar.bz2
Don't draw clipped textures
bug:5748350 Use separate areas for preperation vs drawing, so that we don't waste draw calls in kAllTextures mode Change-Id: Ie4f100a48ed0013769ef73d446a92cb883ca9f13
Diffstat (limited to 'Source/WebCore/platform/graphics/android/ImageTexture.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/ImageTexture.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/ImageTexture.cpp
index 23e3899..e1b18b4 100644
--- a/Source/WebCore/platform/graphics/android/ImageTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/ImageTexture.cpp
@@ -240,8 +240,10 @@ void ImageTexture::drawGL(LayerAndroid* layer)
// TiledTexture::draw() will call us back to know the
// transform and opacity, so we need to set m_layer
m_layer = layer;
- if (m_texture)
- m_texture->draw();
+ if (m_texture) {
+ IntRect visibleArea = m_layer->visibleArea();
+ m_texture->draw(visibleArea);
+ }
m_layer = 0;
}