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

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

Issue 2555173003: [Do not submit] D3DKMTWaitForVerticalBlankEvent VSync prototype (Closed)
Patch Set: Added command line switch and experiment support Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BEGIN_FRAME_SOURCE_H_ 5 #ifndef CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_
6 #define CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ 6 #define CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // A BeginFrameSource that does nothing. 140 // A BeginFrameSource that does nothing.
141 class CC_EXPORT StubBeginFrameSource : public BeginFrameSource { 141 class CC_EXPORT StubBeginFrameSource : public BeginFrameSource {
142 public: 142 public:
143 void DidFinishFrame(BeginFrameObserver* obs, 143 void DidFinishFrame(BeginFrameObserver* obs,
144 const BeginFrameAck& ack) override {} 144 const BeginFrameAck& ack) override {}
145 void AddObserver(BeginFrameObserver* obs) override {} 145 void AddObserver(BeginFrameObserver* obs) override {}
146 void RemoveObserver(BeginFrameObserver* obs) override {} 146 void RemoveObserver(BeginFrameObserver* obs) override {}
147 bool IsThrottled() const override; 147 bool IsThrottled() const override;
148 }; 148 };
149 149
150 // A frame source which ticks itself independently. 150 // A frame source which parameters are updated externally.
151 class CC_EXPORT SyntheticBeginFrameSource : public BeginFrameSource { 151 class CC_EXPORT SyntheticBeginFrameSource : public BeginFrameSource {
152 public: 152 public:
153 ~SyntheticBeginFrameSource() override; 153 ~SyntheticBeginFrameSource() override;
154 154
155 // Depending on implementation this might either update parameters used to
156 // generate BeginFrame signal in BeginFrameSource or be used as an actual
157 // VSync signal.
155 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, 158 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase,
156 base::TimeDelta interval) = 0; 159 base::TimeDelta interval) = 0;
157 // This overrides any past or future interval from updating vsync parameters. 160 // This overrides any past or future interval from updating vsync parameters.
158 virtual void SetAuthoritativeVSyncInterval(base::TimeDelta interval) = 0; 161 virtual void SetAuthoritativeVSyncInterval(base::TimeDelta interval) = 0;
159 }; 162 };
160 163
161 // A frame source which calls BeginFrame (at the next possible time) as soon as 164 // A frame source which calls BeginFrame (at the next possible time) as soon as
162 // remaining frames reaches zero. 165 // remaining frames reaches zero.
163 class CC_EXPORT BackToBackBeginFrameSource : public SyntheticBeginFrameSource, 166 class CC_EXPORT BackToBackBeginFrameSource : public SyntheticBeginFrameSource,
164 public DelayBasedTimeSourceClient { 167 public DelayBasedTimeSourceClient {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ExternalBeginFrameSourceClient* client_; 265 ExternalBeginFrameSourceClient* client_;
263 bool paused_ = false; 266 bool paused_ = false;
264 267
265 private: 268 private:
266 DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource); 269 DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource);
267 }; 270 };
268 271
269 } // namespace cc 272 } // namespace cc
270 273
271 #endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ 274 #endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | content/browser/compositor/gpu_vsync_begin_frame_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698