summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-24 18:39:29 -0700
committerEd Heyl <ed@google.com>2011-10-25 20:36:02 +0000
commitd0e47e8be77bfe2991172ca5aa04fbac8d484357 (patch)
tree035d940f0b26fce48f5ae6642f7011fa18764d4e /Source/WebCore/platform/graphics
parentaffc08488bcc3fc9ae25d5199890d8e2f0cdb8bb (diff)
downloadexternal_webkit-d0e47e8be77bfe2991172ca5aa04fbac8d484357.zip
external_webkit-d0e47e8be77bfe2991172ca5aa04fbac8d484357.tar.gz
external_webkit-d0e47e8be77bfe2991172ca5aa04fbac8d484357.tar.bz2
Take scale into account when greedily prefetching an entire layer
bug:5509149 Scale wasn't being taken into account when estimating layer tile consumption, so zooming in on layer content could attempt to fetch and draw hundreds of layers per tile, causing lots of missing content. Change-Id: Ib26e203827ad93be12d29561b9d8094cb712f014
Diffstat (limited to 'Source/WebCore/platform/graphics')
-rw-r--r--Source/WebCore/platform/graphics/android/PaintedSurface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/PaintedSurface.cpp b/Source/WebCore/platform/graphics/android/PaintedSurface.cpp
index 00129a0..8f78638 100644
--- a/Source/WebCore/platform/graphics/android/PaintedSurface.cpp
+++ b/Source/WebCore/platform/graphics/android/PaintedSurface.cpp
@@ -214,8 +214,8 @@ void PaintedSurface::computeVisibleArea() {
if (!m_visibleArea.isEmpty()) {
float tileWidth = TilesManager::instance()->layerTileWidth();
float tileHeight = TilesManager::instance()->layerTileHeight();
- int w = ceilf(m_area.width() / tileWidth);
- int h = ceilf(m_area.height() / tileHeight);
+ int w = ceilf(m_area.width() * m_scale / tileWidth);
+ int h = ceilf(m_area.height() * m_scale / tileHeight);
if (w * h < MAX_UNCLIPPED_AREA)
m_visibleArea = m_area;
}