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

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

Issue 11598005: Ref count layer animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
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 "base/hash_tables.h" 8 #include "base/hash_tables.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 12 matching lines...) Expand all
23 class Thread; 23 class Thread;
24 24
25 25
26 // Used by test stubs to notify the test when something interesting happens. 26 // Used by test stubs to notify the test when something interesting happens.
27 class TestHooks : public WebKit::WebAnimationDelegate { 27 class TestHooks : public WebKit::WebAnimationDelegate {
28 public: 28 public:
29 virtual void beginCommitOnThread(LayerTreeHostImpl*) { } 29 virtual void beginCommitOnThread(LayerTreeHostImpl*) { }
30 virtual void commitCompleteOnThread(LayerTreeHostImpl*) { } 30 virtual void commitCompleteOnThread(LayerTreeHostImpl*) { }
31 virtual bool prepareToDrawOnThread(LayerTreeHostImpl*); 31 virtual bool prepareToDrawOnThread(LayerTreeHostImpl*);
32 virtual void drawLayersOnThread(LayerTreeHostImpl*) { } 32 virtual void drawLayersOnThread(LayerTreeHostImpl*) { }
33 virtual void animateLayers(LayerTreeHostImpl*, base::TimeTicks monotonicTime ) { } 33 virtual void animateLayers(LayerTreeHostImpl*, base::TimeTicks monotonicTime , bool hasUnfinishedAnimation) { }
34 virtual void willAnimateLayers(LayerTreeHostImpl*, base::TimeTicks monotonic Time) { } 34 virtual void willAnimateLayers(LayerTreeHostImpl*, base::TimeTicks monotonic Time) { }
35 virtual void applyScrollAndScale(gfx::Vector2d, float) { } 35 virtual void applyScrollAndScale(gfx::Vector2d, float) { }
36 virtual void animate(base::TimeTicks monotonicTime) { } 36 virtual void animate(base::TimeTicks monotonicTime) { }
37 virtual void layout() { } 37 virtual void layout() { }
38 virtual void didRecreateOutputSurface(bool succeeded) { } 38 virtual void didRecreateOutputSurface(bool succeeded) { }
39 virtual void didAddAnimation() { } 39 virtual void didAddAnimation() { }
40 virtual void didCommit() { } 40 virtual void didCommit() { }
41 virtual void didCommitAndDrawFrame() { } 41 virtual void didCommitAndDrawFrame() { }
42 virtual void scheduleComposite() { } 42 virtual void scheduleComposite() { }
43 virtual void didDeferCommit() { } 43 virtual void didDeferCommit() { }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(Layer*); 79 void postAddAnimationToMainThread(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 postSetVisibleToMainThread(bool visible); 84 void postSetVisibleToMainThread(bool visible);
85 void postDidAddAnimationToMainThread();
86 85
87 void doBeginTest(); 86 void doBeginTest();
88 void timeout(); 87 void timeout();
89 88
90 LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); } 89 LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
91 90
92 protected: 91 protected:
93 ThreadedTest(); 92 ThreadedTest();
94 93
95 virtual void initializeSettings(LayerTreeSettings&) { } 94 virtual void initializeSettings(LayerTreeSettings&) { }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 TEST_F(TEST_FIXTURE_NAME, runSingleThread) \ 196 TEST_F(TEST_FIXTURE_NAME, runSingleThread) \
198 { \ 197 { \
199 runTest(false); \ 198 runTest(false); \
200 } \ 199 } \
201 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \ 200 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \
202 { \ 201 { \
203 runTest(true); \ 202 runTest(true); \
204 } 203 }
205 204
206 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ 205 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698