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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add scoped_abort_remaining_swap_promises.h Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test.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_TEST_LAYER_TREE_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_
6 #define CC_TEST_LAYER_TREE_TEST_H_ 6 #define CC_TEST_LAYER_TREE_TEST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/animation/animation_delegate.h" 10 #include "cc/animation/animation_delegate.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 virtual void WillBeginMainFrame() {} 64 virtual void WillBeginMainFrame() {}
65 virtual void DidBeginMainFrame() {} 65 virtual void DidBeginMainFrame() {}
66 virtual void Layout() {} 66 virtual void Layout() {}
67 virtual void DidInitializeOutputSurface() {} 67 virtual void DidInitializeOutputSurface() {}
68 virtual void DidFailToInitializeOutputSurface() {} 68 virtual void DidFailToInitializeOutputSurface() {}
69 virtual void DidAddAnimation() {} 69 virtual void DidAddAnimation() {}
70 virtual void WillCommit() {} 70 virtual void WillCommit() {}
71 virtual void DidCommit() {} 71 virtual void DidCommit() {}
72 virtual void DidCommitAndDrawFrame() {} 72 virtual void DidCommitAndDrawFrame() {}
73 virtual void DidCompleteSwapBuffers() {} 73 virtual void DidCompleteSwapBuffers() {}
74 virtual void ScheduleComposite() {}
75 virtual void ScheduleAnimation() {}
76 virtual void DidDeferCommit() {} 74 virtual void DidDeferCommit() {}
77 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, 75 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
78 bool visible) {} 76 bool visible) {}
79 virtual base::TimeDelta LowFrequencyAnimationInterval() const; 77 virtual base::TimeDelta LowFrequencyAnimationInterval() const;
80 78
81 // Hooks for SchedulerClient. 79 // Hooks for SchedulerClient.
82 virtual void ScheduledActionWillSendBeginMainFrame() {} 80 virtual void ScheduledActionWillSendBeginMainFrame() {}
83 virtual void ScheduledActionSendBeginMainFrame() {} 81 virtual void ScheduledActionSendBeginMainFrame() {}
84 virtual void ScheduledActionDrawAndSwapIfPossible() {} 82 virtual void ScheduledActionDrawAndSwapIfPossible() {}
85 virtual void ScheduledActionAnimate() {} 83 virtual void ScheduledActionAnimate() {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void PostSetNextCommitForcesRedrawToMainThread(); 130 void PostSetNextCommitForcesRedrawToMainThread();
133 131
134 void DoBeginTest(); 132 void DoBeginTest();
135 void Timeout(); 133 void Timeout();
136 134
137 protected: 135 protected:
138 LayerTreeTest(); 136 LayerTreeTest();
139 137
140 virtual void InitializeSettings(LayerTreeSettings* settings) {} 138 virtual void InitializeSettings(LayerTreeSettings* settings) {}
141 139
142 virtual void ScheduleComposite() OVERRIDE;
143
144 void RealEndTest(); 140 void RealEndTest();
145 141
146 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation, 142 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation,
147 double animation_duration); 143 double animation_duration);
148 void DispatchSetNeedsCommit(); 144 void DispatchSetNeedsCommit();
149 void DispatchSetNeedsUpdateLayers(); 145 void DispatchSetNeedsUpdateLayers();
150 void DispatchSetNeedsRedraw(); 146 void DispatchSetNeedsRedraw();
151 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); 147 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect);
152 void DispatchSetVisible(bool visible); 148 void DispatchSetVisible(bool visible);
153 void DispatchSetNextCommitForcesRedraw(); 149 void DispatchSetNextCommitForcesRedraw();
154 void DispatchComposite();
155 void DispatchDidAddAnimation(); 150 void DispatchDidAddAnimation();
156 151
157 virtual void AfterTest() = 0; 152 virtual void AfterTest() = 0;
158 virtual void WillBeginTest(); 153 virtual void WillBeginTest();
159 virtual void BeginTest() = 0; 154 virtual void BeginTest() = 0;
160 virtual void SetupTree(); 155 virtual void SetupTree();
161 156
162 virtual void RunTest(bool threaded, 157 virtual void RunTest(bool threaded,
163 bool delegating_renderer, 158 bool delegating_renderer,
164 bool impl_side_painting); 159 bool impl_side_painting);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 private: 192 private:
198 LayerTreeSettings settings_; 193 LayerTreeSettings settings_;
199 scoped_ptr<LayerTreeHostClientForTesting> client_; 194 scoped_ptr<LayerTreeHostClientForTesting> client_;
200 scoped_ptr<LayerTreeHost> layer_tree_host_; 195 scoped_ptr<LayerTreeHost> layer_tree_host_;
201 FakeOutputSurface* output_surface_; 196 FakeOutputSurface* output_surface_;
202 197
203 bool beginning_; 198 bool beginning_;
204 bool end_when_begin_returns_; 199 bool end_when_begin_returns_;
205 bool timed_out_; 200 bool timed_out_;
206 bool scheduled_; 201 bool scheduled_;
207 bool schedule_when_set_visible_true_;
208 bool started_; 202 bool started_;
209 bool ended_; 203 bool ended_;
210 bool delegating_renderer_; 204 bool delegating_renderer_;
211 205
212 int timeout_seconds_; 206 int timeout_seconds_;
213 207
214 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 208 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
215 scoped_ptr<base::Thread> impl_thread_; 209 scoped_ptr<base::Thread> impl_thread_;
216 base::CancelableClosure timeout_; 210 base::CancelableClosure timeout_;
217 scoped_refptr<TestContextProvider> compositor_contexts_; 211 scoped_refptr<TestContextProvider> compositor_contexts_;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 284
291 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ 285 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
292 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ 286 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \
293 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) 287 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
294 288
295 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 289 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
296 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 290 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
297 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 291 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
298 292
299 #endif // CC_TEST_LAYER_TREE_TEST_H_ 293 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698