summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GLWebViewState.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2011-02-01 00:57:59 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-01 00:57:59 -0800
commitd7c28d82f1f7f97cd9527fc6372596fbf69bd2fd (patch)
treedfded04db7fb8f949c32d49358f2c953e790b181 /WebCore/platform/graphics/android/GLWebViewState.cpp
parentd6b304a1a42dbf401bcd51921fc1452d390aa94b (diff)
parent7e3773d591be20a4ddb1ef7df2709fd7655b7917 (diff)
downloadexternal_webkit-d7c28d82f1f7f97cd9527fc6372596fbf69bd2fd.zip
external_webkit-d7c28d82f1f7f97cd9527fc6372596fbf69bd2fd.tar.gz
external_webkit-d7c28d82f1f7f97cd9527fc6372596fbf69bd2fd.tar.bz2
Merge "Implement dynamic allocation of base tiles. This way, a webview will only consume as much GPU memory as needed, depending on its size, to a maximum of 256 tiles per TiledPage." into honeycomb
Diffstat (limited to 'WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index 3c1d40a..63fe730 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -287,6 +287,11 @@ void GLWebViewState::setViewport(SkRect& viewport, float scale)
static_cast<int>(floorf(viewport.fTop * invTileContentHeight)),
static_cast<int>(ceilf(viewport.fRight * invTileContentWidth)),
static_cast<int>(ceilf(viewport.fBottom * invTileContentHeight)));
+
+ int maxTextureCount = (m_viewportTileBounds.width()+1)*(m_viewportTileBounds.height()+1)*2;
+ TilesManager::instance()->setMaxTextureCount(maxTextureCount);
+ m_tiledPageA->updateBaseTileSize();
+ m_tiledPageB->updateBaseTileSize();
}
} // namespace WebCore