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

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

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 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
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.cc ('k') | cc/scheduler/delay_based_time_source.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_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 <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bool active_; 88 bool active_;
89 89
90 base::SingleThreadTaskRunner* task_runner_; 90 base::SingleThreadTaskRunner* task_runner_;
91 base::WeakPtrFactory<DelayBasedTimeSource> weak_factory_; 91 base::WeakPtrFactory<DelayBasedTimeSource> weak_factory_;
92 92
93 private: 93 private:
94 friend class base::RefCounted<DelayBasedTimeSource>; 94 friend class base::RefCounted<DelayBasedTimeSource>;
95 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource); 95 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource);
96 }; 96 };
97 97
98 // DelayBasedTimeSource uses base::TimeTicks::HighResNow as its timebase. 98 // DelayBasedTimeSource that once used base::TimeTicks::HighResNow as its time
99 // source, but is now a no-op.
100 // TODO(brianderson): Remove along with gfx::/FrameTime.http://crbug.com/447329
99 class DelayBasedTimeSourceHighRes : public DelayBasedTimeSource { 101 class DelayBasedTimeSourceHighRes : public DelayBasedTimeSource {
100 public: 102 public:
101 static scoped_refptr<DelayBasedTimeSourceHighRes> Create( 103 static scoped_refptr<DelayBasedTimeSourceHighRes> Create(
102 base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner); 104 base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner);
103 105
104 base::TimeTicks Now() const override; 106 base::TimeTicks Now() const override;
105 107
106 protected: 108 protected:
107 DelayBasedTimeSourceHighRes(base::TimeDelta interval, 109 DelayBasedTimeSourceHighRes(base::TimeDelta interval,
108 base::SingleThreadTaskRunner* task_runner); 110 base::SingleThreadTaskRunner* task_runner);
109 ~DelayBasedTimeSourceHighRes() override; 111 ~DelayBasedTimeSourceHighRes() override;
110 112
111 std::string TypeString() const override; 113 std::string TypeString() const override;
112 114
113 private: 115 private:
114 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes); 116 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes);
115 }; 117 };
116 118
117 } // namespace cc 119 } // namespace cc
118 120
119 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 121 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698