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

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

Issue 19267016: Add a flag to allow renderer to use software compositor when GL compositor doesn't work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void DidDeferCommit() {} 63 virtual void DidDeferCommit() {}
64 virtual bool CanActivatePendingTree(LayerTreeHostImpl* host_impl); 64 virtual bool CanActivatePendingTree(LayerTreeHostImpl* host_impl);
65 virtual bool CanActivatePendingTreeIfNeeded(LayerTreeHostImpl* host_impl); 65 virtual bool CanActivatePendingTreeIfNeeded(LayerTreeHostImpl* host_impl);
66 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, 66 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
67 bool visible) {} 67 bool visible) {}
68 68
69 // Implementation of AnimationDelegate: 69 // Implementation of AnimationDelegate:
70 virtual void NotifyAnimationStarted(double time) OVERRIDE {} 70 virtual void NotifyAnimationStarted(double time) OVERRIDE {}
71 virtual void NotifyAnimationFinished(double time) OVERRIDE {} 71 virtual void NotifyAnimationFinished(double time) OVERRIDE {}
72 72
73 virtual scoped_ptr<OutputSurface> CreateOutputSurface() = 0; 73 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0;
74 virtual scoped_refptr<cc::ContextProvider> 74 virtual scoped_refptr<cc::ContextProvider>
75 OffscreenContextProviderForMainThread() = 0; 75 OffscreenContextProviderForMainThread() = 0;
76 virtual scoped_refptr<cc::ContextProvider> 76 virtual scoped_refptr<cc::ContextProvider>
77 OffscreenContextProviderForCompositorThread() = 0; 77 OffscreenContextProviderForCompositorThread() = 0;
78 }; 78 };
79 79
80 class BeginTask; 80 class BeginTask;
81 class LayerTreeHostClientForTesting; 81 class LayerTreeHostClientForTesting;
82 class TimeoutTask; 82 class TimeoutTask;
83 83
84 // The LayerTreeTests runs with the main loop running. It instantiates a single 84 // The LayerTreeTests runs with the main loop running. It instantiates a single
85 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and 85 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 Proxy* proxy() const { 146 Proxy* proxy() const {
147 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL; 147 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL;
148 } 148 }
149 149
150 bool TestEnded() const { return ended_; } 150 bool TestEnded() const { return ended_; }
151 151
152 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 152 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); }
153 bool delegating_renderer() const { return delegating_renderer_; } 153 bool delegating_renderer() const { return delegating_renderer_; }
154 FakeOutputSurface* output_surface() { return output_surface_; } 154 FakeOutputSurface* output_surface() { return output_surface_; }
155 155
156 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE; 156 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) OVERRIDE;
157 virtual scoped_refptr<cc::ContextProvider> 157 virtual scoped_refptr<cc::ContextProvider>
158 OffscreenContextProviderForMainThread() OVERRIDE; 158 OffscreenContextProviderForMainThread() OVERRIDE;
159 virtual scoped_refptr<cc::ContextProvider> 159 virtual scoped_refptr<cc::ContextProvider>
160 OffscreenContextProviderForCompositorThread() OVERRIDE; 160 OffscreenContextProviderForCompositorThread() OVERRIDE;
161 161
162 private: 162 private:
163 LayerTreeSettings settings_; 163 LayerTreeSettings settings_;
164 scoped_ptr<LayerTreeHostClientForTesting> client_; 164 scoped_ptr<LayerTreeHostClientForTesting> client_;
165 scoped_ptr<LayerTreeHost> layer_tree_host_; 165 scoped_ptr<LayerTreeHost> layer_tree_host_;
166 FakeOutputSurface* output_surface_; 166 FakeOutputSurface* output_surface_;
167 167
168 bool beginning_; 168 bool beginning_;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ 234 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
235 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 235 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
236 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 236 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
237 237
238 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 238 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
239 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 239 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
240 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 240 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
241 241
242 #endif // CC_TEST_LAYER_TREE_TEST_H_ 242 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698