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

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

Issue 1136123009: Remove "mixin" from BeginFrameSource/Observer base classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler); 65 virtual BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler);
66 virtual BeginFrameSource* ConstructUnthrottledFrameSource( 66 virtual BeginFrameSource* ConstructUnthrottledFrameSource(
67 Scheduler* scheduler); 67 Scheduler* scheduler);
68 68
69 protected: 69 protected:
70 SchedulerFrameSourcesConstructor() {} 70 SchedulerFrameSourcesConstructor() {}
71 71
72 friend class Scheduler; 72 friend class Scheduler;
73 }; 73 };
74 74
75 class CC_EXPORT Scheduler : public BeginFrameObserverMixIn { 75 class CC_EXPORT Scheduler : public BeginFrameObserverBase {
76 public: 76 public:
77 static scoped_ptr<Scheduler> Create( 77 static scoped_ptr<Scheduler> Create(
78 SchedulerClient* client, 78 SchedulerClient* client,
79 const SchedulerSettings& scheduler_settings, 79 const SchedulerSettings& scheduler_settings,
80 int layer_tree_host_id, 80 int layer_tree_host_id,
81 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 81 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
82 scoped_ptr<BeginFrameSource> external_begin_frame_source) { 82 scoped_ptr<BeginFrameSource> external_begin_frame_source) {
83 SchedulerFrameSourcesConstructor frame_sources_constructor; 83 SchedulerFrameSourcesConstructor frame_sources_constructor;
84 return make_scoped_ptr(new Scheduler(client, 84 return make_scoped_ptr(new Scheduler(client,
85 scheduler_settings, 85 scheduler_settings,
86 layer_tree_host_id, 86 layer_tree_host_id,
87 task_runner, 87 task_runner,
88 external_begin_frame_source.Pass(), 88 external_begin_frame_source.Pass(),
89 &frame_sources_constructor)); 89 &frame_sources_constructor));
90 } 90 }
91 91
92 ~Scheduler() override; 92 ~Scheduler() override;
93 93
94 // BeginFrameObserverMixin 94 // BeginFrameObserverBase
95 bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override; 95 bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override;
96 96
97 void OnDrawForOutputSurface(); 97 void OnDrawForOutputSurface();
98 98
99 const SchedulerSettings& settings() const { return settings_; } 99 const SchedulerSettings& settings() const { return settings_; }
100 100
101 void CommitVSyncParameters(base::TimeTicks timebase, 101 void CommitVSyncParameters(base::TimeTicks timebase,
102 base::TimeDelta interval); 102 base::TimeDelta interval);
103 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); 103 void SetEstimatedParentDrawTime(base::TimeDelta draw_time);
104 104
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 friend class SchedulerFrameSourcesConstructor; 253 friend class SchedulerFrameSourcesConstructor;
254 friend class TestSchedulerFrameSourcesConstructor; 254 friend class TestSchedulerFrameSourcesConstructor;
255 255
256 DISALLOW_COPY_AND_ASSIGN(Scheduler); 256 DISALLOW_COPY_AND_ASSIGN(Scheduler);
257 }; 257 };
258 258
259 } // namespace cc 259 } // namespace cc
260 260
261 #endif // CC_SCHEDULER_SCHEDULER_H_ 261 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« cc/scheduler/begin_frame_source_unittest.cc ('K') | « cc/scheduler/begin_frame_source_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698