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

Side by Side Diff: cc/test/scheduler_test_common.h

Issue 2659123004: cc: Add scheduler support for invalidating content on impl thread. (Closed)
Patch Set: no DCHECK Created 3 years, 10 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/scheduler_unittest.cc ('k') | cc/trees/proxy_impl.h » ('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_TEST_SCHEDULER_TEST_COMMON_H_ 5 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_
6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ 6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 bool begin_frames_expected() const { 143 bool begin_frames_expected() const {
144 return begin_frame_source_ && observing_begin_frame_source_; 144 return begin_frame_source_ && observing_begin_frame_source_;
145 } 145 }
146 146
147 int current_frame_number() const { 147 int current_frame_number() const {
148 return state_machine_.current_frame_number(); 148 return state_machine_.current_frame_number();
149 } 149 }
150 150
151 bool needs_impl_side_invalidation() const {
152 return state_machine_.needs_impl_side_invalidation();
153 }
154
151 ~TestScheduler() override; 155 ~TestScheduler() override;
152 156
153 base::TimeDelta BeginImplFrameInterval() { 157 base::TimeDelta BeginImplFrameInterval() {
154 return begin_impl_frame_tracker_.Interval(); 158 return begin_impl_frame_tracker_.Interval();
155 } 159 }
156 160
157 // Note: This setting will be overriden on the next BeginFrame in the 161 // Note: This setting will be overriden on the next BeginFrame in the
158 // scheduler. To control the value it gets on the next BeginFrame 162 // scheduler. To control the value it gets on the next BeginFrame
159 // Pass in a fake CompositorTimingHistory that indicates BeginMainFrame 163 // Pass in a fake CompositorTimingHistory that indicates BeginMainFrame
160 // to Activation is fast. 164 // to Activation is fast.
161 void SetCriticalBeginMainFrameToActivateIsFast(bool is_fast) { 165 void SetCriticalBeginMainFrameToActivateIsFast(bool is_fast) {
162 state_machine_.SetCriticalBeginMainFrameToActivateIsFast(is_fast); 166 state_machine_.SetCriticalBeginMainFrameToActivateIsFast(is_fast);
163 } 167 }
164 168
165 protected: 169 protected:
166 // Overridden from Scheduler. 170 // Overridden from Scheduler.
167 base::TimeTicks Now() const override; 171 base::TimeTicks Now() const override;
168 172
169 private: 173 private:
170 base::SimpleTestTickClock* now_src_; 174 base::SimpleTestTickClock* now_src_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 176 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
173 }; 177 };
174 178
175 } // namespace cc 179 } // namespace cc
176 180
177 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 181 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/trees/proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698