Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp

Issue 10201008: Merge 114475 - [chromium] Ensure RateLimiter waits for Swapbuffers completion (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (revision 114962)
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (working copy)
@@ -634,12 +634,19 @@
if (it != m_rateLimiters.end())
it->second->start();
else {
- RefPtr<RateLimiter> rateLimiter = RateLimiter::create(context);
+ RefPtr<RateLimiter> rateLimiter = RateLimiter::create(context, this);
m_rateLimiters.set(context, rateLimiter);
rateLimiter->start();
}
}
+void CCLayerTreeHost::rateLimit()
+{
+ // Force a no-op command on the compositor context, so that any ratelimiting commands will wait for the compositing
+ // context, and therefore for the SwapBuffers.
+ m_proxy->forceSerializeOnSwapBuffers();
+}
+
void CCLayerTreeHost::stopRateLimiter(GraphicsContext3D* context)
{
RateLimiterMap::iterator it = m_rateLimiters.find(context);
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h ('k') | Source/WebCore/platform/graphics/chromium/cc/CCProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698