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

Unified Diff: cc/CCScheduler.cpp

Issue 10909020: Enable webkit_compositor_unittests (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « cc/CCScheduler.h ('k') | cc/CCSchedulerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCScheduler.cpp
diff --git a/cc/CCScheduler.cpp b/cc/CCScheduler.cpp
index 5bfad3773d7d0826f4a0576889ede27c3cc0f051..1840b4a1dbaeb0bee461c87058d9ec3c697a4485 100644
--- a/cc/CCScheduler.cpp
+++ b/cc/CCScheduler.cpp
@@ -13,7 +13,6 @@ namespace WebCore {
CCScheduler::CCScheduler(CCSchedulerClient* client, PassOwnPtr<CCFrameRateController> frameRateController)
: m_client(client)
, m_frameRateController(frameRateController)
- , m_hasMoreResourceUpdates(false)
, m_updateMoreResourcesPending(false)
{
ASSERT(m_client);
@@ -68,10 +67,9 @@ void CCScheduler::setMainThreadNeedsLayerTextures()
processScheduledActions();
}
-void CCScheduler::beginFrameComplete(bool hasResourceUpdates)
+void CCScheduler::beginFrameComplete()
{
TRACE_EVENT0("cc", "CCScheduler::beginFrameComplete");
- m_hasMoreResourceUpdates = hasResourceUpdates;
m_stateMachine.beginFrameComplete();
processScheduledActions();
}
@@ -118,8 +116,7 @@ void CCScheduler::vsyncTick()
{
if (m_updateMoreResourcesPending) {
m_updateMoreResourcesPending = false;
- ASSERT(m_hasMoreResourceUpdates);
- m_stateMachine.beginUpdateMoreResourcesComplete(true);
+ m_stateMachine.beginUpdateMoreResourcesComplete(m_client->hasMoreResourceUpdates());
}
TRACE_EVENT0("cc", "CCScheduler::vsyncTick");
@@ -128,17 +125,6 @@ void CCScheduler::vsyncTick()
m_stateMachine.didLeaveVSync();
}
-void CCScheduler::updateResourcesComplete()
-{
- TRACE_EVENT0("cc", "CCScheduler::updateResourcesComplete");
- if (m_updateMoreResourcesPending) {
- m_updateMoreResourcesPending = false;
- m_stateMachine.beginUpdateMoreResourcesComplete(false);
- }
- m_hasMoreResourceUpdates = false;
- processScheduledActions();
-}
-
CCSchedulerStateMachine::Action CCScheduler::nextAction()
{
m_stateMachine.setCanDraw(m_client->canDraw());
@@ -168,7 +154,7 @@ void CCScheduler::processScheduledActions()
m_client->scheduledActionBeginFrame();
break;
case CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES:
- if (m_hasMoreResourceUpdates) {
+ if (m_client->hasMoreResourceUpdates()) {
m_client->scheduledActionUpdateMoreResources(m_frameRateController->nextTickTimeIfActivated());
m_updateMoreResourcesPending = true;
} else
« no previous file with comments | « cc/CCScheduler.h ('k') | cc/CCSchedulerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698