summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-13 17:38:57 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-13 17:38:57 -0700
commit16c97c12719fc27c990fc4b53f19ffd7b88f17d4 (patch)
treed12b01059ecafa4f5fb0ada7db420de2a12640b1 /Source
parent9f5d6eac13414011f6c0e5aac6a921b0bd777a95 (diff)
parenta3d9db1dd6edce980541e17fa719ca61907484d5 (diff)
downloadexternal_webkit-16c97c12719fc27c990fc4b53f19ffd7b88f17d4.zip
external_webkit-16c97c12719fc27c990fc4b53f19ffd7b88f17d4.tar.gz
external_webkit-16c97c12719fc27c990fc4b53f19ffd7b88f17d4.tar.bz2
Merge "Double number of tile textures allocated - do not merge" into ics-mr0
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp4
-rw-r--r--Source/WebCore/platform/graphics/android/TilesManager.cpp2
2 files changed, 4 insertions, 2 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();
diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp
index 74cc764..7edc4b8 100644
--- a/Source/WebCore/platform/graphics/android/TilesManager.cpp
+++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp
@@ -69,7 +69,7 @@
// number to cap the layer tile texturs, it worked on both phones and tablets.
// TODO: after merge the pool of base tiles and layer tiles, we should revisit
// the logic of allocation management.
-#define MAX_TEXTURE_ALLOCATION ((6+TILE_PREFETCH_DISTANCE*2)*(5+TILE_PREFETCH_DISTANCE*2)*2)
+#define MAX_TEXTURE_ALLOCATION ((6+TILE_PREFETCH_DISTANCE*2)*(5+TILE_PREFETCH_DISTANCE*2)*4)
#define TILE_WIDTH 256
#define TILE_HEIGHT 256
#define LAYER_TILE_WIDTH 256