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

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

Issue 17114008: cc: Remove cc::Thread and cc::ThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-thread: NULLrefptrs 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_proxy.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/base/thread.h"
11 #include "cc/trees/layer_tree_host.h" 10 #include "cc/trees/layer_tree_host.h"
12 #include "cc/trees/layer_tree_host_impl.h" 11 #include "cc/trees/layer_tree_host_impl.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h" 13 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h"
15 14
16 namespace Webkit { 15 namespace Webkit {
17 class WebGraphicsContext3D; 16 class WebGraphicsContext3D;
18 } 17 }
19 18
20 namespace cc { 19 namespace cc {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void DispatchSetNeedsRedraw(); 133 void DispatchSetNeedsRedraw();
135 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect); 134 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect);
136 void DispatchSetVisible(bool visible); 135 void DispatchSetVisible(bool visible);
137 void DispatchComposite(); 136 void DispatchComposite();
138 void DispatchDidAddAnimation(); 137 void DispatchDidAddAnimation();
139 138
140 virtual void RunTest(bool threaded, 139 virtual void RunTest(bool threaded,
141 bool delegating_renderer, 140 bool delegating_renderer,
142 bool impl_side_painting); 141 bool impl_side_painting);
143 142
144 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; } 143 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; }
144 base::SingleThreadTaskRunner* ImplThreadTaskRunner() {
145 return proxy() ? proxy()->ImplThreadTaskRunner() : NULL;
146 }
145 Proxy* proxy() const { 147 Proxy* proxy() const {
146 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL; 148 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL;
147 } 149 }
148 150
149 bool TestEnded() const { return ended_; } 151 bool TestEnded() const { return ended_; }
150 152
151 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 153 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); }
152 bool delegating_renderer() const { return delegating_renderer_; } 154 bool delegating_renderer() const { return delegating_renderer_; }
153 155
154 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE; 156 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE;
(...skipping 12 matching lines...) Expand all
167 bool end_when_begin_returns_; 169 bool end_when_begin_returns_;
168 bool timed_out_; 170 bool timed_out_;
169 bool scheduled_; 171 bool scheduled_;
170 bool schedule_when_set_visible_true_; 172 bool schedule_when_set_visible_true_;
171 bool started_; 173 bool started_;
172 bool ended_; 174 bool ended_;
173 bool delegating_renderer_; 175 bool delegating_renderer_;
174 176
175 int timeout_seconds_; 177 int timeout_seconds_;
176 178
177 scoped_ptr<Thread> main_ccthread_; 179 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
178 scoped_ptr<base::Thread> impl_thread_; 180 scoped_ptr<base::Thread> impl_thread_;
179 base::CancelableClosure timeout_; 181 base::CancelableClosure timeout_;
180 base::WeakPtr<LayerTreeTest> main_thread_weak_ptr_; 182 base::WeakPtr<LayerTreeTest> main_thread_weak_ptr_;
181 base::WeakPtrFactory<LayerTreeTest> weak_factory_; 183 base::WeakPtrFactory<LayerTreeTest> weak_factory_;
182 scoped_refptr<FakeContextProvider> main_thread_contexts_; 184 scoped_refptr<FakeContextProvider> main_thread_contexts_;
183 scoped_refptr<FakeContextProvider> compositor_thread_contexts_; 185 scoped_refptr<FakeContextProvider> compositor_thread_contexts_;
184 }; 186 };
185 187
186 } // namespace cc 188 } // namespace cc
187 189
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 233
232 #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) \
233 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 235 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
234 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 236 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
235 237
236 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 238 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
237 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 239 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
238 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 240 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
239 241
240 #endif // CC_TEST_LAYER_TREE_TEST_H_ 242 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/fake_proxy.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698