Diff
Modified: trunk/Source/WebCore/ChangeLog (107242 => 107243)
--- trunk/Source/WebCore/ChangeLog 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/ChangeLog 2012-02-09 15:40:32 UTC (rev 107243)
@@ -1,3 +1,26 @@
+2012-02-09 Jonathan Backer <[email protected]>
+
+ [chromium] Add setNeedsRedraw to WebWidget
+ https://bugs.webkit.org/show_bug.cgi?id=77555
+
+ Reviewed by James Robinson.
+
+ * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+ (WebCore::CCLayerTreeHost::setNeedsRedraw):
+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
+ (WebCore::CCLayerTreeHostImpl::setFullRootLayerDamage):
+ (WebCore):
+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
+ (CCLayerTreeHostImpl):
+ * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
+ (WebCore::CCSingleThreadProxy::setNeedsRedraw):
+ * platform/graphics/chromium/cc/CCThreadProxy.cpp:
+ (WebCore::CCThreadProxy::setNeedsRedraw):
+ (WebCore::CCThreadProxy::setFullRootLayerDamageOnImplThread):
+ (WebCore):
+ * platform/graphics/chromium/cc/CCThreadProxy.h:
+ (CCThreadProxy):
+
2012-02-09 Pavel Feldman <[email protected]>
Web Inspector: fix setOuterHTML for the case that adds / removes duplicate.
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (107242 => 107243)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2012-02-09 15:40:32 UTC (rev 107243)
@@ -254,9 +254,8 @@
void CCLayerTreeHost::setNeedsRedraw()
{
- if (CCThreadProxy::implThread())
- m_proxy->setNeedsRedraw();
- else
+ m_proxy->setNeedsRedraw();
+ if (!CCThreadProxy::implThread())
m_client->scheduleComposite();
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (107242 => 107243)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp 2012-02-09 15:40:32 UTC (rev 107243)
@@ -542,4 +542,13 @@
return scrollInfo.release();
}
+void CCLayerTreeHostImpl::setFullRootLayerDamage()
+{
+ if (rootLayer()) {
+ CCRenderSurface* renderSurface = rootLayer()->renderSurface();
+ if (renderSurface)
+ renderSurface->damageTracker()->forceFullDamageNextUpdate();
+ }
}
+
+}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h (107242 => 107243)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h 2012-02-09 15:40:32 UTC (rev 107243)
@@ -113,6 +113,10 @@
PassOwnPtr<CCScrollAndScaleSet> processScrollDeltas();
+ // Where possible, redraws are scissored to a damage region calculated from changes to
+ // layer properties. This function overrides the damage region for the next draw cycle.
+ void setFullRootLayerDamage();
+
protected:
CCLayerTreeHostImpl(const CCSettings&, CCLayerTreeHostImplClient*);
CCLayerTreeHostImplClient* m_client;
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (107242 => 107243)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp 2012-02-09 15:40:32 UTC (rev 107243)
@@ -201,6 +201,7 @@
{
// FIXME: Once we move render_widget scheduling into this class, we can
// treat redraw requests more efficiently than commitAndRedraw requests.
+ m_layerTreeHostImpl->setFullRootLayerDamage();
setNeedsCommit();
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp (107242 => 107243)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp 2012-02-09 15:40:32 UTC (rev 107243)
@@ -250,6 +250,7 @@
{
ASSERT(isMainThread());
TRACE_EVENT("CCThreadProxy::setNeedsRedraw", this, 0);
+ CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::setFullRootLayerDamageOnImplThread));
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::setNeedsRedrawOnImplThread));
}
@@ -597,6 +598,12 @@
completion->signal();
}
+void CCThreadProxy::setFullRootLayerDamageOnImplThread()
+{
+ ASSERT(isImplThread());
+ m_layerTreeHostImpl->setFullRootLayerDamage();
+}
+
size_t CCThreadProxy::maxPartialTextureUpdates() const
{
return textureUpdatesPerFrame;
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h (107242 => 107243)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h 2012-02-09 15:40:32 UTC (rev 107243)
@@ -103,6 +103,7 @@
void initializeLayerRendererOnImplThread(CCCompletionEvent*, bool* initializeSucceeded, LayerRendererCapabilities*);
void setVisibleOnImplThread(CCCompletionEvent*, bool visible);
void layerTreeHostClosedOnImplThread(CCCompletionEvent*);
+ void setFullRootLayerDamageOnImplThread();
// Accessed on main thread only.
bool m_animateRequested;
Modified: trunk/Source/WebKit/chromium/ChangeLog (107242 => 107243)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-02-09 15:40:32 UTC (rev 107243)
@@ -1,3 +1,19 @@
+2012-02-09 Jonathan Backer <[email protected]>
+
+ [chromium] Add setNeedsRedraw to WebWidget
+ https://bugs.webkit.org/show_bug.cgi?id=77555
+
+ Reviewed by James Robinson.
+
+ * public/WebWidget.h:
+ (WebWidget):
+ (WebKit::WebWidget::setNeedsRedraw):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setNeedsRedraw):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
2012-02-08 Raymond Liu <[email protected]>
Fix a typo for r107125
Modified: trunk/Source/WebKit/chromium/public/WebWidget.h (107242 => 107243)
--- trunk/Source/WebKit/chromium/public/WebWidget.h 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebKit/chromium/public/WebWidget.h 2012-02-09 15:40:32 UTC (rev 107243)
@@ -107,6 +107,11 @@
// animate or layout in this case.
virtual void composite(bool finish) = 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() { }
+
// 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
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (107242 => 107243)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-02-09 15:40:32 UTC (rev 107243)
@@ -1257,6 +1257,14 @@
#endif
}
+void WebViewImpl::setNeedsRedraw()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_layerTreeHost && isAcceleratedCompositingActive())
+ m_layerTreeHost->setNeedsRedraw();
+#endif
+}
+
void WebViewImpl::loseCompositorContext(int numTimes)
{
#if USE(ACCELERATED_COMPOSITING)
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (107242 => 107243)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.h 2012-02-09 15:26:58 UTC (rev 107242)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h 2012-02-09 15:40:32 UTC (rev 107243)
@@ -110,6 +110,7 @@
virtual void paint(WebCanvas*, const WebRect&);
virtual void themeChanged();
virtual void composite(bool finish);
+ virtual void setNeedsRedraw();
virtual bool handleInputEvent(const WebInputEvent&);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);