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

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

Issue 16833003: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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/test/fake_output_surface.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/base/thread.h" 10 #include "cc/base/thread.h"
11 #include "cc/trees/layer_tree_host.h" 11 #include "cc/trees/layer_tree_host.h"
12 #include "cc/trees/layer_tree_host_impl.h" 12 #include "cc/trees/layer_tree_host_impl.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h" 14 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h"
15 15
16 namespace Webkit { 16 namespace Webkit {
17 class WebGraphicsContext3D; 17 class WebGraphicsContext3D;
18 } 18 }
19 19
20 namespace cc { 20 namespace cc {
21 class FakeContextProvider; 21 class FakeContextProvider;
22 class FakeLayerTreeHostClient; 22 class FakeLayerTreeHostClient;
23 class LayerImpl; 23 class LayerImpl;
24 class LayerTreeHost; 24 class LayerTreeHost;
25 class LayerTreeHostClient; 25 class LayerTreeHostClient;
26 class LayerTreeHostImpl; 26 class LayerTreeHostImpl;
27 class FakeOutputSurface;
27 28
28 // Used by test stubs to notify the test when something interesting happens. 29 // Used by test stubs to notify the test when something interesting happens.
29 class TestHooks : public WebKit::WebAnimationDelegate { 30 class TestHooks : public WebKit::WebAnimationDelegate {
30 public: 31 public:
31 TestHooks(); 32 TestHooks();
32 virtual ~TestHooks(); 33 virtual ~TestHooks();
33 34
34 void ReadSettings(const LayerTreeSettings& settings); 35 void ReadSettings(const LayerTreeSettings& settings);
35 36
36 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} 37 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {}
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE; 154 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE;
154 virtual scoped_refptr<cc::ContextProvider> 155 virtual scoped_refptr<cc::ContextProvider>
155 OffscreenContextProviderForMainThread() OVERRIDE; 156 OffscreenContextProviderForMainThread() OVERRIDE;
156 virtual scoped_refptr<cc::ContextProvider> 157 virtual scoped_refptr<cc::ContextProvider>
157 OffscreenContextProviderForCompositorThread() OVERRIDE; 158 OffscreenContextProviderForCompositorThread() OVERRIDE;
158 159
159 private: 160 private:
160 LayerTreeSettings settings_; 161 LayerTreeSettings settings_;
161 scoped_ptr<LayerTreeHostClientForTesting> client_; 162 scoped_ptr<LayerTreeHostClientForTesting> client_;
162 scoped_ptr<LayerTreeHost> layer_tree_host_; 163 scoped_ptr<LayerTreeHost> layer_tree_host_;
164 FakeOutputSurface* output_surface_;
163 165
164 bool beginning_; 166 bool beginning_;
165 bool end_when_begin_returns_; 167 bool end_when_begin_returns_;
166 bool timed_out_; 168 bool timed_out_;
167 bool scheduled_; 169 bool scheduled_;
168 bool schedule_when_set_visible_true_; 170 bool schedule_when_set_visible_true_;
169 bool started_; 171 bool started_;
170 bool ended_; 172 bool ended_;
171 bool delegating_renderer_; 173 bool delegating_renderer_;
172 174
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 231
230 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ 232 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
231 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 233 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
232 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 234 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
233 235
234 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 236 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
235 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 237 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
236 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 238 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
237 239
238 #endif // CC_TEST_LAYER_TREE_TEST_H_ 240 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698