From fc648fc6f8fdbf673cde145ae2d3e67c4f8c16d9 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Fri, 11 Feb 2011 10:00:52 -0800 Subject: Clip layers if the texture size is too large for the GPU bug:3436987 Change-Id: I180b9f54b9db5d190ca2832bea8b9ff210a0619a --- WebCore/platform/graphics/android/LayerAndroid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'WebCore/platform/graphics') diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 8771d3b..bee423c 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -674,7 +674,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