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

Side by Side Diff: cc/scheduler.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 unified diff | Download patch
« no previous file with comments | « cc/scheduler.h ('k') | cc/scheduler_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/scheduler.h" 5 #include "cc/scheduler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 Scheduler::Scheduler(SchedulerClient* client, scoped_ptr<FrameRateController> fr ameRateController) 13 Scheduler::Scheduler(SchedulerClient* client,
14 : m_client(client) 14 scoped_ptr<FrameRateController> frameRateController,
15 const SchedulerSettings& schedulerSettings)
16 : m_settings(schedulerSettings)
17 , m_client(client)
15 , m_frameRateController(frameRateController.Pass()) 18 , m_frameRateController(frameRateController.Pass())
19 , m_stateMachine(schedulerSettings)
16 , m_insideProcessScheduledActions(false) 20 , m_insideProcessScheduledActions(false)
17 { 21 {
18 DCHECK(m_client); 22 DCHECK(m_client);
19 m_frameRateController->setClient(this); 23 m_frameRateController->setClient(this);
20 DCHECK(!m_stateMachine.vsyncCallbackNeeded()); 24 DCHECK(!m_stateMachine.vsyncCallbackNeeded());
21 } 25 }
22 26
23 Scheduler::~Scheduler() 27 Scheduler::~Scheduler()
24 { 28 {
25 m_frameRateController->setActive(false); 29 m_frameRateController->setActive(false);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 201 }
198 action = m_stateMachine.nextAction(); 202 action = m_stateMachine.nextAction();
199 } 203 }
200 204
201 // Activate or deactivate the frame rate controller. 205 // Activate or deactivate the frame rate controller.
202 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); 206 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded());
203 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() ); 207 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() );
204 } 208 }
205 209
206 } // namespace cc 210 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler.h ('k') | cc/scheduler_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698