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); |