Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (140807 => 140808)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-01-25 10:48:14 UTC (rev 140807)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-01-25 11:03:30 UTC (rev 140808)
@@ -1,3 +1,28 @@
+2013-01-25 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r140774.
+ http://trac.webkit.org/changeset/140774
+ https://bugs.webkit.org/show_bug.cgi?id=107932
+
+ Tests ScrollingCoordinatorChromiumTest.fastScrollingByDefault
+ and fastScrollingForFixedPosition are failing (Requested by
+ keishi on #webkit).
+
+ * public/WebWidget.h:
+ (WebWidget):
+ (WebKit::WebWidget::isInputThrottled):
+ (WebKit::WebWidget::renderingStats):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::~WebViewImpl):
+ (WebKit::WebViewImpl::renderingStats):
+ (WebKit):
+ (WebKit::WebViewImpl::setCompositorSurfaceReady):
+ (WebKit::WebViewImpl::isInputThrottled):
+ (WebKit::WebViewImpl::setIsTransparent):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+
2013-01-25 Eberhard Graether <[email protected]>
Web Inspector: add checkbox for continuous painting to the inspector's settings
Modified: trunk/Source/WebKit/chromium/public/WebWidget.h (140807 => 140808)
--- trunk/Source/WebKit/chromium/public/WebWidget.h 2013-01-25 10:48:14 UTC (rev 140807)
+++ trunk/Source/WebKit/chromium/public/WebWidget.h 2013-01-25 11:03:30 UTC (rev 140808)
@@ -129,13 +129,22 @@
// Indicates that the compositing surface associated with this WebWidget is
// ready to use.
- virtual void setCompositorSurfaceReady() { }
+ virtual void setCompositorSurfaceReady() = 0;
// Temporary method for the embedder to notify the WebWidget that the widget
// has taken damage, e.g. due to a window expose. This method will be
// removed when the WebWidget inversion patch lands --- http://crbug.com/112837
virtual void setNeedsRedraw() { }
+ // Temporary method for the embedder to check for throttled input. When this
+ // is true, the WebWidget is indicating that it would prefer to not receive
+ // additional input events until
+ // WebWidgetClient::didBecomeReadyForAdditionalInput is called.
+ //
+ // This method will be removed when the WebWidget inversion patch lands ---
+ // http://crbug.com/112837
+ virtual bool isInputThrottled() const { return false; }
+
// Called to inform the WebWidget of a change in theme.
// Implementors that cache rendered copies of widgets need to re-render
// on receiving this message
@@ -238,6 +247,11 @@
// following the call to instrumentBeginFrame().
virtual void instrumentCancelFrame() { }
+ // Fills in a WebRenderingStats struct containing information about rendering, e.g. count of frames rendered, time spent painting.
+ // This call is relatively expensive in threaded compositing mode, as it blocks on the compositor thread.
+ // It is safe to call in software mode, but will only give stats for rendering done in compositing mode.
+ virtual void renderingStats(WebRenderingStats&) const { }
+
// The page background color. Can be used for filling in areas without
// content.
virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHITE */ }
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (140807 => 140808)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-01-25 10:48:14 UTC (rev 140807)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-01-25 11:03:30 UTC (rev 140808)
@@ -418,12 +418,14 @@
, m_benchmarkSupport(this)
#if USE(ACCELERATED_COMPOSITING)
, m_layerTreeView(0)
+ , m_ownsLayerTreeView(false)
, m_rootLayer(0)
, m_rootGraphicsLayer(0)
, m_isAcceleratedCompositingActive(false)
, m_layerTreeViewCommitsDeferred(false)
, m_compositorCreationFailed(false)
, m_recreatingGraphicsContext(false)
+ , m_compositorSurfaceReady(false)
, m_inputHandlerIdentifier(-1)
#endif
#if ENABLE(INPUT_SPEECH)
@@ -509,6 +511,8 @@
WebViewImpl::~WebViewImpl()
{
+ if (m_ownsLayerTreeView)
+ delete m_layerTreeView;
ASSERT(!m_page);
}
@@ -834,6 +838,12 @@
scheduleAnimation();
}
+void WebViewImpl::renderingStats(WebRenderingStats& stats) const
+{
+ if (m_layerTreeView)
+ m_layerTreeView->renderingStats(stats);
+}
+
void WebViewImpl::startPageScaleAnimation(const IntPoint& targetPosition, bool useAnchor, float newScale, double durationInSeconds)
{
WebPoint clampedPoint = targetPosition;
@@ -1764,6 +1774,13 @@
}
#endif
+void WebViewImpl::setCompositorSurfaceReady()
+{
+ m_compositorSurfaceReady = true;
+ if (m_layerTreeView)
+ m_layerTreeView->setSurfaceReady();
+}
+
void WebViewImpl::animate(double)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
@@ -1943,6 +1960,15 @@
#endif
}
+bool WebViewImpl::isInputThrottled() const
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_layerTreeView && isAcceleratedCompositingActive())
+ return m_layerTreeView->commitRequested();
+#endif
+ return false;
+}
+
void WebViewImpl::enterFullScreenForElement(WebCore::Element* element)
{
// We are already transitioning to fullscreen for a different element.
@@ -3579,6 +3605,9 @@
if (m_nonCompositedContentHost)
m_nonCompositedContentHost->setOpaque(!isTransparent);
+
+ if (m_layerTreeView)
+ m_layerTreeView->setHasTransparentBackground(isTransparent);
}
bool WebViewImpl::isTransparent() const
@@ -4062,6 +4091,10 @@
m_client->initializeLayerTreeView(this, *m_rootLayer, layerTreeViewSettings);
m_layerTreeView = m_client->layerTreeView();
+ if (!m_layerTreeView) {
+ m_layerTreeView = Platform::current()->compositorSupport()->createLayerTreeView(this, *m_rootLayer, layerTreeViewSettings);
+ m_ownsLayerTreeView = true;
+ }
if (m_layerTreeView) {
if (m_webSettings->applyDeviceScaleFactorInCompositor() && page()->deviceScaleFactor() != 1)
setDeviceScaleFactor(page()->deviceScaleFactor());
@@ -4069,6 +4102,8 @@
bool visible = page()->visibilityState() == PageVisibilityStateVisible;
m_layerTreeView->setVisible(visible);
m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor);
+ if (m_compositorSurfaceReady)
+ m_layerTreeView->setSurfaceReady();
m_layerTreeView->setHasTransparentBackground(isTransparent());
updateLayerTreeViewport();
m_client->didActivateCompositor(m_inputHandlerIdentifier);
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (140807 => 140808)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.h 2013-01-25 10:48:14 UTC (rev 140807)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h 2013-01-25 11:03:30 UTC (rev 140808)
@@ -143,6 +143,7 @@
virtual void didEnterFullScreen();
virtual void willExitFullScreen();
virtual void didExitFullScreen();
+ virtual void setCompositorSurfaceReady();
virtual void animate(double);
virtual void layout(); // Also implements WebLayerTreeViewClient::layout()
virtual void enterForceCompositingMode(bool enable) OVERRIDE;
@@ -151,6 +152,7 @@
virtual void themeChanged();
virtual void composite(bool finish);
virtual void setNeedsRedraw();
+ virtual bool isInputThrottled() const;
virtual bool handleInputEvent(const WebInputEvent&);
virtual bool hasTouchEventHandlersAt(const WebPoint&);
virtual void mouseCaptureLost();
@@ -182,6 +184,7 @@
virtual void didChangeWindowResizerRect();
virtual void instrumentBeginFrame();
virtual void instrumentCancelFrame();
+ virtual void renderingStats(WebRenderingStats&) const;
// WebView methods:
virtual void initializeMainFrame(WebFrameClient*);
@@ -840,6 +843,7 @@
WebCore::IntRect m_rootLayerScrollDamage;
OwnPtr<NonCompositedContentHost> m_nonCompositedContentHost;
WebLayerTreeView* m_layerTreeView;
+ bool m_ownsLayerTreeView;
WebLayer* m_rootLayer;
WebCore::GraphicsLayer* m_rootGraphicsLayer;
bool m_isAcceleratedCompositingActive;
@@ -847,6 +851,7 @@
bool m_compositorCreationFailed;
// If true, the graphics context is being restored.
bool m_recreatingGraphicsContext;
+ bool m_compositorSurfaceReady;
int m_inputHandlerIdentifier;
#endif
static const WebInputEvent* m_currentInputEvent;
Modified: trunk/Tools/ChangeLog (140807 => 140808)
--- trunk/Tools/ChangeLog 2013-01-25 10:48:14 UTC (rev 140807)
+++ trunk/Tools/ChangeLog 2013-01-25 11:03:30 UTC (rev 140808)
@@ -1,3 +1,17 @@
+2013-01-25 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r140774.
+ http://trac.webkit.org/changeset/140774
+ https://bugs.webkit.org/show_bug.cgi?id=107932
+
+ Tests ScrollingCoordinatorChromiumTest.fastScrollingByDefault
+ and fastScrollingForFixedPosition are failing (Requested by
+ keishi on #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ (WebViewHost::setWebWidget):
+
2013-01-25 Alan Cutter <[email protected]>
Quick fix for Chromium EWS bots running out of space due to a tmp file leak
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (140807 => 140808)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2013-01-25 10:48:14 UTC (rev 140807)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2013-01-25 11:03:30 UTC (rev 140808)
@@ -409,8 +409,6 @@
void WebViewHost::initializeLayerTreeView(WebLayerTreeViewClient* client, const WebLayer& rootLayer, const WebLayerTreeView::Settings& settings)
{
m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(client, rootLayer, settings));
- if (m_layerTreeView)
- m_layerTreeView->setSurfaceReady();
}
WebLayerTreeView* WebViewHost::layerTreeView()
@@ -1122,6 +1120,7 @@
m_webWidget = widget;
webView()->setSpellCheckClient(proxy()->spellCheckClient());
webView()->setPrerendererClient(this);
+ webView()->setCompositorSurfaceReady();
}
WebView* WebViewHost::webView() const