Diff
Modified: trunk/LayoutTests/ChangeLog (148088 => 148089)
--- trunk/LayoutTests/ChangeLog 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/ChangeLog 2013-04-10 11:34:53 UTC (rev 148089)
@@ -1,3 +1,30 @@
+2013-04-10 Antti Koivisto <[email protected]>
+
+ Create fewer tiles when page is loading
+ https://bugs.webkit.org/show_bug.cgi?id=114294
+
+ Reviewed by Anders Carlsson.
+
+ Reduced initial tile counts and new tests for speculative tiles.
+
+ * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-no-image-expected.txt:
+ * platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt:
+ * platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt: Added.
+ * platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html: Added.
+ * platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
+ * platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt: Added.
+ * platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html: Added.
+ * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt:
+ * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:
+ * platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt:
+ * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-html-background-expected.txt:
+
2013-04-10 Anton Obzhirov <[email protected]>
[GTK] Add support for Page Visibility
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -15,9 +15,9 @@
(GraphicsLayer
(bounds 785.00 1600.00)
(drawsContent 1)
- (tile cache coverage 0, 0 785 x 1600)
+ (tile cache coverage 0, 0 785 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -15,9 +15,9 @@
(GraphicsLayer
(bounds 785.00 1700.00)
(drawsContent 1)
- (tile cache coverage 0, 0 785 x 1700)
+ (tile cache coverage 0, 0 785 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -15,9 +15,9 @@
(GraphicsLayer
(bounds 785.00 1700.00)
(drawsContent 1)
- (tile cache coverage 0, 0 785 x 1700)
+ (tile cache coverage 0, 0 785 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -15,9 +15,9 @@
(GraphicsLayer
(bounds 785.00 3700.00)
(drawsContent 1)
- (tile cache coverage 0, 0 785 x 2048)
+ (tile cache coverage 0, 0 785 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -15,9 +15,9 @@
(GraphicsLayer
(bounds 795.00 1710.00)
(drawsContent 1)
- (tile cache coverage 0, 0 795 x 1710)
+ (tile cache coverage 0, 0 795 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -17,9 +17,9 @@
(GraphicsLayer
(bounds 785.00 1700.00)
(drawsContent 1)
- (tile cache coverage 0, 0 784 x 890)
+ (tile cache coverage 0, 0 445 x 667)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 4 x 4)
+ (top left tile 0, 0 tiles grid 2 x 3)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-html-background-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-html-background-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-html-background-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -15,9 +15,9 @@
(GraphicsLayer
(bounds 785.00 1516.00)
(drawsContent 1)
- (tile cache coverage 0, 0 785 x 1516)
+ (tile cache coverage 0, 0 785 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 3)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-no-image-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-no-image-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-no-image-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -6,9 +6,9 @@
(contentsOpaque 1)
(drawsContent 1)
(backgroundColor #FFFFFF)
- (tile cache coverage 0, 0 785 x 1700)
+ (tile cache coverage 0, 0 785 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 2 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
)
Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -8,9 +8,9 @@
(drawsContent 1)
(backgroundColor #FFFFFF)
(visible rect 0.00, 3000.00 785.00 x 600.00)
- (tile cache coverage 0, 2048 785 x 2560)
+ (tile cache coverage 0, 2560 785 x 1536)
(tile size 512 x 512)
- (top left tile 0, 4 tiles grid 2 x 5)
+ (top left tile 0, 5 tiles grid 2 x 3)
(children 1
(GraphicsLayer
(visible rect 0.00, 0.00 0.00 x 0.00)
Copied: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt (from rev 148088, trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt) (0 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -0,0 +1,22 @@
+(GraphicsLayer
+ (bounds 785.00 5021.00)
+ (visible rect 0.00, 3000.00 785.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 5021.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backgroundColor #FFFFFF)
+ (visible rect 0.00, 3000.00 785.00 x 600.00)
+ (tile cache coverage 0, 2048 785 x 2560)
+ (tile size 512 x 512)
+ (top left tile 0, 4 tiles grid 2 x 5)
+ (children 1
+ (GraphicsLayer
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html (0 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html 2013-04-10 11:34:53 UTC (rev 148089)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ body {
+ height: 5000px;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function dumpTiles()
+ {
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ function doTest()
+ {
+ window.scrollTo(0, 3000);
+ setTimeout(dumpTiles, 500);
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+<pre id="layers">Layer tree goes here</p>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -8,9 +8,9 @@
(drawsContent 1)
(backgroundColor #FFFFFF)
(visible rect 0.00, 4421.00 785.00 x 600.00)
- (tile cache coverage 0, 3072 785 x 1949)
+ (tile cache coverage 0, 4096 785 x 925)
(tile size 512 x 512)
- (top left tile 0, 6 tiles grid 2 x 4)
+ (top left tile 0, 8 tiles grid 2 x 2)
(children 1
(GraphicsLayer
(visible rect 0.00, 0.00 0.00 x 0.00)
Copied: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt (from rev 148088, trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt) (0 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -0,0 +1,22 @@
+(GraphicsLayer
+ (bounds 785.00 5021.00)
+ (visible rect 0.00, 0.00 785.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 5021.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backgroundColor #FFFFFF)
+ (visible rect 0.00, 0.00 785.00 x 600.00)
+ (tile cache coverage 0, 0 785 x 2048)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 2 x 4)
+ (children 1
+ (GraphicsLayer
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html (0 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html 2013-04-10 11:34:53 UTC (rev 148089)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ body {
+ height: 5000px;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function dumpTiles()
+ {
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ function doTest()
+ {
+ setTimeout(dumpTiles, 500);
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+<pre id="layers">Layer tree goes here</p>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -10,9 +10,9 @@
(backgroundColor #FFFFFF)
(transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
(visible rect 0.00, 0.00 341.30 x 254.35)
- (tile cache coverage 0, 0 784 x 584)
+ (tile cache coverage 0, 0 445 x 445)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 4 x 3)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
(visible rect 0.00, 0.00 0.00 x 0.00)
Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -10,9 +10,9 @@
(backgroundColor #FFFFFF)
(transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
(visible rect 800.00, 1000.00 341.30 x 254.35)
- (tile cache coverage 445, 667 762 x 890)
+ (tile cache coverage 667, 890 540 x 445)
(tile size 512 x 512)
- (top left tile 2, 3 tiles grid 4 x 4)
+ (top left tile 3, 4 tiles grid 3 x 2)
(children 1
(GraphicsLayer
(visible rect 0.00, 0.00 0.00 x 0.00)
Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt (148088 => 148089)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt 2013-04-10 11:34:53 UTC (rev 148089)
@@ -8,9 +8,9 @@
(drawsContent 1)
(backgroundColor #FFFFFF)
(visible rect 0.00, 0.00 785.00 x 585.00)
- (tile cache coverage 0, 0 1208 x 2021)
+ (tile cache coverage 0, 0 1024 x 1024)
(tile size 512 x 512)
- (top left tile 0, 0 tiles grid 3 x 4)
+ (top left tile 0, 0 tiles grid 2 x 2)
(children 1
(GraphicsLayer
(visible rect 0.00, 0.00 0.00 x 0.00)
Modified: trunk/Source/WebCore/ChangeLog (148088 => 148089)
--- trunk/Source/WebCore/ChangeLog 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/Source/WebCore/ChangeLog 2013-04-10 11:34:53 UTC (rev 148089)
@@ -1,3 +1,31 @@
+2013-04-10 Antti Koivisto <[email protected]>
+
+ Create fewer tiles when page is loading
+ https://bugs.webkit.org/show_bug.cgi?id=114294
+
+ Reviewed by Anders Carlsson.
+
+ We currently create speculative tiles immediately. Page is often changing rapidly during loading and
+ keeping the speculative tiles up to date creates extra work.
+
+ Tests: platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html
+ platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadProgressingStatusChanged):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::adjustTiledBackingCoverage):
+ (WebCore::FrameView::setWasScrolledByUser):
+
+ User scrolling enables speculative tiling no matter what the load status.
+
+ * page/FrameView.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::computeTileCoverage):
+ (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
+
+ Cover only the viewport during loading.
+
2013-04-10 Alberto Garcia <[email protected]>
[BlackBerry] RenderThemeBlackBerry: get rid of all the SKIA code
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (148088 => 148089)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2013-04-10 11:34:53 UTC (rev 148089)
@@ -3320,7 +3320,9 @@
void FrameLoader::loadProgressingStatusChanged()
{
bool isLoadProgressing = m_frame->page()->progress()->isLoadProgressing();
- m_frame->page()->mainFrame()->view()->updateLayerFlushThrottlingInAllFrames(isLoadProgressing);
+ FrameView* view = m_frame->page()->mainFrame()->view();
+ view->updateLayerFlushThrottlingInAllFrames(isLoadProgressing);
+ view->adjustTiledBackingCoverage();
}
void FrameLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
Modified: trunk/Source/WebCore/page/FrameView.cpp (148088 => 148089)
--- trunk/Source/WebCore/page/FrameView.cpp 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/Source/WebCore/page/FrameView.cpp 2013-04-10 11:34:53 UTC (rev 148089)
@@ -2311,6 +2311,15 @@
#endif
}
+void FrameView::adjustTiledBackingCoverage()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ RenderView* renderView = this->renderView();
+ if (renderView && renderView->layer()->backing())
+ renderView->layer()->backing()->adjustTiledBackingCoverage();
+#endif
+}
+
void FrameView::layoutTimerFired(Timer<FrameView>*)
{
#ifdef INSTRUMENT_LAYOUT_SCHEDULING
@@ -3428,7 +3437,10 @@
if (m_inProgrammaticScroll)
return;
m_maintainScrollPositionAnchor = 0;
+ if (m_wasScrolledByUser == wasScrolledByUser)
+ return;
m_wasScrolledByUser = wasScrolledByUser;
+ adjustTiledBackingCoverage();
}
void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
Modified: trunk/Source/WebCore/page/FrameView.h (148088 => 148089)
--- trunk/Source/WebCore/page/FrameView.h 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/Source/WebCore/page/FrameView.h 2013-04-10 11:34:53 UTC (rev 148089)
@@ -237,6 +237,7 @@
void resetDeferredRepaintDelay();
void updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing);
+ void adjustTiledBackingCoverage();
void beginDisableRepaints();
void endDisableRepaints();
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (148088 => 148089)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-04-10 10:48:30 UTC (rev 148088)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-04-10 11:34:53 UTC (rev 148089)
@@ -46,6 +46,7 @@
#include "InspectorInstrumentation.h"
#include "KeyframeList.h"
#include "PluginViewBase.h"
+#include "ProgressTracker.h"
#include "RenderApplet.h"
#include "RenderIFrame.h"
#include "RenderImage.h"
@@ -208,32 +209,39 @@
return m_graphicsLayer->tiledBacking();
}
-void RenderLayerBacking::adjustTiledBackingCoverage()
+static TiledBacking::TileCoverage computeTileCoverage(const RenderLayerBacking* backing)
{
- if (!m_usingTiledCacheLayer)
- return;
+ // FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability.
+ Frame* frame = backing->owningLayer()->renderer()->frame();
+ if (!frame)
+ return TiledBacking::CoverageForVisibleArea;
TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea;
-
- // FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability.
- Frame* frame = renderer()->frame();
- if (frame) {
- FrameView* frameView = frame->view();
- bool clipsToExposedRect = tiledBacking()->clipsToExposedRect();
+ FrameView* frameView = frame->view();
+ bool useMinimalTilesDuringLoading = frame->page()->progress()->isLoadProgressing() && !frameView->wasScrolledByUser();
+ if (!useMinimalTilesDuringLoading) {
+ bool clipsToExposedRect = backing->tiledBacking()->clipsToExposedRect();
if (frameView->horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
tileCoverage |= TiledBacking::CoverageForHorizontalScrolling;
if (frameView->verticalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
tileCoverage |= TiledBacking::CoverageForVerticalScrolling;
-
- if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer)) {
- // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling
- // is a page overlay (find-in-page, the Web Inspector highlight mechanism, etc.).
- if (scrollingCoordinator->mainThreadScrollingReasons() & ~ScrollingCoordinator::ForcedOnMainThread)
- tileCoverage |= TiledBacking::CoverageForSlowScrolling;
- }
}
+ if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(backing->owningLayer())) {
+ // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling
+ // is a page overlay (find-in-page, the Web Inspector highlight mechanism, etc.).
+ if (scrollingCoordinator->mainThreadScrollingReasons() & ~ScrollingCoordinator::ForcedOnMainThread)
+ tileCoverage |= TiledBacking::CoverageForSlowScrolling;
+ }
+ return tileCoverage;
+}
+void RenderLayerBacking::adjustTiledBackingCoverage()
+{
+ if (!m_usingTiledCacheLayer)
+ return;
+
+ TiledBacking::TileCoverage tileCoverage = computeTileCoverage(this);
tiledBacking()->setTileCoverage(tileCoverage);
}