OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_HOOKS_H_ | 5 #ifndef CC_TEST_TEST_HOOKS_H_ |
6 #define CC_TEST_TEST_HOOKS_H_ | 6 #define CC_TEST_TEST_HOOKS_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/animation/animation_delegate.h" | 9 #include "cc/animation/animation_delegate.h" |
10 #include "cc/trees/layer_tree_host.h" | 10 #include "cc/trees/layer_tree_host.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 39 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} |
40 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} | 40 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} |
41 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} | 41 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} |
42 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, | 42 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, |
43 bool success) {} | 43 bool success) {} |
44 virtual DrawResult PrepareToDrawOnThread( | 44 virtual DrawResult PrepareToDrawOnThread( |
45 LayerTreeHostImpl* host_impl, | 45 LayerTreeHostImpl* host_impl, |
46 LayerTreeHostImpl::FrameData* frame_data, | 46 LayerTreeHostImpl::FrameData* frame_data, |
47 DrawResult draw_result); | 47 DrawResult draw_result); |
48 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} | 48 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} |
49 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} | 49 // Note that this is called asynchronously from the LayerTreeHostImpl |
50 virtual void SwapBuffersCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 50 // performing its draw, so you should record state you want to use here |
| 51 // in DrawLayersOnThread() instead. For that reason this method does not |
| 52 // receive a LayerTreeHostImpl pointer. |
| 53 virtual void SwapBuffersCompleteOnThread() {} |
51 virtual void NotifyReadyToActivateOnThread(LayerTreeHostImpl* host_impl) {} | 54 virtual void NotifyReadyToActivateOnThread(LayerTreeHostImpl* host_impl) {} |
52 virtual void NotifyReadyToDrawOnThread(LayerTreeHostImpl* host_impl) {} | 55 virtual void NotifyReadyToDrawOnThread(LayerTreeHostImpl* host_impl) {} |
53 virtual void NotifyAllTileTasksCompleted(LayerTreeHostImpl* host_impl) {} | 56 virtual void NotifyAllTileTasksCompleted(LayerTreeHostImpl* host_impl) {} |
54 virtual void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, | 57 virtual void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, |
55 const Tile* tile) {} | 58 const Tile* tile) {} |
56 virtual void AnimateLayers(LayerTreeHostImpl* host_impl, | 59 virtual void AnimateLayers(LayerTreeHostImpl* host_impl, |
57 base::TimeTicks monotonic_time) {} | 60 base::TimeTicks monotonic_time) {} |
58 virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl, | 61 virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl, |
59 bool has_unfinished_animation) {} | 62 bool has_unfinished_animation) {} |
60 virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl, | 63 virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 const proto::CompositorMessageToImpl& proto) {} | 152 const proto::CompositorMessageToImpl& proto) {} |
150 | 153 |
151 // Used to notify the test to destroy the Remote client LayerTreeHost on | 154 // Used to notify the test to destroy the Remote client LayerTreeHost on |
152 // receiving a CompositorMessageToImpl of type CLOSE_IMPL. | 155 // receiving a CompositorMessageToImpl of type CLOSE_IMPL. |
153 virtual void DestroyRemoteClientHost() {} | 156 virtual void DestroyRemoteClientHost() {} |
154 }; | 157 }; |
155 | 158 |
156 } // namespace cc | 159 } // namespace cc |
157 | 160 |
158 #endif // CC_TEST_TEST_HOOKS_H_ | 161 #endif // CC_TEST_TEST_HOOKS_H_ |
OLD | NEW |