From bdbce22a3ad0e8abea6b824e7ec9fd5ae3ea9637 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Fri, 11 Feb 2011 10:00:52 -0800 Subject: DO NOT MERGE Clip layers if the texture size is too large for the GPU bug:3436987 Change-Id: Ibf42685ee07c6d0dd8a1a2b9c8b57da7f2a422db --- WebCore/platform/graphics/android/LayerAndroid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 42104dc..16f7189 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -671,7 +671,9 @@ void LayerAndroid::computeTextureSize() // If we are under the maximum, and the layer inspected // needs a texture less than the maxLayerSize, use the full texture. if ((total < max) && - (layer->fullTextureSize() < maxLayerSize)) { + (layer->fullTextureSize() < maxLayerSize) && + (layer->getWidth() * m_scale < TilesManager::instance()->getMaxTextureSize()) && + (layer->getHeight() * m_scale < TilesManager::instance()->getMaxTextureSize())) { IntRect full(0, 0, layer->getWidth(), layer->getHeight()); layer->m_layerTextureRect = full; clipped = false; -- cgit v1.1