Keep secondary tile grid for zoomed-out scale
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Apr 2014 18:40:04 +0000 (18:40 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Apr 2014 18:40:04 +0000 (18:40 +0000)
commit54afdf80ee41c778ca33cd6ce2be68fc23f0f8a3
tree191134646a2e77685ecc2b66a60254dafc88f4e4
parent49d79b5239d674f669c28e51575c30c3bbc56047
Keep secondary tile grid for zoomed-out scale
https://bugs.webkit.org/show_bug.cgi?id=131586

Reviewed by Darin Adler.

Source/WebCore:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsScale):

    Don't repaint tiled backing with setNeedsDisplay, it invalidates itself correctly in setContentsScale.
    Update custom child layers when tiled backing scale changes.

* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::setNeedsDisplay):

    Drop the whole zoomed-out grid on full repaint.

(WebCore::TileController::setNeedsDisplayInRect):

    Drop changed zoomed-out tiles. A more sophisticated strategy is possible.

(WebCore::TileController::setContentsScale):

    Swap the zoomed-out grid in and out as needed.
    Repaint the active grid after scale change so the client does not have to.

(WebCore::TileController::contentsScale):

    Get the content scale from the tile grid so it is not kept in two places.

(WebCore::TileController::zoomedOutContentsScale):
(WebCore::TileController::setZoomedOutContentsScale):

    Drop the zoomed-out grid if it no longer matches the zoomed-out scale.

(WebCore::TileController::tileRevalidationTimerFired):
(WebCore::TileController::retainedTileBackingStoreMemory):
(WebCore::TileController::containerLayers):

    Return both zoomed-out tiles and the active tiles. Active tiles are on top.

(WebCore::TileController::numberOfUnparentedTiles):
(WebCore::TileController::removeUnparentedTilesNow):
* platform/graphics/ca/mac/TileGrid.h:
* platform/graphics/ca/mac/TileGrid.mm:
(WebCore::TileGrid::dropTilesInRect):

    Add a function for dropping tiles.

(WebCore::TileGrid::revalidateTiles):

Source/WebKit2:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
(WebKit::PlatformCALayerRemoteTiledBacking::customSublayers):

    Always request new sublayer list from tile controller.

* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/mac/TileController.h
Source/WebCore/platform/graphics/ca/mac/TileController.mm
Source/WebCore/platform/graphics/ca/mac/TileGrid.h
Source/WebCore/platform/graphics/ca/mac/TileGrid.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h