Changeset 148089 in webkit
- Timestamp:
- Apr 10, 2013 4:34:53 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148088 r148089 1 2013-04-10 Antti Koivisto <antti@apple.com> 2 3 Create fewer tiles when page is loading 4 https://bugs.webkit.org/show_bug.cgi?id=114294 5 6 Reviewed by Anders Carlsson. 7 8 Reduced initial tile counts and new tests for speculative tiles. 9 10 * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-no-image-expected.txt: 11 * platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt: 12 * platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt: Added. 13 * platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html: Added. 14 * platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt: 15 * platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt: Added. 16 * platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html: Added. 17 * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt: 18 * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: 19 * platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt: 20 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt: 21 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-expected.txt: 22 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt: 23 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt: 24 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt: 25 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt: 26 * platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-html-background-expected.txt: 27 1 28 2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com> 2 29 -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-no-image-expected.txt
r141634 r148089 7 7 (drawsContent 1) 8 8 (backgroundColor #FFFFFF) 9 (tile cache coverage 0, 0 785 x 1 700)9 (tile cache coverage 0, 0 785 x 1024) 10 10 (tile size 512 x 512) 11 (top left tile 0, 0 tiles grid 2 x 4)11 (top left tile 0, 0 tiles grid 2 x 2) 12 12 (children 1 13 13 (GraphicsLayer -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt
r141634 r148089 9 9 (backgroundColor #FFFFFF) 10 10 (visible rect 0.00, 3000.00 785.00 x 600.00) 11 (tile cache coverage 0, 2 048 785 x 2560)11 (tile cache coverage 0, 2560 785 x 1536) 12 12 (tile size 512 x 512) 13 (top left tile 0, 4 tiles grid 2 x 5)13 (top left tile 0, 5 tiles grid 2 x 3) 14 14 (children 1 15 15 (GraphicsLayer -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt
r142526 r148089 9 9 (backgroundColor #FFFFFF) 10 10 (visible rect 0.00, 4421.00 785.00 x 600.00) 11 (tile cache coverage 0, 3072 785 x 1949)11 (tile cache coverage 0, 4096 785 x 925) 12 12 (tile size 512 x 512) 13 (top left tile 0, 6 tiles grid 2 x 4)13 (top left tile 0, 8 tiles grid 2 x 2) 14 14 (children 1 15 15 (GraphicsLayer -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt
r148088 r148089 1 1 (GraphicsLayer 2 2 (bounds 785.00 5021.00) 3 (visible rect 0.00, 4421.00 785.00 x 600.00)3 (visible rect 0.00, 0.00 785.00 x 600.00) 4 4 (children 1 5 5 (GraphicsLayer … … 8 8 (drawsContent 1) 9 9 (backgroundColor #FFFFFF) 10 (visible rect 0.00, 4421.00 785.00 x 600.00)11 (tile cache coverage 0, 3072 785 x 1949)10 (visible rect 0.00, 0.00 785.00 x 600.00) 11 (tile cache coverage 0, 0 785 x 2048) 12 12 (tile size 512 x 512) 13 (top left tile 0, 6tiles grid 2 x 4)13 (top left tile 0, 0 tiles grid 2 x 4) 14 14 (children 1 15 15 (GraphicsLayer -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt
r142338 r148089 11 11 (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]) 12 12 (visible rect 0.00, 0.00 341.30 x 254.35) 13 (tile cache coverage 0, 0 784 x 584)13 (tile cache coverage 0, 0 445 x 445) 14 14 (tile size 512 x 512) 15 (top left tile 0, 0 tiles grid 4 x 3)15 (top left tile 0, 0 tiles grid 2 x 2) 16 16 (children 1 17 17 (GraphicsLayer -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt
r141634 r148089 11 11 (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]) 12 12 (visible rect 800.00, 1000.00 341.30 x 254.35) 13 (tile cache coverage 445, 667 762 x 890)13 (tile cache coverage 667, 890 540 x 445) 14 14 (tile size 512 x 512) 15 (top left tile 2, 3 tiles grid 4 x 4)15 (top left tile 3, 4 tiles grid 3 x 2) 16 16 (children 1 17 17 (GraphicsLayer -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt
r141634 r148089 9 9 (backgroundColor #FFFFFF) 10 10 (visible rect 0.00, 0.00 785.00 x 585.00) 11 (tile cache coverage 0, 0 1 208 x 2021)11 (tile cache coverage 0, 0 1024 x 1024) 12 12 (tile size 512 x 512) 13 (top left tile 0, 0 tiles grid 3 x 4)13 (top left tile 0, 0 tiles grid 2 x 2) 14 14 (children 1 15 15 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt
r142235 r148089 16 16 (bounds 785.00 1600.00) 17 17 (drawsContent 1) 18 (tile cache coverage 0, 0 785 x 1 600)18 (tile cache coverage 0, 0 785 x 1024) 19 19 (tile size 512 x 512) 20 (top left tile 0, 0 tiles grid 2 x 4)20 (top left tile 0, 0 tiles grid 2 x 2) 21 21 (children 1 22 22 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-expected.txt
r142235 r148089 16 16 (bounds 785.00 1700.00) 17 17 (drawsContent 1) 18 (tile cache coverage 0, 0 785 x 1 700)18 (tile cache coverage 0, 0 785 x 1024) 19 19 (tile size 512 x 512) 20 (top left tile 0, 0 tiles grid 2 x 4)20 (top left tile 0, 0 tiles grid 2 x 2) 21 21 (children 1 22 22 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt
r142224 r148089 16 16 (bounds 785.00 1700.00) 17 17 (drawsContent 1) 18 (tile cache coverage 0, 0 785 x 1 700)18 (tile cache coverage 0, 0 785 x 1024) 19 19 (tile size 512 x 512) 20 (top left tile 0, 0 tiles grid 2 x 4)20 (top left tile 0, 0 tiles grid 2 x 2) 21 21 (children 1 22 22 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt
r142235 r148089 16 16 (bounds 785.00 3700.00) 17 17 (drawsContent 1) 18 (tile cache coverage 0, 0 785 x 2048)18 (tile cache coverage 0, 0 785 x 1024) 19 19 (tile size 512 x 512) 20 (top left tile 0, 0 tiles grid 2 x 4)20 (top left tile 0, 0 tiles grid 2 x 2) 21 21 (children 1 22 22 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt
r142235 r148089 16 16 (bounds 795.00 1710.00) 17 17 (drawsContent 1) 18 (tile cache coverage 0, 0 795 x 1 710)18 (tile cache coverage 0, 0 795 x 1024) 19 19 (tile size 512 x 512) 20 (top left tile 0, 0 tiles grid 2 x 4)20 (top left tile 0, 0 tiles grid 2 x 2) 21 21 (children 1 22 22 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt
r142235 r148089 18 18 (bounds 785.00 1700.00) 19 19 (drawsContent 1) 20 (tile cache coverage 0, 0 784 x 890)20 (tile cache coverage 0, 0 445 x 667) 21 21 (tile size 512 x 512) 22 (top left tile 0, 0 tiles grid 4 x 4)22 (top left tile 0, 0 tiles grid 2 x 3) 23 23 (children 1 24 24 (GraphicsLayer -
trunk/LayoutTests/platform/mac/platform/mac-wk2/tiled-drawing/fixed-background/fixed-html-background-expected.txt
r142235 r148089 16 16 (bounds 785.00 1516.00) 17 17 (drawsContent 1) 18 (tile cache coverage 0, 0 785 x 1 516)18 (tile cache coverage 0, 0 785 x 1024) 19 19 (tile size 512 x 512) 20 (top left tile 0, 0 tiles grid 2 x 3)20 (top left tile 0, 0 tiles grid 2 x 2) 21 21 (children 1 22 22 (GraphicsLayer -
trunk/Source/WebCore/ChangeLog
r148087 r148089 1 2013-04-10 Antti Koivisto <antti@apple.com> 2 3 Create fewer tiles when page is loading 4 https://bugs.webkit.org/show_bug.cgi?id=114294 5 6 Reviewed by Anders Carlsson. 7 8 We currently create speculative tiles immediately. Page is often changing rapidly during loading and 9 keeping the speculative tiles up to date creates extra work. 10 11 Tests: platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html 12 platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html 13 14 * loader/FrameLoader.cpp: 15 (WebCore::FrameLoader::loadProgressingStatusChanged): 16 * page/FrameView.cpp: 17 (WebCore::FrameView::adjustTiledBackingCoverage): 18 (WebCore::FrameView::setWasScrolledByUser): 19 20 User scrolling enables speculative tiling no matter what the load status. 21 22 * page/FrameView.h: 23 * rendering/RenderLayerBacking.cpp: 24 (WebCore::computeTileCoverage): 25 (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): 26 27 Cover only the viewport during loading. 28 1 29 2013-04-10 Alberto Garcia <agarcia@igalia.com> 2 30 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r148013 r148089 3321 3321 { 3322 3322 bool isLoadProgressing = m_frame->page()->progress()->isLoadProgressing(); 3323 m_frame->page()->mainFrame()->view()->updateLayerFlushThrottlingInAllFrames(isLoadProgressing); 3323 FrameView* view = m_frame->page()->mainFrame()->view(); 3324 view->updateLayerFlushThrottlingInAllFrames(isLoadProgressing); 3325 view->adjustTiledBackingCoverage(); 3324 3326 } 3325 3327 -
trunk/Source/WebCore/page/FrameView.cpp
r148048 r148089 2312 2312 } 2313 2313 2314 void FrameView::adjustTiledBackingCoverage() 2315 { 2316 #if USE(ACCELERATED_COMPOSITING) 2317 RenderView* renderView = this->renderView(); 2318 if (renderView && renderView->layer()->backing()) 2319 renderView->layer()->backing()->adjustTiledBackingCoverage(); 2320 #endif 2321 } 2322 2314 2323 void FrameView::layoutTimerFired(Timer<FrameView>*) 2315 2324 { … … 3429 3438 return; 3430 3439 m_maintainScrollPositionAnchor = 0; 3440 if (m_wasScrolledByUser == wasScrolledByUser) 3441 return; 3431 3442 m_wasScrolledByUser = wasScrolledByUser; 3443 adjustTiledBackingCoverage(); 3432 3444 } 3433 3445 -
trunk/Source/WebCore/page/FrameView.h
r148031 r148089 238 238 239 239 void updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing); 240 void adjustTiledBackingCoverage(); 240 241 241 242 void beginDisableRepaints(); -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r147937 r148089 47 47 #include "KeyframeList.h" 48 48 #include "PluginViewBase.h" 49 #include "ProgressTracker.h" 49 50 #include "RenderApplet.h" 50 51 #include "RenderIFrame.h" … … 209 210 } 210 211 212 static TiledBacking::TileCoverage computeTileCoverage(const RenderLayerBacking* backing) 213 { 214 // FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability. 215 Frame* frame = backing->owningLayer()->renderer()->frame(); 216 if (!frame) 217 return TiledBacking::CoverageForVisibleArea; 218 219 TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea; 220 FrameView* frameView = frame->view(); 221 bool useMinimalTilesDuringLoading = frame->page()->progress()->isLoadProgressing() && !frameView->wasScrolledByUser(); 222 if (!useMinimalTilesDuringLoading) { 223 bool clipsToExposedRect = backing->tiledBacking()->clipsToExposedRect(); 224 if (frameView->horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect) 225 tileCoverage |= TiledBacking::CoverageForHorizontalScrolling; 226 227 if (frameView->verticalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect) 228 tileCoverage |= TiledBacking::CoverageForVerticalScrolling; 229 } 230 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(backing->owningLayer())) { 231 // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling 232 // is a page overlay (find-in-page, the Web Inspector highlight mechanism, etc.). 233 if (scrollingCoordinator->mainThreadScrollingReasons() & ~ScrollingCoordinator::ForcedOnMainThread) 234 tileCoverage |= TiledBacking::CoverageForSlowScrolling; 235 } 236 return tileCoverage; 237 } 238 211 239 void RenderLayerBacking::adjustTiledBackingCoverage() 212 240 { … … 214 242 return; 215 243 216 TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea; 217 218 // FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability. 219 Frame* frame = renderer()->frame(); 220 if (frame) { 221 FrameView* frameView = frame->view(); 222 bool clipsToExposedRect = tiledBacking()->clipsToExposedRect(); 223 if (frameView->horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect) 224 tileCoverage |= TiledBacking::CoverageForHorizontalScrolling; 225 226 if (frameView->verticalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect) 227 tileCoverage |= TiledBacking::CoverageForVerticalScrolling; 228 229 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer)) { 230 // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling 231 // is a page overlay (find-in-page, the Web Inspector highlight mechanism, etc.). 232 if (scrollingCoordinator->mainThreadScrollingReasons() & ~ScrollingCoordinator::ForcedOnMainThread) 233 tileCoverage |= TiledBacking::CoverageForSlowScrolling; 234 } 235 } 236 244 TiledBacking::TileCoverage tileCoverage = computeTileCoverage(this); 237 245 tiledBacking()->setTileCoverage(tileCoverage); 238 246 }
Note: See TracChangeset
for help on using the changeset viewer.