diff options
author | Nicolas Roard <nicolas@android.com> | 2011-02-11 10:00:52 -0800 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2011-02-18 17:49:06 -0800 |
commit | bdbce22a3ad0e8abea6b824e7ec9fd5ae3ea9637 (patch) | |
tree | 7aa98e88ef3c2e78f018dac39fb6826146dee826 | |
parent | 227fffee9ee9b07919a140866fda1ee7445d3f5a (diff) | |
download | external_webkit-bdbce22a3ad0e8abea6b824e7ec9fd5ae3ea9637.zip external_webkit-bdbce22a3ad0e8abea6b824e7ec9fd5ae3ea9637.tar.gz external_webkit-bdbce22a3ad0e8abea6b824e7ec9fd5ae3ea9637.tar.bz2 |
DO NOT MERGE Clip layers if the texture size is too large for the GPU
bug:3436987
Change-Id: Ibf42685ee07c6d0dd8a1a2b9c8b57da7f2a422db
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |