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

Side by Side Diff: cc/scheduler.cc

Issue 11361223: cc: Remove cc::settings, move them to LayerTreeSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Using WebLayerTreeSettings for things WebKit can set Created 8 years, 1 month 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 | Annotate | Revision Log
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, scoped_ptr<FrameRateController> fr ameRateController)
14 : m_client(client) 14 : m_client(client)
15 , m_frameRateController(frameRateController.Pass()) 15 , m_frameRateController(frameRateController.Pass())
16 , m_insideProcessScheduledActions(false) 16 , m_insideProcessScheduledActions(false)
17 { 17 {
18 DCHECK(m_client); 18 DCHECK(m_client);
19 m_frameRateController->setClient(this); 19 m_frameRateController->setClient(this);
20 DCHECK(!m_stateMachine.vsyncCallbackNeeded()); 20 DCHECK(!m_stateMachine.vsyncCallbackNeeded());
21
22 m_stateMachine.setSettingsJankInsteadOfCheckerboard(m_client->settings().jan kInsteadOfCheckerboard);
21 } 23 }
22 24
23 Scheduler::~Scheduler() 25 Scheduler::~Scheduler()
24 { 26 {
25 m_frameRateController->setActive(false); 27 m_frameRateController->setActive(false);
26 } 28 }
27 29
28 void Scheduler::setCanBeginFrame(bool can) 30 void Scheduler::setCanBeginFrame(bool can)
29 { 31 {
30 m_stateMachine.setCanBeginFrame(can); 32 m_stateMachine.setCanBeginFrame(can);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 184 }
183 action = m_stateMachine.nextAction(); 185 action = m_stateMachine.nextAction();
184 } 186 }
185 187
186 // Activate or deactivate the frame rate controller. 188 // Activate or deactivate the frame rate controller.
187 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); 189 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded());
188 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() ); 190 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() );
189 } 191 }
190 192
191 } // namespace cc 193 } // namespace cc
OLDNEW
« cc/layer_tree_host.cc ('K') | « cc/scheduler.h ('k') | cc/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698