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

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: Added screenshot sync test to telemetry unittests, updated cc unittest 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') | cc/trees/layer_tree_host_unittest.cc » ('J')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void EndTestAfterDelay(int delay_milliseconds); 111 void EndTestAfterDelay(int delay_milliseconds);
112 112
113 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); 113 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation);
114 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); 114 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation);
115 void PostSetNeedsCommitToMainThread(); 115 void PostSetNeedsCommitToMainThread();
116 void PostReadbackToMainThread(); 116 void PostReadbackToMainThread();
117 void PostAcquireLayerTextures(); 117 void PostAcquireLayerTextures();
118 void PostSetNeedsRedrawToMainThread(); 118 void PostSetNeedsRedrawToMainThread();
119 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect); 119 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect);
120 void PostSetVisibleToMainThread(bool visible); 120 void PostSetVisibleToMainThread(bool visible);
121 void PostSetNextCommitForcesRedrawToMainThread();
121 122
122 void DoBeginTest(); 123 void DoBeginTest();
123 void Timeout(); 124 void Timeout();
124 125
125 protected: 126 protected:
126 LayerTreeTest(); 127 LayerTreeTest();
127 128
128 virtual void InitializeSettings(LayerTreeSettings* settings) {} 129 virtual void InitializeSettings(LayerTreeSettings* settings) {}
129 130
130 virtual void ScheduleComposite() OVERRIDE; 131 virtual void ScheduleComposite() OVERRIDE;
131 132
132 void RealEndTest(); 133 void RealEndTest();
133 134
134 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation); 135 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation);
135 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation); 136 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation);
136 void DispatchSetNeedsCommit(); 137 void DispatchSetNeedsCommit();
137 void DispatchReadback(); 138 void DispatchReadback();
138 void DispatchAcquireLayerTextures(); 139 void DispatchAcquireLayerTextures();
139 void DispatchSetNeedsRedraw(); 140 void DispatchSetNeedsRedraw();
140 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect); 141 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect);
141 void DispatchSetVisible(bool visible); 142 void DispatchSetVisible(bool visible);
143 void DispatchSetNextCommitForcesRedraw();
142 void DispatchComposite(); 144 void DispatchComposite();
143 void DispatchDidAddAnimation(); 145 void DispatchDidAddAnimation();
144 146
145 virtual void RunTest(bool threaded, 147 virtual void RunTest(bool threaded,
146 bool delegating_renderer, 148 bool delegating_renderer,
147 bool impl_side_painting); 149 bool impl_side_painting);
148 150
149 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; } 151 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; }
150 base::SingleThreadTaskRunner* ImplThreadTaskRunner() { 152 base::SingleThreadTaskRunner* ImplThreadTaskRunner() {
151 DCHECK(proxy()); 153 DCHECK(proxy());
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 247
246 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ 248 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
247 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 249 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
248 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 250 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
249 251
250 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 252 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
251 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 253 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
252 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 254 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
253 255
254 #endif // CC_TEST_LAYER_TREE_TEST_H_ 256 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | cc/trees/layer_tree_host_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698