summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-24 18:39:29 -0700
committerChris Craik <ccraik@google.com>2011-10-24 18:42:49 -0700
commit4d0ea4e3b154e29321df8e6d8c76a1535dbb1a73 (patch)
treef4d4169c282de81389df7308e4f94d07a7dcae60 /Source/WebCore/platform/graphics/android
parenta4adfec4837fe35c27bbee2963cbc105dbce38ff (diff)
downloadexternal_webkit-4d0ea4e3b154e29321df8e6d8c76a1535dbb1a73.zip
external_webkit-4d0ea4e3b154e29321df8e6d8c76a1535dbb1a73.tar.gz
external_webkit-4d0ea4e3b154e29321df8e6d8c76a1535dbb1a73.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/android')
-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;
}