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

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

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nit Created 7 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 | « no previous file | 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void EndTestAfterDelay(int delay_milliseconds); 110 void EndTestAfterDelay(int delay_milliseconds);
111 111
112 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); 112 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation);
113 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); 113 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation);
114 void PostSetNeedsCommitToMainThread(); 114 void PostSetNeedsCommitToMainThread();
115 void PostReadbackToMainThread(); 115 void PostReadbackToMainThread();
116 void PostAcquireLayerTextures(); 116 void PostAcquireLayerTextures();
117 void PostSetNeedsRedrawToMainThread(); 117 void PostSetNeedsRedrawToMainThread();
118 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect); 118 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect);
119 void PostSetVisibleToMainThread(bool visible); 119 void PostSetVisibleToMainThread(bool visible);
120 void PostSetNextCommitForcesRedrawToMainThread();
120 121
121 void DoBeginTest(); 122 void DoBeginTest();
122 void Timeout(); 123 void Timeout();
123 124
124 protected: 125 protected:
125 LayerTreeTest(); 126 LayerTreeTest();
126 127
127 virtual void InitializeSettings(LayerTreeSettings* settings) {} 128 virtual void InitializeSettings(LayerTreeSettings* settings) {}
128 129
129 virtual void ScheduleComposite() OVERRIDE; 130 virtual void ScheduleComposite() OVERRIDE;
130 131
131 void RealEndTest(); 132 void RealEndTest();
132 133
133 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation); 134 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation);
134 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation); 135 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation);
135 void DispatchSetNeedsCommit(); 136 void DispatchSetNeedsCommit();
136 void DispatchReadback(); 137 void DispatchReadback();
137 void DispatchAcquireLayerTextures(); 138 void DispatchAcquireLayerTextures();
138 void DispatchSetNeedsRedraw(); 139 void DispatchSetNeedsRedraw();
139 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect); 140 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect);
140 void DispatchSetVisible(bool visible); 141 void DispatchSetVisible(bool visible);
142 void DispatchSetNextCommitForcesRedraw();
141 void DispatchComposite(); 143 void DispatchComposite();
142 void DispatchDidAddAnimation(); 144 void DispatchDidAddAnimation();
143 145
144 virtual void RunTest(bool threaded, 146 virtual void RunTest(bool threaded,
145 bool delegating_renderer, 147 bool delegating_renderer,
146 bool impl_side_painting); 148 bool impl_side_painting);
147 149
148 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; } 150 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; }
149 base::SingleThreadTaskRunner* ImplThreadTaskRunner() { 151 base::SingleThreadTaskRunner* ImplThreadTaskRunner() {
150 DCHECK(proxy()); 152 DCHECK(proxy());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 242
241 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ 243 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
242 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 244 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
243 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 245 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
244 246
245 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 247 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
246 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 248 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
247 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 249 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
248 250
249 #endif // CC_TEST_LAYER_TREE_TEST_H_ 251 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698