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

Unified Diff: cc/scheduler_state_machine.cc

Issue 11830040: cc: Do not request redraw on commit when impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_draw3
Patch Set: Use CC_EXPORT Created 7 years, 11 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/scheduler_state_machine.h ('k') | cc/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler_state_machine.cc
diff --git a/cc/scheduler_state_machine.cc b/cc/scheduler_state_machine.cc
index f9d8cbc8f5b90b834ab8a1102f5de8b3b9384221..5d6229703f8fd5285d6c4bf5e0b9d09e884f6a59 100644
--- a/cc/scheduler_state_machine.cc
+++ b/cc/scheduler_state_machine.cc
@@ -9,8 +9,9 @@
namespace cc {
-SchedulerStateMachine::SchedulerStateMachine()
- : m_commitState(COMMIT_STATE_IDLE)
+SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
+ : m_settings(settings)
+ , m_commitState(COMMIT_STATE_IDLE)
, m_currentFrameNumber(0)
, m_lastFrameNumberWhereDrawWasCalled(-1)
, m_lastFrameNumberWhereTreeActivationAttempted(-1)
@@ -209,7 +210,9 @@ void SchedulerStateMachine::updateState(Action action)
m_commitState = COMMIT_STATE_WAITING_FOR_FIRST_FORCED_DRAW;
else
m_commitState = COMMIT_STATE_WAITING_FOR_FIRST_DRAW;
- m_needsRedraw = true;
+ // When impl-side painting, we draw on activation instead of on commit.
+ if (!m_settings.implSidePainting)
+ m_needsRedraw = true;
if (m_drawIfPossibleFailed)
m_lastFrameNumberWhereDrawWasCalled = -1;
« no previous file with comments | « cc/scheduler_state_machine.h ('k') | cc/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698