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

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

Issue 2767933002: [cc] Don't send missed BeginFrames with past deadline.
Patch Set: add ExternalBFS tests, don't check in DelayBasedBFS. Created 3 years, 9 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_DELAY_BASED_TIME_SOURCE_H_ 5 #ifndef CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void SetActive(bool active); 49 void SetActive(bool active);
50 bool Active() const; 50 bool Active() const;
51 51
52 // Get the last and next tick times. NextTickTime() returns null when 52 // Get the last and next tick times. NextTickTime() returns null when
53 // inactive. 53 // inactive.
54 base::TimeTicks LastTickTime() const; 54 base::TimeTicks LastTickTime() const;
55 base::TimeTicks NextTickTime() const; 55 base::TimeTicks NextTickTime() const;
56 56
57 virtual void AsValueInto(base::trace_event::TracedValue* dict) const; 57 virtual void AsValueInto(base::trace_event::TracedValue* dict) const;
58 58
59 // Virtual for testing.
60 virtual base::TimeTicks Now() const;
61
59 protected: 62 protected:
60 // Virtual for testing. 63 // Virtual for testing.
61 virtual base::TimeTicks Now() const;
62 virtual std::string TypeString() const; 64 virtual std::string TypeString() const;
63 65
64 private: 66 private:
65 void PostNextTickTask(base::TimeTicks now); 67 void PostNextTickTask(base::TimeTicks now);
66 void ResetTickTask(base::TimeTicks now); 68 void ResetTickTask(base::TimeTicks now);
67 69
68 void OnTimerTick(); 70 void OnTimerTick();
69 71
70 DelayBasedTimeSourceClient* client_; 72 DelayBasedTimeSourceClient* client_;
71 73
(...skipping 10 matching lines...) Expand all
82 base::SingleThreadTaskRunner* task_runner_; 84 base::SingleThreadTaskRunner* task_runner_;
83 85
84 base::WeakPtrFactory<DelayBasedTimeSource> weak_factory_; 86 base::WeakPtrFactory<DelayBasedTimeSource> weak_factory_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource); 88 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource);
87 }; 89 };
88 90
89 } // namespace cc 91 } // namespace cc
90 92
91 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 93 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/scheduler/begin_frame_source_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698