diff options
author | Chris Craik <ccraik@google.com> | 2011-10-24 18:39:29 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2011-10-24 18:42:49 -0700 |
commit | 4d0ea4e3b154e29321df8e6d8c76a1535dbb1a73 (patch) | |
tree | f4d4169c282de81389df7308e4f94d07a7dcae60 | |
parent | a4adfec4837fe35c27bbee2963cbc105dbce38ff (diff) | |
download | external_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
-rw-r--r-- | Source/WebCore/platform/graphics/android/PaintedSurface.cpp | 4 |
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; } |