Changeset 198502 in webkit
- Timestamp:
- Mar 21, 2016, 3:25:08 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt (added)
-
LayoutTests/platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt (added)
-
LayoutTests/platform/ios-simulator-wk2/compositing/tiling/transform-origin-tiled-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (2 diffs)
-
Source/WebCore/page/FrameView.h (modified) (2 diffs)
-
Source/WebCore/platform/ScrollView.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/ca/TileController.cpp (modified) (2 diffs)
-
Source/WebCore/platform/ios/ScrollViewIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r198501 r198502 1 2016-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Use larger tiles when possible to reduce per-tile painting overhead 4 https://bugs.webkit.org/show_bug.cgi?id=155734 5 rdar://problem/24968144 6 7 Reviewed by Tim Horton. 8 9 New results with larger page tiles in WK2. 10 11 * platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: Added. 12 * platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: Added. 13 * platform/ios-simulator-wk2/compositing/tiling/transform-origin-tiled-expected.txt: Added. 14 1 15 2016-03-21 Hyungwook Lee <hyungwook.lee@navercorp.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r198500 r198502 1 2016-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Use larger tiles when possible to reduce per-tile painting overhead 4 https://bugs.webkit.org/show_bug.cgi?id=155734 5 rdar://problem/24968144 6 7 Reviewed by Tim Horton. 8 9 The existing tile size logic is wired to adjustScrollbars, which doesn't fire 10 when scrolling is delegated. For iOS WK2, key off of a new unobscuredContentSizeChanged() 11 function that runs when the UI process tells told WebCore that the unobscured size 12 has changed. In addition, contentsResized() is used to update scrollability when 13 page changes size. 14 15 * page/FrameView.cpp: 16 (WebCore::FrameView::contentsResized): 17 (WebCore::FrameView::addedOrRemovedScrollbar): 18 (WebCore::FrameView::adjustTiledBackingScrollability): Handle both delegated and non-delegated 19 scrolling; the former looks at the visible size (based on the unobscuredVisibleContentRect), 20 the latter at the presence of scrollbars. 21 (WebCore::FrameView::unobscuredContentSizeChanged): 22 * page/FrameView.h: 23 * platform/ScrollView.h: 24 (WebCore::ScrollView::unobscuredContentSizeChanged): 25 * platform/graphics/ca/TileController.cpp: 26 (WebCore::TileController::adjustTileCoverageRect): Use kDefaultTileSize rather than the 27 tile size, to retain the old amount of overdraw. 28 (WebCore::TileController::tileSize): There was a bug in the not-scrollable case; we need 29 to scale. 30 * platform/ios/ScrollViewIOS.mm: 31 (WebCore::ScrollView::setUnobscuredContentSize): 32 1 33 2016-03-21 Chris Dumez <cdumez@apple.com> 2 34 -
trunk/Source/WebCore/page/FrameView.cpp
r198238 r198502 2137 2137 } 2138 2138 2139 void FrameView::contentsResized() 2140 { 2141 // For non-delegated scrolling, adjustTiledBackingScrollability() is called via addedOrRemovedScrollbar() which occurs less often. 2142 if (delegatesScrolling()) 2143 adjustTiledBackingScrollability(); 2144 } 2145 2139 2146 void FrameView::delegatesScrollingDidChange() 2140 2147 { … … 2467 2474 } 2468 2475 2469 if (auto* tiledBacking = this->tiledBacking()) { 2470 TiledBacking::Scrollability scrollability = TiledBacking::NotScrollable; 2471 if (horizontalScrollbar()) 2472 scrollability = TiledBacking::HorizontallyScrollable; 2473 2474 if (verticalScrollbar()) 2475 scrollability |= TiledBacking::VerticallyScrollable; 2476 2477 tiledBacking->setScrollability(scrollability); 2478 } 2479 } 2476 adjustTiledBackingScrollability(); 2477 } 2478 2479 void FrameView::adjustTiledBackingScrollability() 2480 { 2481 auto* tiledBacking = this->tiledBacking(); 2482 if (!tiledBacking) 2483 return; 2484 2485 bool horizontallyScrollable; 2486 bool verticallyScrollable; 2487 2488 if (delegatesScrolling()) { 2489 IntSize documentSize = contentsSize(); 2490 IntSize visibleSize = this->visibleSize(); 2491 2492 horizontallyScrollable = documentSize.width() > visibleSize.width(); 2493 verticallyScrollable = documentSize.height() > visibleSize.height(); 2494 } else { 2495 horizontallyScrollable = horizontalScrollbar(); 2496 verticallyScrollable = verticalScrollbar(); 2497 } 2498 2499 TiledBacking::Scrollability scrollability = TiledBacking::NotScrollable; 2500 if (horizontallyScrollable) 2501 scrollability = TiledBacking::HorizontallyScrollable; 2502 2503 if (verticallyScrollable) 2504 scrollability |= TiledBacking::VerticallyScrollable; 2505 2506 tiledBacking->setScrollability(scrollability); 2507 } 2508 2509 #if PLATFORM(IOS) 2510 void FrameView::unobscuredContentSizeChanged() 2511 { 2512 adjustTiledBackingScrollability(); 2513 } 2514 #endif 2480 2515 2481 2516 static LayerFlushThrottleState::Flags determineLayerFlushThrottleState(Page& page) -
trunk/Source/WebCore/page/FrameView.h
r198238 r198502 511 511 WEBCORE_EXPORT void availableContentSizeChanged(AvailableSizeChangeReason) override; 512 512 513 void adjustTiledBackingScrollability(); 514 513 515 void addPaintPendingMilestones(LayoutMilestones); 514 516 void firePaintRelatedMilestonesIfNeeded(); … … 637 639 GraphicsLayer* layerForOverhangAreas() const override; 638 640 #endif 641 void contentsResized() override; 642 643 #if PLATFORM(IOS) 644 void unobscuredContentSizeChanged() override; 645 #endif 639 646 640 647 bool usesCompositedScrolling() const override; -
trunk/Source/WebCore/platform/ScrollView.h
r197563 r198502 420 420 virtual void scrollOffsetChangedViaPlatformWidgetImpl(const ScrollOffset&, const ScrollOffset&) { } 421 421 422 #if PLATFORM(IOS) 423 virtual void unobscuredContentSizeChanged() { } 424 #endif 425 422 426 private: 423 427 IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override; -
trunk/Source/WebCore/platform/graphics/ca/TileController.cpp
r198189 r198502 364 364 } 365 365 366 double horizontalMargin = tileSize().width()/ contentsScale;367 double verticalMargin = tileSize().height()/ contentsScale;366 double horizontalMargin = kDefaultTileSize / contentsScale; 367 double verticalMargin = kDefaultTileSize / contentsScale; 368 368 369 369 double currentTime = monotonicallyIncreasingTime(); … … 495 495 IntSize tileSize(kDefaultTileSize, kDefaultTileSize); 496 496 497 if (m_scrollability == NotScrollable) 498 tileSize = boundsWithoutMargin().size().constrainedBetween(IntSize(kDefaultTileSize, kDefaultTileSize), IntSize(kGiantTileSize, kGiantTileSize)); 499 else if (m_scrollability == VerticallyScrollable) 500 tileSize.setWidth(std::min(std::max(boundsWithoutMargin().width(), kDefaultTileSize), kGiantTileSize)); 497 if (m_scrollability == NotScrollable) { 498 IntSize scaledSize = expandedIntSize(boundsWithoutMargin().size() * tileGrid().scale()); 499 tileSize = scaledSize.constrainedBetween(IntSize(kDefaultTileSize, kDefaultTileSize), IntSize(kGiantTileSize, kGiantTileSize)); 500 } else if (m_scrollability == VerticallyScrollable) 501 tileSize.setWidth(std::min(std::max<int>(ceilf(boundsWithoutMargin().width() * tileGrid().scale()), kDefaultTileSize), kGiantTileSize)); 502 503 LOG_WITH_STREAM(Scrolling, stream << "TileController::tileSize newSize=" << tileSize); 501 504 502 505 m_tileSizeLocked = true; -
trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm
r194476 r198502 117 117 { 118 118 ASSERT(!platformWidget()); 119 if (size == m_unobscuredContentSize) 120 return; 121 119 122 m_unobscuredContentSize = size; 123 unobscuredContentSizeChanged(); 120 124 } 121 125
Note:
See TracChangeset
for help on using the changeset viewer.