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

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

Issue 11017044: Remove root layer specialness in calculateDrawTransforms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added assertion that rounding does not affect exact coverage testing Created 8 years, 1 month 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
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/test/layer_tree_test_common.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_COMMON_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_COMMON_H_
6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_ 6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_
7 7
8 #include "cc/layer_tree_host.h" 8 #include "cc/layer_tree_host.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "cc/layer_tree_host_impl.h" 10 #include "cc/layer_tree_host_impl.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 public: 69 public:
70 virtual ~ThreadedTest(); 70 virtual ~ThreadedTest();
71 71
72 virtual void afterTest() = 0; 72 virtual void afterTest() = 0;
73 virtual void beginTest() = 0; 73 virtual void beginTest() = 0;
74 74
75 void endTest(); 75 void endTest();
76 void endTestAfterDelay(int delayMilliseconds); 76 void endTestAfterDelay(int delayMilliseconds);
77 77
78 void postSetNeedsAnimateToMainThread(); 78 void postSetNeedsAnimateToMainThread();
79 void postAddAnimationToMainThread(); 79 void postAddAnimationToMainThread(cc::Layer*);
80 void postAddInstantAnimationToMainThread(); 80 void postAddInstantAnimationToMainThread();
81 void postSetNeedsCommitToMainThread(); 81 void postSetNeedsCommitToMainThread();
82 void postAcquireLayerTextures(); 82 void postAcquireLayerTextures();
83 void postSetNeedsRedrawToMainThread(); 83 void postSetNeedsRedrawToMainThread();
84 void postSetNeedsAnimateAndCommitToMainThread(); 84 void postSetNeedsAnimateAndCommitToMainThread();
85 void postSetVisibleToMainThread(bool visible); 85 void postSetVisibleToMainThread(bool visible);
86 void postDidAddAnimationToMainThread(); 86 void postDidAddAnimationToMainThread();
87 87
88 void doBeginTest(); 88 void doBeginTest();
89 void timeout(); 89 void timeout();
90 90
91 void clearTimeout() { m_timeoutTask = 0; } 91 void clearTimeout() { m_timeoutTask = 0; }
92 92
93 cc::LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); } 93 cc::LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
94 94
95 protected: 95 protected:
96 ThreadedTest(); 96 ThreadedTest();
97 97
98 virtual void initializeSettings(cc::LayerTreeSettings&) { } 98 virtual void initializeSettings(cc::LayerTreeSettings&) { }
99 99
100 virtual void scheduleComposite() OVERRIDE; 100 virtual void scheduleComposite() OVERRIDE;
101 101
102 void realEndTest(); 102 void realEndTest();
103 103
104 void dispatchSetNeedsAnimate(); 104 void dispatchSetNeedsAnimate();
105 void dispatchAddInstantAnimation(); 105 void dispatchAddInstantAnimation();
106 void dispatchAddAnimation(); 106 void dispatchAddAnimation(cc::Layer*);
107 void dispatchSetNeedsAnimateAndCommit(); 107 void dispatchSetNeedsAnimateAndCommit();
108 void dispatchSetNeedsCommit(); 108 void dispatchSetNeedsCommit();
109 void dispatchAcquireLayerTextures(); 109 void dispatchAcquireLayerTextures();
110 void dispatchSetNeedsRedraw(); 110 void dispatchSetNeedsRedraw();
111 void dispatchSetVisible(bool); 111 void dispatchSetVisible(bool);
112 void dispatchComposite(); 112 void dispatchComposite();
113 void dispatchDidAddAnimation(); 113 void dispatchDidAddAnimation();
114 114
115 virtual void runTest(bool threaded); 115 virtual void runTest(bool threaded);
116 WebKit::WebThread* webThread() const { return m_webThread.get(); } 116 WebKit::WebThread* webThread() const { return m_webThread.get(); }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 TEST_F(TEST_FIXTURE_NAME, runSingleThread) \ 199 TEST_F(TEST_FIXTURE_NAME, runSingleThread) \
200 { \ 200 { \
201 runTest(false); \ 201 runTest(false); \
202 } \ 202 } \
203 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \ 203 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \
204 { \ 204 { \
205 runTest(true); \ 205 runTest(true); \
206 } 206 }
207 207
208 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ 208 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/test/layer_tree_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698