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

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

Issue 9950004: Merge 112446 - [chromium] Scheduler should not tell FrameRateController to begin a frame when we do… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp (revision 112607)
+++ Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp (working copy)
@@ -561,13 +561,16 @@
m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginContextRecreation));
}
-bool CCThreadProxy::scheduledActionDrawAndSwapInternal(bool forcedDraw)
+CCScheduledActionDrawAndSwapResult CCThreadProxy::scheduledActionDrawAndSwapInternal(bool forcedDraw)
{
TRACE_EVENT("CCThreadProxy::scheduledActionDrawAndSwap", this, 0);
+ CCScheduledActionDrawAndSwapResult result;
+ result.didDraw = false;
+ result.didSwap = false;
ASSERT(isImplThread());
ASSERT(m_layerTreeHostImpl);
if (!m_layerTreeHostImpl)
- return false;
+ return result;
// FIXME: compute the frame display time more intelligently
double monotonicTime = monotonicallyIncreasingTime();
@@ -577,8 +580,10 @@
m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
CCLayerTreeHostImpl::FrameData frame;
bool drawFrame = m_layerTreeHostImpl->prepareToDraw(frame) || forcedDraw;
- if (drawFrame)
+ if (drawFrame) {
m_layerTreeHostImpl->drawLayers(frame);
+ result.didDraw = true;
+ }
// Check for a pending compositeAndReadback.
if (m_readbackRequestOnImplThread) {
@@ -590,7 +595,7 @@
}
if (drawFrame)
- m_layerTreeHostImpl->swapBuffers();
+ result.didSwap = m_layerTreeHostImpl->swapBuffers();
// Process any finish request
if (m_finishAllRenderingCompletionEventOnImplThread) {
@@ -607,17 +612,17 @@
}
ASSERT(drawFrame || (!drawFrame && !forcedDraw));
- return drawFrame;
+ return result;
}
-bool CCThreadProxy::scheduledActionDrawAndSwapIfPossible()
+CCScheduledActionDrawAndSwapResult CCThreadProxy::scheduledActionDrawAndSwapIfPossible()
{
return scheduledActionDrawAndSwapInternal(false);
}
-void CCThreadProxy::scheduledActionDrawAndSwapForced()
+CCScheduledActionDrawAndSwapResult CCThreadProxy::scheduledActionDrawAndSwapForced()
{
- scheduledActionDrawAndSwapInternal(true);
+ return scheduledActionDrawAndSwapInternal(true);
}
void CCThreadProxy::didCommitAndDrawFrame()
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698