Title: [115671] trunk/Source/WebKit2
Revision
115671
Author
[email protected]
Date
2012-04-30 14:38:59 -0700 (Mon, 30 Apr 2012)

Log Message

Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
https://bugs.webkit.org/show_bug.cgi?id=85232

Reviewed by Sam Weinig.

Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::dispatchBackToMainThread):
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (115670 => 115671)


--- trunk/Source/WebKit2/ChangeLog	2012-04-30 21:37:14 UTC (rev 115670)
+++ trunk/Source/WebKit2/ChangeLog	2012-04-30 21:38:59 UTC (rev 115671)
@@ -1,3 +1,24 @@
+2012-04-30  Anders Carlsson  <[email protected]>
+
+        Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
+        https://bugs.webkit.org/show_bug.cgi?id=85232
+
+        Reviewed by Sam Weinig.
+
+        Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling.
+
+        * WebProcess/WebPage/DrawingArea.cpp:
+        (WebKit::DrawingArea::create):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
+        (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
+        (WebKit::dispatchBackToMainThread):
+        (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
+        (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
+        (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
+        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
+
 2012-04-30  Benjamin Poulain  <[email protected]>
 
         Add String::startsWith() and endsWith() for string literals

Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp (115670 => 115671)


--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp	2012-04-30 21:37:14 UTC (rev 115670)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp	2012-04-30 21:38:59 UTC (rev 115671)
@@ -29,7 +29,7 @@
 // Subclasses
 #include "DrawingAreaImpl.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && ENABLE(THREADED_SCROLLING)
 #include "TiledCoreAnimationDrawingArea.h"
 #endif
 
@@ -42,7 +42,7 @@
     switch (parameters.drawingAreaType) {
     case DrawingAreaTypeImpl:
         return DrawingAreaImpl::create(webPage, parameters);
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && ENABLE(THREADED_SCROLLING)
     case DrawingAreaTypeTiledCoreAnimation:
         return TiledCoreAnimationDrawingArea::create(webPage, parameters);
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (115670 => 115671)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h	2012-04-30 21:37:14 UTC (rev 115670)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h	2012-04-30 21:38:59 UTC (rev 115671)
@@ -26,6 +26,8 @@
 #ifndef TiledCoreAnimationDrawingArea_h
 #define TiledCoreAnimationDrawingArea_h
 
+#if ENABLE(THREADED_SCROLLING)
+
 #include "DrawingArea.h"
 #include "LayerTreeContext.h"
 #include <WebCore/GraphicsLayerClient.h>
@@ -102,4 +104,6 @@
 
 } // namespace WebKit
 
+#endif // ENABLE(THREADED_SCROLLING)
+
 #endif // TiledCoreAnimationDrawingArea_h

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (115670 => 115671)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-04-30 21:37:14 UTC (rev 115670)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-04-30 21:38:59 UTC (rev 115671)
@@ -26,6 +26,8 @@
 #import "config.h"
 #import "TiledCoreAnimationDrawingArea.h"
 
+#if ENABLE(THREADED_SCROLLING)
+
 #import "DrawingAreaProxyMessages.h"
 #import "EventDispatcher.h"
 #import "LayerHostingContext.h"
@@ -68,12 +70,9 @@
 
     // FIXME: It's weird that we're mucking around with the settings here.
     page->settings()->setForceCompositingMode(true);
-
-#if ENABLE(THREADED_SCROLLING)
     page->settings()->setScrollingCoordinatorEnabled(true);
 
     WebProcess::shared().eventDispatcher().addScrollingTreeForPage(webPage);
-#endif
 
     m_rootLayer = [CALayer layer];
 
@@ -94,9 +93,7 @@
 
 TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea()
 {
-#if ENABLE(THREADED_SCROLLING)
     WebProcess::shared().eventDispatcher().removeScrollingTreeForPage(m_webPage);
-#endif
 
     m_layerFlushScheduler.invalidate();
 }
@@ -138,7 +135,6 @@
     [CATransaction synchronize];
 }
 
-#if ENABLE(THREADED_SCROLLING)
 static void forceRepaintAndSendMessage(uint64_t webPageID, uint64_t callbackID)
 {
     WebPage* webPage = WebProcess::shared().webPage(webPageID);
@@ -153,19 +149,14 @@
 {
     callOnMainThread(bind(forceRepaintAndSendMessage, webPageID, callbackID));
 }
-#endif
 
 bool TiledCoreAnimationDrawingArea::forceRepaintAsync(uint64_t callbackID)
 {
-#if ENABLE(THREADED_SCROLLING)
     if (m_layerTreeStateIsFrozen)
         return false;
 
     ScrollingThread::dispatch(bind(dispatchBackToMainThread, m_webPage->pageID(), callbackID));
     return true;
-#else
-    return false;
-#endif
 }
 
 void TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen(bool layerTreeStateIsFrozen)
@@ -192,9 +183,7 @@
 
 void TiledCoreAnimationDrawingArea::didInstallPageOverlay()
 {
-#if ENABLE(THREADED_SCROLLING)
     m_webPage->corePage()->scrollingCoordinator()->setForceMainThreadScrollLayerPositionUpdates(true);
-#endif
 
     createPageOverlayLayer();
     scheduleCompositingLayerSync();
@@ -202,10 +191,8 @@
 
 void TiledCoreAnimationDrawingArea::didUninstallPageOverlay()
 {
-#if ENABLE(THREADED_SCROLLING)
     if (Page* page = m_webPage->corePage())
         page->scrollingCoordinator()->setForceMainThreadScrollLayerPositionUpdates(false);
-#endif
 
     destroyPageOverlayLayer();
     scheduleCompositingLayerSync();
@@ -233,9 +220,7 @@
         m_debugInfoLayer = nullptr;
     }
 
-#if ENABLE(THREADED_SCROLLING)
     ScrollingThread::dispatch(bind(&ScrollingTree::setDebugRootLayer, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), m_debugInfoLayer));
-#endif
 }
 
 void TiledCoreAnimationDrawingArea::notifyAnimationStarted(const GraphicsLayer*, double)
@@ -404,3 +389,5 @@
 }
 
 } // namespace WebKit
+
+#endif // ENABLE(THREADED_SCROLLING)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to