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

Side by Side Diff: cc/scheduler/scheduler.h

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/delay_based_time_source.h ('k') | cc/scheduler/scheduler.cc » ('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 #ifndef CC_SCHEDULER_SCHEDULER_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_H_
6 #define CC_SCHEDULER_SCHEDULER_H_ 6 #define CC_SCHEDULER_SCHEDULER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/cancelable_callback.h" 12 #include "base/cancelable_callback.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "cc/base/cc_export.h"
16 #include "cc/output/begin_frame_args.h" 15 #include "cc/output/begin_frame_args.h"
17 #include "cc/output/vsync_parameter_observer.h" 16 #include "cc/output/vsync_parameter_observer.h"
18 #include "cc/scheduler/begin_frame_source.h" 17 #include "cc/scheduler/begin_frame_source.h"
19 #include "cc/scheduler/delay_based_time_source.h" 18 #include "cc/scheduler/delay_based_time_source.h"
20 #include "cc/scheduler/draw_result.h" 19 #include "cc/scheduler/draw_result.h"
21 #include "cc/scheduler/scheduler_settings.h" 20 #include "cc/scheduler/scheduler_settings.h"
22 #include "cc/scheduler/scheduler_state_machine.h" 21 #include "cc/scheduler/scheduler_state_machine.h"
23 22
24 namespace base { 23 namespace base {
25 namespace trace_event { 24 namespace trace_event {
(...skipping 25 matching lines...) Expand all
51 50
52 protected: 51 protected:
53 virtual ~SchedulerClient() {} 52 virtual ~SchedulerClient() {}
54 }; 53 };
55 54
56 class Scheduler; 55 class Scheduler;
57 // This class exists to allow tests to override the frame source construction. 56 // This class exists to allow tests to override the frame source construction.
58 // A virtual method can't be used as this needs to happen in the constructor 57 // A virtual method can't be used as this needs to happen in the constructor
59 // (see C++ FAQ / Section 23 - http://goo.gl/fnrwom for why). 58 // (see C++ FAQ / Section 23 - http://goo.gl/fnrwom for why).
60 // This class exists solely long enough to construct the frame sources. 59 // This class exists solely long enough to construct the frame sources.
61 class CC_EXPORT SchedulerFrameSourcesConstructor { 60 class SchedulerFrameSourcesConstructor {
62 public: 61 public:
63 virtual ~SchedulerFrameSourcesConstructor() {} 62 virtual ~SchedulerFrameSourcesConstructor() {}
64 virtual BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler); 63 virtual BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler);
65 virtual BeginFrameSource* ConstructBackgroundFrameSource( 64 virtual BeginFrameSource* ConstructBackgroundFrameSource(
66 Scheduler* scheduler); 65 Scheduler* scheduler);
67 virtual BeginFrameSource* ConstructUnthrottledFrameSource( 66 virtual BeginFrameSource* ConstructUnthrottledFrameSource(
68 Scheduler* scheduler); 67 Scheduler* scheduler);
69 68
70 protected: 69 protected:
71 SchedulerFrameSourcesConstructor() {} 70 SchedulerFrameSourcesConstructor() {}
72 71
73 friend class Scheduler; 72 friend class Scheduler;
74 }; 73 };
75 74
76 class CC_EXPORT Scheduler : public BeginFrameObserverMixIn { 75 class Scheduler : public BeginFrameObserverMixIn {
77 public: 76 public:
78 static scoped_ptr<Scheduler> Create( 77 static scoped_ptr<Scheduler> Create(
79 SchedulerClient* client, 78 SchedulerClient* client,
80 const SchedulerSettings& scheduler_settings, 79 const SchedulerSettings& scheduler_settings,
81 int layer_tree_host_id, 80 int layer_tree_host_id,
82 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 81 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
83 scoped_ptr<BeginFrameSource> external_begin_frame_source) { 82 scoped_ptr<BeginFrameSource> external_begin_frame_source) {
84 SchedulerFrameSourcesConstructor frame_sources_constructor; 83 SchedulerFrameSourcesConstructor frame_sources_constructor;
85 return make_scoped_ptr(new Scheduler(client, 84 return make_scoped_ptr(new Scheduler(client,
86 scheduler_settings, 85 scheduler_settings,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 245
247 friend class SchedulerFrameSourcesConstructor; 246 friend class SchedulerFrameSourcesConstructor;
248 friend class TestSchedulerFrameSourcesConstructor; 247 friend class TestSchedulerFrameSourcesConstructor;
249 248
250 DISALLOW_COPY_AND_ASSIGN(Scheduler); 249 DISALLOW_COPY_AND_ASSIGN(Scheduler);
251 }; 250 };
252 251
253 } // namespace cc 252 } // namespace cc
254 253
255 #endif // CC_SCHEDULER_SCHEDULER_H_ 254 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/scheduler/delay_based_time_source.h ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698