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

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

Issue 23503003: cc: Add readback and forced draw states to the Scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedReorg3
Patch Set: Add a readback during forced draw test Created 7 years, 3 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 virtual void AfterTest() = 0; 105 virtual void AfterTest() = 0;
106 virtual void BeginTest() = 0; 106 virtual void BeginTest() = 0;
107 virtual void SetupTree(); 107 virtual void SetupTree();
108 108
109 virtual void EndTest(); 109 virtual void EndTest();
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 PostAcquireLayerTextures(); 116 void PostAcquireLayerTextures();
116 void PostSetNeedsRedrawToMainThread(); 117 void PostSetNeedsRedrawToMainThread();
117 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect); 118 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect);
118 void PostSetVisibleToMainThread(bool visible); 119 void PostSetVisibleToMainThread(bool visible);
119 120
120 void DoBeginTest(); 121 void DoBeginTest();
121 void Timeout(); 122 void Timeout();
122 123
123 protected: 124 protected:
124 LayerTreeTest(); 125 LayerTreeTest();
125 126
126 virtual void InitializeSettings(LayerTreeSettings* settings) {} 127 virtual void InitializeSettings(LayerTreeSettings* settings) {}
127 128
128 virtual void ScheduleComposite() OVERRIDE; 129 virtual void ScheduleComposite() OVERRIDE;
129 130
130 void RealEndTest(); 131 void RealEndTest();
131 132
132 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation); 133 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation);
133 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation); 134 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation);
134 void DispatchSetNeedsCommit(); 135 void DispatchSetNeedsCommit();
136 void DispatchReadback();
135 void DispatchAcquireLayerTextures(); 137 void DispatchAcquireLayerTextures();
136 void DispatchSetNeedsRedraw(); 138 void DispatchSetNeedsRedraw();
137 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect); 139 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect);
138 void DispatchSetVisible(bool visible); 140 void DispatchSetVisible(bool visible);
139 void DispatchComposite(); 141 void DispatchComposite();
140 void DispatchDidAddAnimation(); 142 void DispatchDidAddAnimation();
141 143
142 virtual void RunTest(bool threaded, 144 virtual void RunTest(bool threaded,
143 bool delegating_renderer, 145 bool delegating_renderer,
144 bool impl_side_painting); 146 bool impl_side_painting);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 239
238 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ 240 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
239 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 241 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
240 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 242 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
241 243
242 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 244 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
243 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 245 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
244 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 246 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
245 247
246 #endif // CC_TEST_LAYER_TREE_TEST_H_ 248 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698