Title: [109521] trunk/Source/WebCore
- Revision
- 109521
- Author
- [email protected]
- Date
- 2012-03-02 00:11:42 -0800 (Fri, 02 Mar 2012)
Log Message
[chromium] Send didCommitAndDrawFrame after swap
https://bugs.webkit.org/show_bug.cgi?id=80052
Patch by John Bauman <[email protected]> on 2012-03-02
Reviewed by James Robinson.
Sending didCommitAndDrawFrame before the swap was causing plugins to
redraw themselves between compositing and the swap, which reduces
opportunities for optimization.
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::compositeAndReadback):
(WebCore::CCSingleThreadProxy::compositeImmediately):
(WebCore::CCSingleThreadProxy::doComposite):
(WebCore):
(WebCore::CCSingleThreadProxy::didSwapFrame):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(CCSingleThreadProxy):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109520 => 109521)
--- trunk/Source/WebCore/ChangeLog 2012-03-02 08:06:44 UTC (rev 109520)
+++ trunk/Source/WebCore/ChangeLog 2012-03-02 08:11:42 UTC (rev 109521)
@@ -1,3 +1,23 @@
+2012-03-02 John Bauman <[email protected]>
+
+ [chromium] Send didCommitAndDrawFrame after swap
+ https://bugs.webkit.org/show_bug.cgi?id=80052
+
+ Reviewed by James Robinson.
+
+ Sending didCommitAndDrawFrame before the swap was causing plugins to
+ redraw themselves between compositing and the swap, which reduces
+ opportunities for optimization.
+
+ * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
+ (WebCore::CCSingleThreadProxy::compositeAndReadback):
+ (WebCore::CCSingleThreadProxy::compositeImmediately):
+ (WebCore::CCSingleThreadProxy::doComposite):
+ (WebCore):
+ (WebCore::CCSingleThreadProxy::didSwapFrame):
+ * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
+ (CCSingleThreadProxy):
+
2012-03-02 Raymond Toy <[email protected]>
AudioParam needs tests for the parameter automation routines.
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (109520 => 109521)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp 2012-03-02 08:06:44 UTC (rev 109520)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp 2012-03-02 08:11:42 UTC (rev 109521)
@@ -80,6 +80,8 @@
m_layerTreeHostImpl->readback(pixels, rect);
+ didSwapFrame();
+
if (m_layerTreeHostImpl->isContextLost())
return false;
@@ -266,8 +268,10 @@
if (!commitIfNeeded())
return;
- if (doComposite())
+ if (doComposite()) {
m_layerTreeHostImpl->swapBuffers();
+ didSwapFrame();
+ }
}
bool CCSingleThreadProxy::commitIfNeeded()
@@ -297,12 +301,15 @@
return false;
}
+ return true;
+}
+
+void CCSingleThreadProxy::didSwapFrame()
+{
if (m_nextFrameIsNewlyCommittedFrame) {
m_nextFrameIsNewlyCommittedFrame = false;
m_layerTreeHost->didCommitAndDrawFrame();
}
-
- return true;
}
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h (109520 => 109521)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h 2012-03-02 08:06:44 UTC (rev 109520)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h 2012-03-02 08:11:42 UTC (rev 109521)
@@ -76,6 +76,7 @@
bool commitIfNeeded();
void doCommit();
bool doComposite();
+ void didSwapFrame();
// Accessed on main thread only.
CCLayerTreeHost* m_layerTreeHost;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes