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 14301021: cc: Don't pass simple well-defined classes by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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" 10 #include "cc/base/thread.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 virtual void SetupTree(); 104 virtual void SetupTree();
105 105
106 void EndTest(); 106 void EndTest();
107 void EndTestAfterDelay(int delay_milliseconds); 107 void EndTestAfterDelay(int delay_milliseconds);
108 108
109 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); 109 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation);
110 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); 110 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation);
111 void PostSetNeedsCommitToMainThread(); 111 void PostSetNeedsCommitToMainThread();
112 void PostAcquireLayerTextures(); 112 void PostAcquireLayerTextures();
113 void PostSetNeedsRedrawToMainThread(); 113 void PostSetNeedsRedrawToMainThread();
114 void PostSetNeedsRedrawRectToMainThread(const gfx::Rect& damage_rect); 114 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect);
115 void PostSetVisibleToMainThread(bool visible); 115 void PostSetVisibleToMainThread(bool visible);
116 116
117 void DoBeginTest(); 117 void DoBeginTest();
118 void Timeout(); 118 void Timeout();
119 119
120 protected: 120 protected:
121 LayerTreeTest(); 121 LayerTreeTest();
122 122
123 virtual void InitializeSettings(LayerTreeSettings* settings) {} 123 virtual void InitializeSettings(LayerTreeSettings* settings) {}
124 124
125 virtual void ScheduleComposite() OVERRIDE; 125 virtual void ScheduleComposite() OVERRIDE;
126 126
127 void RealEndTest(); 127 void RealEndTest();
128 128
129 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation); 129 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation);
130 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation); 130 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation);
131 void DispatchSetNeedsCommit(); 131 void DispatchSetNeedsCommit();
132 void DispatchAcquireLayerTextures(); 132 void DispatchAcquireLayerTextures();
133 void DispatchSetNeedsRedraw(); 133 void DispatchSetNeedsRedraw();
134 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); 134 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect);
135 void DispatchSetVisible(bool visible); 135 void DispatchSetVisible(bool visible);
136 void DispatchComposite(); 136 void DispatchComposite();
137 void DispatchDidAddAnimation(); 137 void DispatchDidAddAnimation();
138 138
139 virtual void RunTest(bool threaded); 139 virtual void RunTest(bool threaded);
140 140
141 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; } 141 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; }
142 Proxy* proxy() const { 142 Proxy* proxy() const {
143 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL; 143 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL;
144 } 144 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ 182 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \
183 RunTest(true); \ 183 RunTest(true); \
184 } \ 184 } \
185 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} 185 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {}
186 186
187 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 187 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
188 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ 188 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \
189 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) 189 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
190 190
191 #endif // CC_TEST_LAYER_TREE_TEST_H_ 191 #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