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

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

Issue 448713002: Revert of Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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() {}
74 virtual void DidDeferCommit() {} 76 virtual void DidDeferCommit() {}
75 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, 77 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
76 bool visible) {} 78 bool visible) {}
77 virtual base::TimeDelta LowFrequencyAnimationInterval() const; 79 virtual base::TimeDelta LowFrequencyAnimationInterval() const;
78 80
79 // Hooks for SchedulerClient. 81 // Hooks for SchedulerClient.
80 virtual void ScheduledActionWillSendBeginMainFrame() {} 82 virtual void ScheduledActionWillSendBeginMainFrame() {}
81 virtual void ScheduledActionSendBeginMainFrame() {} 83 virtual void ScheduledActionSendBeginMainFrame() {}
82 virtual void ScheduledActionDrawAndSwapIfPossible() {} 84 virtual void ScheduledActionDrawAndSwapIfPossible() {}
83 virtual void ScheduledActionAnimate() {} 85 virtual void ScheduledActionAnimate() {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void PostSetNextCommitForcesRedrawToMainThread(); 132 void PostSetNextCommitForcesRedrawToMainThread();
131 133
132 void DoBeginTest(); 134 void DoBeginTest();
133 void Timeout(); 135 void Timeout();
134 136
135 protected: 137 protected:
136 LayerTreeTest(); 138 LayerTreeTest();
137 139
138 virtual void InitializeSettings(LayerTreeSettings* settings) {} 140 virtual void InitializeSettings(LayerTreeSettings* settings) {}
139 141
142 virtual void ScheduleComposite() OVERRIDE;
143
140 void RealEndTest(); 144 void RealEndTest();
141 145
142 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation, 146 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation,
143 double animation_duration); 147 double animation_duration);
144 void DispatchSetNeedsCommit(); 148 void DispatchSetNeedsCommit();
145 void DispatchSetNeedsUpdateLayers(); 149 void DispatchSetNeedsUpdateLayers();
146 void DispatchSetNeedsRedraw(); 150 void DispatchSetNeedsRedraw();
147 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); 151 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect);
148 void DispatchSetVisible(bool visible); 152 void DispatchSetVisible(bool visible);
149 void DispatchSetNextCommitForcesRedraw(); 153 void DispatchSetNextCommitForcesRedraw();
154 void DispatchComposite();
150 void DispatchDidAddAnimation(); 155 void DispatchDidAddAnimation();
151 156
152 virtual void AfterTest() = 0; 157 virtual void AfterTest() = 0;
153 virtual void WillBeginTest(); 158 virtual void WillBeginTest();
154 virtual void BeginTest() = 0; 159 virtual void BeginTest() = 0;
155 virtual void SetupTree(); 160 virtual void SetupTree();
156 161
157 virtual void RunTest(bool threaded, 162 virtual void RunTest(bool threaded,
158 bool delegating_renderer, 163 bool delegating_renderer,
159 bool impl_side_painting); 164 bool impl_side_painting);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 private: 197 private:
193 LayerTreeSettings settings_; 198 LayerTreeSettings settings_;
194 scoped_ptr<LayerTreeHostClientForTesting> client_; 199 scoped_ptr<LayerTreeHostClientForTesting> client_;
195 scoped_ptr<LayerTreeHost> layer_tree_host_; 200 scoped_ptr<LayerTreeHost> layer_tree_host_;
196 FakeOutputSurface* output_surface_; 201 FakeOutputSurface* output_surface_;
197 202
198 bool beginning_; 203 bool beginning_;
199 bool end_when_begin_returns_; 204 bool end_when_begin_returns_;
200 bool timed_out_; 205 bool timed_out_;
201 bool scheduled_; 206 bool scheduled_;
207 bool schedule_when_set_visible_true_;
202 bool started_; 208 bool started_;
203 bool ended_; 209 bool ended_;
204 bool delegating_renderer_; 210 bool delegating_renderer_;
205 211
206 int timeout_seconds_; 212 int timeout_seconds_;
207 213
208 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 214 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
209 scoped_ptr<base::Thread> impl_thread_; 215 scoped_ptr<base::Thread> impl_thread_;
210 base::CancelableClosure timeout_; 216 base::CancelableClosure timeout_;
211 scoped_refptr<TestContextProvider> compositor_contexts_; 217 scoped_refptr<TestContextProvider> compositor_contexts_;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 290
285 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ 291 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
286 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ 292 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \
287 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) 293 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
288 294
289 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 295 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
290 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 296 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
291 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 297 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
292 298
293 #endif // CC_TEST_LAYER_TREE_TEST_H_ 299 #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