Title: [170838] trunk/Source/WebKit2
Revision
170838
Author
timothy_hor...@apple.com
Date
2014-07-06 23:04:51 -0700 (Sun, 06 Jul 2014)

Log Message

[WK2] Don't support dynamically enabling the RemoteLayerTree debug indicator
https://bugs.webkit.org/show_bug.cgi?id=134644

Reviewed by Darin Adler.

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
The indicator depends on the live layer tree commits coming in, including layer creation,
so it can't be turned on after the root layer is created. Even a refresh is insufficient
to get it working; the debug indicator really needs to exist from the first commit.
So, don't even attempt to dynamically enable the indicator; create it at
RemoteLayerTreeDrawingAreaProxy construction time if the pref is enabled.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (170837 => 170838)


--- trunk/Source/WebKit2/ChangeLog	2014-07-07 05:02:34 UTC (rev 170837)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-07 06:04:51 UTC (rev 170838)
@@ -1,3 +1,25 @@
+2014-07-06  Tim Horton  <timothy_hor...@apple.com>
+
+        [WK2] Don't support dynamically enabling the RemoteLayerTree debug indicator
+        https://bugs.webkit.org/show_bug.cgi?id=134644
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/DrawingAreaProxy.h:
+        (WebKit::DrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::preferencesDidChange):
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
+        The indicator depends on the live layer tree commits coming in, including layer creation,
+        so it can't be turned on after the root layer is created. Even a refresh is insufficient
+        to get it working; the debug indicator really needs to exist from the first commit.
+        So, don't even attempt to dynamically enable the indicator; create it at
+        RemoteLayerTreeDrawingAreaProxy construction time if the pref is enabled.
+
 2014-07-06  Yoav Weiss  <y...@yoav.ws>
 
         Turn on img@sizes compile flag

Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (170837 => 170838)


--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2014-07-07 05:02:34 UTC (rev 170837)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2014-07-07 06:04:51 UTC (rev 170838)
@@ -83,7 +83,6 @@
 #endif
 
     virtual void updateDebugIndicator() { }
-    virtual void setShouldShowDebugIndicator(bool) { }
 
     virtual void waitForDidUpdateViewState() { }
     

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (170837 => 170838)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-07-07 05:02:34 UTC (rev 170837)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-07-07 06:04:51 UTC (rev 170838)
@@ -2384,9 +2384,6 @@
         inspector()->enableRemoteInspection();
 #endif
 
-    if (m_drawingArea)
-        m_drawingArea->setShouldShowDebugIndicator(m_preferences->tiledScrollingIndicatorVisible());
-
     m_process->pagePreferencesChanged(this);
 
     m_pageClient.preferencesDidChange();

Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (170837 => 170838)


--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h	2014-07-07 05:02:34 UTC (rev 170837)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h	2014-07-07 06:04:51 UTC (rev 170838)
@@ -62,7 +62,6 @@
     virtual void dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)>) override;
 
     WebCore::FloatRect scaledExposedRect() const;
-    virtual void setShouldShowDebugIndicator(bool) override;
 
 #if PLATFORM(MAC)
     virtual void setExposedRect(const WebCore::FloatRect&) override;
@@ -72,6 +71,7 @@
     virtual void updateDebugIndicator() override;
     void updateDebugIndicator(WebCore::IntSize contentsSize, bool rootLayerChanged, float scale);
     void updateDebugIndicatorPosition();
+    void initializeDebugIndicator();
 
     virtual void waitForDidUpdateViewState() override;
     

Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (170837 => 170838)


--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm	2014-07-07 05:02:34 UTC (rev 170837)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm	2014-07-07 06:04:51 UTC (rev 170838)
@@ -60,7 +60,8 @@
 
     m_webPageProxy->process().addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID(), *this);
 
-    setShouldShowDebugIndicator(m_webPageProxy->preferences().tiledScrollingIndicatorVisible());
+    if (m_webPageProxy->preferences().tiledScrollingIndicatorVisible())
+        initializeDebugIndicator();
 
     m_layerCommitObserver = RunLoopObserver::create(didCommitLayersRunLoopOrder, [this]() {
         this->coreAnimationDidCommitLayers();
@@ -266,19 +267,8 @@
     }
 }
 
-void RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator(bool show)
+void RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator()
 {
-    if (show == !!m_debugIndicatorLayerTreeHost)
-        return;
-    
-    if (!show) {
-        [m_tileMapHostLayer removeFromSuperlayer];
-        m_tileMapHostLayer = nullptr;
-        m_exposedRectIndicatorLayer = nullptr;
-        m_debugIndicatorLayerTreeHost = nullptr;
-        return;
-    }
-    
     m_debugIndicatorLayerTreeHost = std::make_unique<RemoteLayerTreeHost>(*this);
     m_debugIndicatorLayerTreeHost->setIsDebugLayerTreeHost(true);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to