Changeset 132542 in webkit
- Timestamp:
- Oct 25, 2012 4:13:25 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r132541 r132542 1 2012-10-25 Simon Fraser <simon.fraser@apple.com> 2 3 Tiled layers are missing content on zooming 4 https://bugs.webkit.org/show_bug.cgi?id=100422 5 6 Reviewed by Beth Dakin. 7 8 New test for zooming with a tiled layer, and adjust an existing result. 9 10 * compositing/tiling/tile-cache-zoomed-expected.txt: Added. 11 * compositing/tiling/tile-cache-zoomed.html: Added. 12 * platform/mac/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt: 13 1 14 2012-10-25 Roger Fong <roger_fong@apple.com> 2 15 -
trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt
r132524 r132542 8 8 (backgroundColor #FFFFFF) 9 9 (visible rect 0.00, 5000.00 785.00 x 21.00) 10 (tile cache coverage 0, 4 096 785 x 925)10 (tile cache coverage 0, 4608 785 x 413) 11 11 (tile size 512 x 512) 12 12 (children 1 -
trunk/Source/WebCore/ChangeLog
r132540 r132542 1 2012-10-25 Simon Fraser <simon.fraser@apple.com> 2 3 Tiled layers are missing content on zooming 4 https://bugs.webkit.org/show_bug.cgi?id=100422 5 6 Reviewed by Beth Dakin. 7 8 Tiled layers using TileCaches were missing content after 9 zooming. TileCache was confused in the presence of scaling; 10 it unapplies the scale on the layer above the tiles (so the tiles 11 live in screen space), and computed the tile coverage rect 12 in these tile coordinates. This worked for the page tile cache, 13 because its visibleRect was sent in pre-scaled. However, for 14 tiled layer TileCaches this was wrong. 15 16 Fix by scaling the tile coverage rect by m_scale before 17 using it to compute which tiles to throw away and bring in. 18 19 To fix the problem of the visibleRect being pre-scaled 20 for the page tile cache, remove the setting of the visibleRect 21 in RenderLayerCompositor::frameViewDidScroll(), and rely on 22 GraphicsLayerCA::updateVisibleRect() which computes the 23 visible rect in the correct, layer coordinates. 24 25 Test: compositing/tiling/tile-cache-zoomed.html 26 27 * platform/graphics/ca/GraphicsLayerCA.cpp: 28 (WebCore::GraphicsLayerCA::updateVisibleRect): Call setVisibleRect() 29 for all tile cache layers, not just tiled layer ones, but only do 30 the visible rect adjustment for those that are not the page tile cache. 31 * platform/graphics/ca/mac/TileCache.mm: 32 (WebCore::TileCache::revalidateTiles): Use a coverageRectInTileCoords rect, 33 which is scaled to be in the same coordinate space as the tile grid. 34 * rendering/RenderLayerCompositor.cpp: 35 (WebCore::RenderLayerCompositor::frameViewDidScroll): Remove the code 36 that sets the setVisibleRect() on the TiledBacking. 37 1 38 2012-10-25 Adam Barth <abarth@webkit.org> 2 39 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r132524 r132542 1594 1594 void GraphicsLayerCA::updateVisibleRect(const FloatRect& oldVisibleRect) 1595 1595 { 1596 if (m_layer->layerType() != PlatformCALayer::LayerTypeTileCacheLayer) 1597 return; 1598 1599 FloatRect tileArea = adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, m_sizeAtLastVisibleRectUpdate); 1596 if (!m_layer->usesTileCacheLayer()) 1597 return; 1598 1599 FloatRect tileArea = m_visibleRect; 1600 if (m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer) 1601 tileArea = adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, m_sizeAtLastVisibleRectUpdate); 1602 1600 1603 tiledBacking()->setVisibleRect(enclosingIntRect(tileArea)); 1601 1604 -
trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm
r132537 r132542 393 393 394 394 IntRect tileCoverageRect = computeTileCoverageRect(); 395 IntRect coverageRectInTileCoords(tileCoverageRect); 396 coverageRectInTileCoords.scale(m_scale); 395 397 396 398 IntSize oldTileSize = m_tileSize; … … 405 407 WebTileLayer* tileLayer = it->value.get(); 406 408 407 if (!rectForTileIndex(tileIndex).intersects( tileCoverageRect) || tileSizeChanged) {409 if (!rectForTileIndex(tileIndex).intersects(coverageRectInTileCoords) || tileSizeChanged) { 408 410 // Remove this layer. 409 411 [tileLayer removeFromSuperlayer]; … … 422 424 TileIndex topLeft; 423 425 TileIndex bottomRight; 424 getTileIndexRangeForRect( tileCoverageRect, topLeft, bottomRight);426 getTileIndexRangeForRect(coverageRectInTileCoords, topLeft, bottomRight); 425 427 426 428 Vector<FloatRect> dirtyRects; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r132504 r132542 1101 1101 IntPoint scrollPosition = frameView->scrollPosition(); 1102 1102 1103 if (TiledBacking* tiledBacking = frameView->tiledBacking()) {1104 IntRect visibleContentRect = frameView->visibleContentRect(false /* exclude scrollbars */);1105 visibleContentRect.move(toSize(frameView->scrollOrigin()));1106 tiledBacking->setVisibleRect(visibleContentRect);1107 }1108 1109 1103 if (!m_scrollLayer) 1110 1104 return;
Note: See TracChangeset
for help on using the changeset viewer.