Title: [125034] trunk/Source/WebKit2
- Revision
- 125034
- Author
- [email protected]
- Date
- 2012-08-08 07:09:29 -0700 (Wed, 08 Aug 2012)
Log Message
[Qt] Snowshoe desktop crashes when opening a new tab
https://bugs.webkit.org/show_bug.cgi?id=92753
Reviewed by Jocelyn Turcotte.
Change back forceRepaint to consider the UI process state.
It has been tweaked to satisfy the needs of WKPageForceRepaint but
it has other callers so this new behavior was not safe. This patch
implements WebPage::forceRepaintAsync for testing purposes. It is
done by LayerTreeCoordinator that holds the callback and sends the
reply message in the next flushPendingLayerChanges. In theory it
could be implemented for the non conposited path in DrawingAreaImpl
as well but neither it is needed nor can I test it.
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::forceRepaintAsync):
(WebKit):
(WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::forceRepaintAsync):
(WebKit):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::forceRepaintAsync):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (125033 => 125034)
--- trunk/Source/WebKit2/ChangeLog 2012-08-08 13:21:41 UTC (rev 125033)
+++ trunk/Source/WebKit2/ChangeLog 2012-08-08 14:09:29 UTC (rev 125034)
@@ -1,3 +1,34 @@
+2012-08-08 Balazs Kelemen <[email protected]>
+
+ [Qt] Snowshoe desktop crashes when opening a new tab
+ https://bugs.webkit.org/show_bug.cgi?id=92753
+
+ Reviewed by Jocelyn Turcotte.
+
+ Change back forceRepaint to consider the UI process state.
+ It has been tweaked to satisfy the needs of WKPageForceRepaint but
+ it has other callers so this new behavior was not safe. This patch
+ implements WebPage::forceRepaintAsync for testing purposes. It is
+ done by LayerTreeCoordinator that holds the callback and sends the
+ reply message in the next flushPendingLayerChanges. In theory it
+ could be implemented for the non conposited path in DrawingAreaImpl
+ as well but neither it is needed nor can I test it.
+
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+ (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
+ (WebKit::LayerTreeCoordinator::forceRepaintAsync):
+ (WebKit):
+ (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+ (LayerTreeCoordinator):
+ * WebProcess/WebPage/DrawingAreaImpl.cpp:
+ (WebKit::DrawingAreaImpl::forceRepaintAsync):
+ (WebKit):
+ * WebProcess/WebPage/DrawingAreaImpl.h:
+ (DrawingAreaImpl):
+ * WebProcess/WebPage/LayerTreeHost.h:
+ (WebKit::LayerTreeHost::forceRepaintAsync):
+
2012-08-08 Mikhail Pozdnyakov <[email protected]>
[WK2] [WTR] Provide Resource Response dumping.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp (125033 => 125034)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp 2012-08-08 13:21:41 UTC (rev 125033)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp 2012-08-08 14:09:29 UTC (rev 125034)
@@ -37,6 +37,7 @@
#include "SurfaceUpdateInfo.h"
#include "WebCoreArgumentCoders.h"
#include "WebPage.h"
+#include "WebPageProxyMessages.h"
#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
#include <WebCore/Page.h>
@@ -78,6 +79,7 @@
, m_shouldSyncRootLayer(true)
, m_layerFlushTimer(this, &LayerTreeCoordinator::layerFlushTimerFired)
, m_layerFlushSchedulingEnabled(true)
+ , m_forceRepaintAsyncCallbackID(0)
{
// Create a root layer.
m_rootLayer = GraphicsLayer::create(this);
@@ -185,6 +187,15 @@
flushPendingLayerChanges();
}
+bool LayerTreeCoordinator::forceRepaintAsync(uint64_t callbackID)
+{
+ // We expect the UI process to not require a new repaint until the previous one has finished.
+ ASSERT(!m_forceRepaintAsyncCallbackID);
+ m_forceRepaintAsyncCallbackID = callbackID;
+ scheduleLayerFlush();
+ return true;
+}
+
void LayerTreeCoordinator::sizeDidChange(const WebCore::IntSize& newSize)
{
if (m_rootLayer->size() == newSize)
@@ -239,6 +250,9 @@
bool LayerTreeCoordinator::flushPendingLayerChanges()
{
+ if (m_waitingForUIProcess)
+ return false;
+
m_shouldSyncFrame = false;
bool didSync = m_webPage->corePage()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
m_nonCompositedContentLayer->syncCompositingStateForThisLayerOnly();
@@ -252,14 +266,19 @@
m_shouldSyncRootLayer = false;
}
- if (!m_shouldSyncFrame)
- return didSync;
+ if (m_shouldSyncFrame) {
+ didSync = true;
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::DidRenderFrame());
+ m_waitingForUIProcess = true;
+ m_shouldSyncFrame = false;
+ }
- m_webPage->send(Messages::LayerTreeCoordinatorProxy::DidRenderFrame());
- m_waitingForUIProcess = true;
- m_shouldSyncFrame = false;
+ if (m_forceRepaintAsyncCallbackID) {
+ m_webPage->send(Messages::WebPageProxy::VoidCallback(m_forceRepaintAsyncCallbackID));
+ m_forceRepaintAsyncCallbackID = 0;
+ }
- return true;
+ return didSync;
}
void LayerTreeCoordinator::syncLayerState(WebLayerID id, const WebLayerInfo& info)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h (125033 => 125034)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h 2012-08-08 13:21:41 UTC (rev 125033)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h 2012-08-08 14:09:29 UTC (rev 125034)
@@ -53,6 +53,7 @@
virtual void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&);
virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
virtual void forceRepaint();
+ virtual bool forceRepaintAsync(uint64_t callbackID);
virtual void sizeDidChange(const WebCore::IntSize& newSize);
virtual void didInstallPageOverlay();
@@ -139,6 +140,7 @@
void layerFlushTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
WebCore::Timer<LayerTreeCoordinator> m_layerFlushTimer;
bool m_layerFlushSchedulingEnabled;
+ uint64_t m_forceRepaintAsyncCallbackID;
};
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (125033 => 125034)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2012-08-08 13:21:41 UTC (rev 125033)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2012-08-08 14:09:29 UTC (rev 125034)
@@ -199,6 +199,11 @@
display();
}
+bool DrawingAreaImpl::forceRepaintAsync(uint64_t callbackID)
+{
+ return m_layerTreeHost && m_layerTreeHost->forceRepaintAsync(callbackID);
+}
+
void DrawingAreaImpl::didInstallPageOverlay()
{
if (m_layerTreeHost)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h (125033 => 125034)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h 2012-08-08 13:21:41 UTC (rev 125033)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h 2012-08-08 14:09:29 UTC (rev 125034)
@@ -57,6 +57,7 @@
virtual bool layerTreeStateIsFrozen() const { return m_layerTreeStateIsFrozen; }
virtual LayerTreeHost* layerTreeHost() const { return m_layerTreeHost.get(); }
virtual void forceRepaint();
+ virtual bool forceRepaintAsync(uint64_t callbackID);
virtual void didInstallPageOverlay();
virtual void didUninstallPageOverlay();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h (125033 => 125034)
--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h 2012-08-08 13:21:41 UTC (rev 125033)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h 2012-08-08 14:09:29 UTC (rev 125034)
@@ -73,6 +73,7 @@
virtual void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&) = 0;
virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) = 0;
virtual void forceRepaint() = 0;
+ virtual bool forceRepaintAsync(uint64_t callbackID) { return false; }
virtual void sizeDidChange(const WebCore::IntSize& newSize) = 0;
virtual void deviceScaleFactorDidChange() = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes