summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-06-22 15:47:15 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2011-06-22 17:29:21 -0700
commit6e14a866ef4cafafb04d26d54c88fa0d76b87e74 (patch)
tree80cc2bd014511345066b736f746e44998e334de3 /Source/WebCore/platform
parent3508b05a4b38911324b4dcab4c5d30c4ac7bb0e9 (diff)
downloadexternal_webkit-6e14a866ef4cafafb04d26d54c88fa0d76b87e74.zip
external_webkit-6e14a866ef4cafafb04d26d54c88fa0d76b87e74.tar.gz
external_webkit-6e14a866ef4cafafb04d26d54c88fa0d76b87e74.tar.bz2
Tiles: increase the minimal number to cover the whole screen
Change-Id: Iad5ef9dc1f9944a326e45dd2721cb0005e69f425
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/android/TilesManager.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp
index e4e8af7..0e91dc7 100644
--- a/Source/WebCore/platform/graphics/android/TilesManager.cpp
+++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp
@@ -55,15 +55,14 @@
// We need n textures for one TiledPage, and another n textures for the
// second page used when scaling.
// In our case, we use 300x300 textures. On the tablet, this equates to
-// at least 5 * 3 = 15 textures. We also enable offscreen textures to a maximum
-// of 101 textures used (i.e. ~70Mb max, accounting for the double buffer textures)
-// Now we switch to Surface Texture, which is triple buffering. In order to
-// avoid OOM issue, we limit the bounds number to 0.
+// at least 24 textures. That is consuming almost 50MB GPU memory.
+// 24*300*300*4(bpp)*2(pages)*3(triple buffering in Surface Texture) = 49.4MB
+// In order to avoid OOM issue, we limit the bounds number to 0 for now.
// TODO: We should either dynamically change the outer bound by detecting the
// HW limit or save further in the GPU memory consumption.
#define EXPANDED_TILE_BOUNDS_X 0
#define EXPANDED_TILE_BOUNDS_Y 0
-#define MAX_TEXTURE_ALLOCATION 3+(5+EXPANDED_TILE_BOUNDS_X*2)*(3+EXPANDED_TILE_BOUNDS_Y*2)*2
+#define MAX_TEXTURE_ALLOCATION 3+(6+EXPANDED_TILE_BOUNDS_X*2)*(4+EXPANDED_TILE_BOUNDS_Y*2)*2
#define TILE_WIDTH 300
#define TILE_HEIGHT 300