summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-13 17:04:21 -0700
committerChris Craik <ccraik@google.com>2011-10-13 17:04:21 -0700
commita3d9db1dd6edce980541e17fa719ca61907484d5 (patch)
treec5118beccb1fedc45a494a36b7e22eef4acfb8cc /Source/WebCore/platform/graphics/android/GLWebViewState.cpp
parent530c83c6351e05a6939ad0b5bc291da073e77b5b (diff)
downloadexternal_webkit-a3d9db1dd6edce980541e17fa719ca61907484d5.zip
external_webkit-a3d9db1dd6edce980541e17fa719ca61907484d5.tar.gz
external_webkit-a3d9db1dd6edce980541e17fa719ca61907484d5.tar.bz2
Double number of tile textures allocated - do not merge
bug:5452814 Change-Id: Ib13a0f4e5189af0e4928bc376b29610e20eeb4dc
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index efcf877..66c0370 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -295,8 +295,10 @@ void GLWebViewState::setViewport(SkRect& viewport, float scale)
// allocate max possible number of tiles visible with this viewport
int viewMaxTileX = static_cast<int>(ceilf((viewport.width()-1) * invTileContentWidth)) + 1;
int viewMaxTileY = static_cast<int>(ceilf((viewport.height()-1) * invTileContentHeight)) + 1;
+
+ // NOTE: fetching 4 viewports worth, may need to be adjusted per-device
int maxTextureCount = (viewMaxTileX + TILE_PREFETCH_DISTANCE * 2) *
- (viewMaxTileY + TILE_PREFETCH_DISTANCE * 2) * 2;
+ (viewMaxTileY + TILE_PREFETCH_DISTANCE * 2) * 4;
TilesManager::instance()->setMaxTextureCount(maxTextureCount);
m_tiledPageA->updateBaseTileSize();
m_tiledPageB->updateBaseTileSize();