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

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

Issue 606113003: Revert of Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 2 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/layer_tree_host_common_test.cc ('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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual void ScheduledActionBeginOutputSurfaceCreation() {} 86 virtual void ScheduledActionBeginOutputSurfaceCreation() {}
87 87
88 // Implementation of AnimationDelegate: 88 // Implementation of AnimationDelegate:
89 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time, 89 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
90 Animation::TargetProperty target_property) 90 Animation::TargetProperty target_property)
91 OVERRIDE {} 91 OVERRIDE {}
92 virtual void NotifyAnimationFinished( 92 virtual void NotifyAnimationFinished(
93 base::TimeTicks monotonic_time, 93 base::TimeTicks monotonic_time,
94 Animation::TargetProperty target_property) OVERRIDE {} 94 Animation::TargetProperty target_property) OVERRIDE {}
95 95
96 virtual void RequestNewOutputSurface(bool fallback) = 0; 96 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0;
97 }; 97 };
98 98
99 class BeginTask; 99 class BeginTask;
100 class LayerTreeHostClientForTesting; 100 class LayerTreeHostClientForTesting;
101 class TimeoutTask; 101 class TimeoutTask;
102 102
103 // The LayerTreeTests runs with the main loop running. It instantiates a single 103 // The LayerTreeTests runs with the main loop running. It instantiates a single
104 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and 104 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and
105 // LayerTreeHostClientForTesting. 105 // LayerTreeHostClientForTesting.
106 // 106 //
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 bool TestEnded() const { return ended_; } 176 bool TestEnded() const { return ended_; }
177 177
178 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 178 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); }
179 bool delegating_renderer() const { return delegating_renderer_; } 179 bool delegating_renderer() const { return delegating_renderer_; }
180 FakeOutputSurface* output_surface() { return output_surface_; } 180 FakeOutputSurface* output_surface() { return output_surface_; }
181 int LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) const; 181 int LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) const;
182 182
183 void DestroyLayerTreeHost(); 183 void DestroyLayerTreeHost();
184 184
185 // By default, output surface recreation is synchronous.
186 virtual void RequestNewOutputSurface(bool fallback) OVERRIDE;
187 // Override this for pixel tests, where you need a real output surface. 185 // Override this for pixel tests, where you need a real output surface.
188 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback); 186 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) OVERRIDE;
189 // Override this for unit tests, which should not produce pixel output. 187 // Override this for unit tests, which should not produce pixel output.
190 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback); 188 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback);
191 189
192 TestWebGraphicsContext3D* TestContext(); 190 TestWebGraphicsContext3D* TestContext();
193 191
194 192
195 private: 193 private:
196 LayerTreeSettings settings_; 194 LayerTreeSettings settings_;
197 scoped_ptr<LayerTreeHostClientForTesting> client_; 195 scoped_ptr<LayerTreeHostClientForTesting> client_;
198 scoped_ptr<LayerTreeHost> layer_tree_host_; 196 scoped_ptr<LayerTreeHost> layer_tree_host_;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 285
288 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ 286 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
289 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ 287 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \
290 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) 288 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
291 289
292 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 290 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
293 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 291 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
294 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 292 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
295 293
296 #endif // CC_TEST_LAYER_TREE_TEST_H_ 294 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_host_common_test.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698