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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170838
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-07-06 Tim Horton <timothy_horton@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 <yoav@yoav.ws>
Turn on img@sizes compile flag
#endif
virtual void updateDebugIndicator() { }
- virtual void setShouldShowDebugIndicator(bool) { }
virtual void waitForDidUpdateViewState() { }
inspector()->enableRemoteInspection();
#endif
- if (m_drawingArea)
- m_drawingArea->setShouldShowDebugIndicator(m_preferences->tiledScrollingIndicatorVisible());
-
m_process->pagePreferencesChanged(this);
m_pageClient.preferencesDidChange();
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;
virtual void updateDebugIndicator() override;
void updateDebugIndicator(WebCore::IntSize contentsSize, bool rootLayerChanged, float scale);
void updateDebugIndicatorPosition();
+ void initializeDebugIndicator();
virtual void waitForDidUpdateViewState() override;
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();
}
}
-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);