Changeset 156472 in webkit
- Timestamp:
- Sep 26, 2013 10:34:33 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156471 r156472 1 2013-09-26 Tim Horton <timothy_horton@apple.com> 2 3 Tiled drawing should not imply threaded scrolling 4 https://bugs.webkit.org/show_bug.cgi?id=121874 5 <rdar://problem/15071494> 6 7 Reviewed by Sam Weinig. 8 9 No new tests; a near-future patch is going to put the majority of layout 10 tests into the tiled-drawing-without-threaded-scrolling mode. 11 12 * page/ChromeClient.h: 13 (WebCore::ChromeClient::shouldUseTiledBackingForFrame): 14 Add a ChromeClient callback to determine whether a given frame wants a TiledBacking for its contents. 15 16 * page/FrameView.h: 17 * WebCore.exp.in: 18 Make isMainFrameView public and export it for use in WebKit2. 19 20 * rendering/RenderLayerBacking.cpp: 21 (WebCore::RenderLayerBacking::RenderLayerBacking): 22 Make use of shouldUseTiledBackingForFrame instead of predicating the 23 main frame using a tile cache on whether we have a scrolling coordinator. 24 25 * rendering/RenderLayerCompositor.cpp: 26 (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Added. 27 28 (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls): 29 (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer): 30 (WebCore::RenderLayerCompositor::requiresContentShadowLayer): 31 All of these checks for existence of a scrollingCoordinator should actually 32 key off whether we're using tiled drawing at the root; they have nothing 33 to do with threaded scrolling. 34 35 * rendering/RenderLayerCompositor.h: 36 1 37 2013-09-26 Brady Eidson <beidson@apple.com> 2 38 -
trunk/Source/WebCore/WebCore.exp.in
r156435 r156472 1694 1694 __ZNK7WebCore9FrameView13paintBehaviorEv 1695 1695 __ZNK7WebCore9FrameView14didFirstLayoutEv 1696 __ZNK7WebCore9FrameView15isMainFrameViewEv 1696 1697 __ZNK7WebCore9FrameView17convertToRendererEPKNS_12RenderObjectERKNS_7IntRectE 1697 1698 __ZNK7WebCore9FrameView17convertToRendererEPKNS_12RenderObjectERKNS_8IntPointE -
trunk/Source/WebCore/page/ChromeClient.h
r156158 r156472 366 366 virtual void didAddFooterLayer(GraphicsLayer*) { } 367 367 368 virtual bool shouldUseTiledBackingForFrameView(const FrameView*) const { return false; } 369 368 370 // These methods are used to report pages that are performing 369 371 // some task that we consider to be "active", and so the user -
trunk/Source/WebCore/page/FrameView.h
r156201 r156472 443 443 void willRemoveWidgetFromRenderTree(Widget&); 444 444 445 bool isMainFrameView() const; 446 445 447 protected: 446 448 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) OVERRIDE; … … 459 461 460 462 virtual bool isFrameView() const OVERRIDE { return true; } 461 462 bool isMainFrameView() const;463 463 464 464 friend class RenderWidget; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r156451 r156472 121 121 , m_didSwitchToFullTileCoverageDuringLoading(false) 122 122 { 123 if (layer->isRootLayer()) { 124 Page* page = renderer().frame().page(); 125 if (page && page->frameIsMainFrame(&renderer().frame())) { 123 Page* page = renderer().frame().page(); 124 125 if (layer->isRootLayer() && page) { 126 if (page->frameIsMainFrame(&renderer().frame())) 126 127 m_isMainFrameRenderViewLayer = true; 127 128 128 #if PLATFORM(MAC) 129 // FIXME: It's a little weird that we base this decision on whether there's a scrolling coordinator or not. 130 if (page->scrollingCoordinator()) 131 m_usingTiledCacheLayer = true; 132 #endif 133 } 129 m_usingTiledCacheLayer = page->chrome().client().shouldUseTiledBackingForFrameView(renderer().frame().view()); 134 130 } 135 131 136 132 createPrimaryGraphicsLayer(); 137 133 138 if (m_usingTiledCacheLayer ) {134 if (m_usingTiledCacheLayer && page) { 139 135 TiledBacking* tiledBacking = this->tiledBacking(); 140 if (Page* page = renderer().frame().page()) { 141 tiledBacking->setIsInWindow(page->isInWindow()); 142 143 if (m_isMainFrameRenderViewLayer) 144 tiledBacking->setUnparentsOffscreenTiles(true); 145 146 tiledBacking->setScrollingPerformanceLoggingEnabled(page->settings().scrollingPerformanceLoggingEnabled()); 147 adjustTiledBackingCoverage(); 148 } 136 137 tiledBacking->setIsInWindow(page->isInWindow()); 138 139 if (m_isMainFrameRenderViewLayer) 140 tiledBacking->setUnparentsOffscreenTiles(true); 141 142 tiledBacking->setScrollingPerformanceLoggingEnabled(page->settings().scrollingPerformanceLoggingEnabled()); 143 adjustTiledBackingCoverage(); 149 144 } 150 145 } -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r156451 r156472 2525 2525 } 2526 2526 2527 bool RenderLayerCompositor::mainFrameBackingIsTiled() const 2528 { 2529 RenderLayer* layer = m_renderView.layer(); 2530 if (!layer) 2531 return false; 2532 2533 RenderLayerBacking* backing = layer->backing(); 2534 if (!backing) 2535 return false; 2536 2537 return backing->usingTiledBacking(); 2538 } 2539 2527 2540 bool RenderLayerCompositor::shouldCompositeOverflowControls() const 2528 2541 { … … 2532 2545 return false; 2533 2546 2534 if ( hasCoordinatedScrolling())2547 if (mainFrameBackingIsTiled()) 2535 2548 return true; 2536 2549 … … 2563 2576 return false; 2564 2577 2565 // We do want a layer if we have a scrolling coordinatorand can scroll.2566 if ( scrollingCoordinator() && m_renderView.frameView().hasOpaqueBackground() && !m_renderView.frameView().prohibitsScrolling())2578 // We do want a layer if we're using tiled drawing and can scroll. 2579 if (mainFrameBackingIsTiled() && m_renderView.frameView().hasOpaqueBackground() && !m_renderView.frameView().prohibitsScrolling()) 2567 2580 return true; 2568 2581 … … 2580 2593 return false; 2581 2594 2582 // On Mac, we want a content shadow layer if we have a scrolling coordinatorand can scroll.2583 if ( scrollingCoordinator() && !m_renderView.frameView().prohibitsScrolling())2595 // On Mac, we want a content shadow layer if we're using tiled drawing and can scroll. 2596 if (mainFrameBackingIsTiled() && !m_renderView.frameView().prohibitsScrolling()) 2584 2597 return true; 2585 2598 #endif -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r156451 r156472 413 413 #endif 414 414 415 bool mainFrameBackingIsTiled() const; 416 415 417 private: 416 418 RenderView& m_renderView; … … 438 440 439 441 bool m_isTrackingRepaints; // Used for testing. 440 442 441 443 unsigned m_layersWithTiledBackingCount; 442 444 -
trunk/Source/WebKit2/ChangeLog
r156449 r156472 1 2013-09-26 Tim Horton <timothy_horton@apple.com> 2 3 Tiled drawing should not imply threaded scrolling 4 https://bugs.webkit.org/show_bug.cgi?id=121874 5 <rdar://problem/15071494> 6 7 Reviewed by Sam Weinig. 8 9 * Shared/DrawingAreaInfo.h: 10 We can have DrawingAreaTypeTiledCoreAnimation without threaded scrolling. 11 12 * Shared/WebPreferencesStore.h: 13 * UIProcess/API/C/WKPreferences.cpp: 14 (WKPreferencesSetThreadedScrollingEnabled): 15 (WKPreferencesGetThreadedScrollingEnabled): 16 * UIProcess/API/C/WKPreferencesPrivate.h: 17 Add a preference for threaded scrolling. 18 19 * UIProcess/API/mac/WKView.mm: 20 (-[WKView WebKit::]): 21 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: 22 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: 23 * WebProcess/WebPage/DrawingArea.cpp: 24 (WebKit::DrawingArea::create): 25 * WebProcess/WebPage/DrawingArea.h: 26 Make it so we can use TiledCoreAnimationDrawingArea without ENABLE(THREADED_SCROLLING). 27 28 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 29 (WebKit::WebChromeClient::shouldUseTiledBackingForFrame): 30 * WebProcess/WebCoreSupport/WebChromeClient.h: 31 Override shouldUseTiledBackingForFrame; ask the drawing area if we want a tiled backing for the given frame. 32 33 * WebProcess/WebPage/WebPage.cpp: 34 (WebKit::WebPage::WebPage): 35 (WebKit::WebPage::~WebPage): 36 * WebProcess/WebPage/WebPage.h: 37 Move attaching and detaching the scrolling tree into WebPage. 38 Store whether or not this page is going to use threaded scrolling once, as this 39 cannot change through the life of a page. 40 41 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: 42 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 43 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 44 (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): 45 Move attaching and detaching the scrolling tree into WebPage. 46 47 (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): 48 (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): 49 (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 50 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition): 51 Only do scrolling coordinator work if we have a scrolling coordinator. 52 53 (WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrame): 54 TiledCoreAnimationDrawingArea always wants a tiled backing for the main frame. 55 1 56 2013-09-25 Minju Kim <pmuarteo@gmail.com> 2 57 -
trunk/Source/WebKit2/Shared/DrawingAreaInfo.h
r133530 r156472 31 31 enum DrawingAreaType { 32 32 DrawingAreaTypeImpl, 33 #if PLATFORM(MAC) && ENABLE(THREADED_SCROLLING)33 #if PLATFORM(MAC) 34 34 DrawingAreaTypeTiledCoreAnimation, 35 #endif36 #if PLATFORM(MAC)37 35 DrawingAreaTypeRemoteLayerTree, 38 36 #endif -
trunk/Source/WebKit2/Shared/WebPreferencesStore.h
r155409 r156472 165 165 macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED) \ 166 166 macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false) \ 167 macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true) \ 167 168 \ 168 169 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r155409 r156472 1155 1155 return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout()); 1156 1156 } 1157 1158 void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled) 1159 { 1160 toImpl(preferencesRef)->setThreadedScrollingEnabled(enabled); 1161 } 1162 1163 bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef) 1164 { 1165 return toImpl(preferencesRef)->threadedScrollingEnabled(); 1166 } -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h
r155409 r156472 288 288 WK_EXPORT bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef); 289 289 290 // Defaults to true 291 WK_EXPORT void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled); 292 WK_EXPORT bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef); 293 290 294 // Defaults to 5 seconds. 291 295 WK_EXPORT void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout); -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r155888 r156472 2368 2368 - (OwnPtr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy 2369 2369 { 2370 #if ENABLE(THREADED_SCROLLING)2371 2370 if ([self _shouldUseTiledDrawingArea]) { 2372 2371 if (getenv("WK_USE_REMOTE_LAYER_TREE_DRAWING_AREA")) … … 2375 2374 return createOwned<TiledCoreAnimationDrawingAreaProxy>(_data->_page.get()); 2376 2375 } 2377 #endif2378 2376 2379 2377 return createOwned<DrawingAreaProxyImpl>(_data->_page.get()); -
trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
r155888 r156472 26 26 #ifndef TiledCoreAnimationDrawingAreaProxy_h 27 27 #define TiledCoreAnimationDrawingAreaProxy_h 28 29 #if ENABLE(THREADED_SCROLLING)30 28 31 29 #include "DrawingAreaProxy.h" … … 72 70 } // namespace WebKit 73 71 74 #endif // ENABLE(THREADED_SCROLLING)75 76 72 #endif // TiledCoreAnimationDrawingAreaProxy_h -
trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
r155888 r156472 26 26 #import "config.h" 27 27 #import "TiledCoreAnimationDrawingAreaProxy.h" 28 29 #if ENABLE(THREADED_SCROLLING)30 28 31 29 #import "ColorSpaceData.h" … … 158 156 159 157 } // namespace WebKit 160 161 #endif // ENABLE(THREADED_SCROLLING) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r154877 r156472 905 905 } 906 906 907 bool WebChromeClient::shouldUseTiledBackingForFrameView(const FrameView* frameView) const 908 { 909 return m_page->drawingArea()->shouldUseTiledBackingForFrameView(frameView); 910 } 911 907 912 void WebChromeClient::incrementActivePageCount() 908 913 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r153356 r156472 236 236 virtual void didAddFooterLayer(WebCore::GraphicsLayer*) OVERRIDE; 237 237 238 virtual bool shouldUseTiledBackingForFrameView(const WebCore::FrameView*) const OVERRIDE; 239 238 240 virtual void incrementActivePageCount() OVERRIDE; 239 241 virtual void decrementActivePageCount() OVERRIDE; -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp
r133530 r156472 30 30 #include "DrawingAreaImpl.h" 31 31 32 #if PLATFORM(MAC) && ENABLE(THREADED_SCROLLING)33 #include "TiledCoreAnimationDrawingArea.h"34 #endif35 36 32 #if PLATFORM(MAC) 37 33 #include "RemoteLayerTreeDrawingArea.h" 34 #include "TiledCoreAnimationDrawingArea.h" 38 35 #endif 39 36 … … 47 44 case DrawingAreaTypeImpl: 48 45 return DrawingAreaImpl::create(webPage, parameters); 49 #if PLATFORM(MAC) && ENABLE(THREADED_SCROLLING)46 #if PLATFORM(MAC) 50 47 case DrawingAreaTypeTiledCoreAnimation: 51 48 return TiledCoreAnimationDrawingArea::create(webPage, parameters); 52 #endif53 #if PLATFORM(MAC)54 49 case DrawingAreaTypeRemoteLayerTree: 55 50 return RemoteLayerTreeDrawingArea::create(webPage, parameters); -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h
r153692 r156472 35 35 36 36 namespace CoreIPC { 37 38 37 class Connection; 38 class MessageDecoder; 39 39 } 40 40 41 41 namespace WebCore { 42 class GraphicsLayer; 43 class GraphicsLayerFactory; 42 class FrameView; 43 class GraphicsLayer; 44 class GraphicsLayerFactory; 44 45 } 45 46 … … 89 90 virtual void didChangeScrollOffsetForAnyFrame() { } 90 91 92 virtual bool shouldUseTiledBackingForFrameView(const WebCore::FrameView*) { return false; } 93 91 94 #if USE(ACCELERATED_COMPOSITING) 92 95 virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() { return 0; } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r156424 r156472 34 34 #include "DrawingArea.h" 35 35 #include "DrawingAreaMessages.h" 36 #include "EventDispatcher.h" 36 37 #include "InjectedBundle.h" 37 38 #include "InjectedBundleBackForwardList.h" … … 292 293 , m_maximumRenderingSuppressionToken(0) 293 294 , m_scrollPinningBehavior(DoNotPin) 295 , m_useThreadedScrolling(false) 294 296 { 295 297 ASSERT(m_pageID); … … 319 321 320 322 m_page = adoptPtr(new Page(pageClients)); 323 324 m_useThreadedScrolling = parameters.store.getBoolValueForKey(WebPreferencesKey::threadedScrollingEnabledKey()); 325 m_page->settings().setScrollingCoordinatorEnabled(m_useThreadedScrolling); 321 326 322 327 m_drawingArea = DrawingArea::create(this, parameters); … … 419 424 webPageCounter.increment(); 420 425 #endif 426 427 #if ENABLE(THREADED_SCROLLING) 428 if (m_useThreadedScrolling) 429 WebProcess::shared().eventDispatcher().addScrollingTreeForPage(this); 430 #endif 421 431 } 422 432 … … 427 437 428 438 ASSERT(!m_page); 439 440 #if ENABLE(THREADED_SCROLLING) 441 if (m_useThreadedScrolling) 442 WebProcess::shared().eventDispatcher().removeScrollingTreeForPage(this); 443 #endif 429 444 430 445 m_sandboxExtensionTracker.invalidate(); -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r156354 r156472 1030 1030 1031 1031 WebCore::ScrollPinningBehavior m_scrollPinningBehavior; 1032 1033 bool m_useThreadedScrolling; 1032 1034 }; 1033 1035 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
r153692 r156472 27 27 #define TiledCoreAnimationDrawingArea_h 28 28 29 #if ENABLE(THREADED_SCROLLING)30 31 29 #include "DrawingArea.h" 32 30 #include "LayerTreeContext.h" … … 43 41 44 42 namespace WebCore { 43 class FrameView; 45 44 class TiledBacking; 46 45 } … … 83 82 84 83 virtual void dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>&) OVERRIDE; 84 85 virtual bool shouldUseTiledBackingForFrameView(const WebCore::FrameView*); 85 86 86 87 // WebCore::GraphicsLayerClient … … 145 146 } // namespace WebKit 146 147 147 #endif // ENABLE(THREADED_SCROLLING)148 149 148 #endif // TiledCoreAnimationDrawingArea_h -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r154658 r156472 27 27 #import "TiledCoreAnimationDrawingArea.h" 28 28 29 #if ENABLE(THREADED_SCROLLING)30 31 29 #import "ColorSpaceData.h" 32 30 #import "DrawingAreaProxyMessages.h" 33 #import "EventDispatcher.h"34 31 #import "LayerHostingContext.h" 35 32 #import "LayerTreeContext.h" … … 46 43 #import <WebCore/Page.h> 47 44 #import <WebCore/RenderView.h> 45 #import <WebCore/Settings.h> 46 #import <WebCore/TiledBacking.h> 47 #import <wtf/MainThread.h> 48 49 #if ENABLE(THREADED_SCROLLING) 48 50 #import <WebCore/ScrollingCoordinator.h> 49 51 #import <WebCore/ScrollingThread.h> 50 52 #import <WebCore/ScrollingTree.h> 51 #import <WebCore/Settings.h> 52 #import <WebCore/TiledBacking.h> 53 #import <wtf/MainThread.h> 53 #endif 54 54 55 55 @interface CATransaction (Details) … … 74 74 , m_updateIntrinsicContentSizeTimer(this, &TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired) 75 75 { 76 Page* page = m_webPage->corePage(); 77 78 page->settings().setScrollingCoordinatorEnabled(true); 79 page->settings().setForceCompositingMode(true); 80 81 WebProcess::shared().eventDispatcher().addScrollingTreeForPage(webPage); 76 m_webPage->corePage()->settings().setForceCompositingMode(true); 82 77 83 78 m_rootLayer = [CALayer layer]; … … 98 93 TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea() 99 94 { 100 WebProcess::shared().eventDispatcher().removeScrollingTreeForPage(m_webPage);101 102 95 m_layerFlushScheduler.invalidate(); 103 96 } … … 193 186 void TiledCoreAnimationDrawingArea::didInstallPageOverlay(PageOverlay* pageOverlay) 194 187 { 195 m_webPage->corePage()->scrollingCoordinator()->setForceMainThreadScrollLayerPositionUpdates(true); 188 #if ENABLE(THREADED_SCROLLING) 189 if (ScrollingCoordinator* scrollingCoordinator = m_webPage->corePage()->scrollingCoordinator()) 190 scrollingCoordinator->setForceMainThreadScrollLayerPositionUpdates(true); 191 #endif 196 192 197 193 createPageOverlayLayer(pageOverlay); … … 206 202 return; 207 203 208 if (Page* page = m_webPage->corePage()) 209 page->scrollingCoordinator()->setForceMainThreadScrollLayerPositionUpdates(false); 204 #if ENABLE(THREADED_SCROLLING) 205 if (Page* page = m_webPage->corePage()) { 206 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) 207 scrollingCoordinator->setForceMainThreadScrollLayerPositionUpdates(false); 208 } 209 #endif 210 210 } 211 211 … … 240 240 { 241 241 Settings& settings = m_webPage->corePage()->settings(); 242 bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled(); 243 ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled)); 242 243 #if ENABLE(THREADED_SCROLLING) 244 if (ScrollingCoordinator* scrollingCoordinator = m_webPage->corePage()->scrollingCoordinator()) { 245 bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled(); 246 ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, scrollingCoordinator->scrollingTree(), scrollingPerformanceLoggingEnabled)); 247 } 248 #endif 244 249 245 250 if (TiledBacking* tiledBacking = mainFrameTiledBacking()) … … 294 299 void TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>& functionRef) 295 300 { 301 Function<void ()> function = functionRef; 302 303 #if ENABLE(THREADED_SCROLLING) 304 if (!m_webPage->corePage()->scrollingCoordinator()) { 305 function(); 306 return; 307 } 308 296 309 m_webPage->ref(); 297 310 m_webPage->corePage()->scrollingCoordinator()->commitTreeStateIfNeeded(); … … 299 312 if (!m_layerTreeStateIsFrozen) 300 313 m_layerFlushScheduler.suspend(); 301 302 Function<void ()> function = functionRef;303 314 304 315 // It is possible for the drawing area to be destroyed before the bound block … … 319 330 webPage->deref(); 320 331 })); 332 #else 333 function(); 334 #endif 321 335 } 322 336 … … 691 705 } 692 706 707 bool TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrameView(const FrameView* frameView) 708 { 709 return frameView && frameView->isMainFrameView(); 710 } 711 693 712 } // namespace WebKit 694 695 #endif // ENABLE(THREADED_SCROLLING) -
trunk/Tools/ChangeLog
r156461 r156472 1 2013-09-26 Tim Horton <timothy_horton@apple.com> 2 3 Tiled drawing should not imply threaded scrolling 4 https://bugs.webkit.org/show_bug.cgi?id=121874 5 <rdar://problem/15071494> 6 7 Reviewed by Sam Weinig. 8 9 * WebKitTestRunner/mac/PlatformWebViewMac.mm: 10 (WTR::PlatformWebView::PlatformWebView): 11 The existing tiled-drawing layout tests require threaded scrolling to be enabled. 12 1 13 2013-09-26 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r154949 r156472 30 30 #import "WebKitTestRunnerDraggingInfo.h" 31 31 #import <WebKit2/WKImageCG.h> 32 #import <WebKit2/WKPreferencesPrivate.h> 32 33 #import <WebKit2/WKViewPrivate.h> 33 34 #import <wtf/RetainPtr.h> … … 133 134 WKTypeRef useTiledDrawingValue = options ? WKDictionaryGetItemForKey(options, useTiledDrawingKey.get()) : NULL; 134 135 bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue)); 136 137 // The tiled drawing specific tests also depend on threaded scrolling. 138 WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroupRef); 139 WKPreferencesSetThreadedScrollingEnabled(preferences, useTiledDrawing); 135 140 136 141 NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight);
Note: See TracChangeset
for help on using the changeset viewer.