| 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 10 matching lines...) Expand all Loading... |
| 21 ~TestHooks() override; | 21 ~TestHooks() override; |
| 22 | 22 |
| 23 // Compositor thread hooks. | 23 // Compositor thread hooks. |
| 24 virtual void CreateResourceAndRasterBufferProvider( | 24 virtual void CreateResourceAndRasterBufferProvider( |
| 25 LayerTreeHostImpl* host_impl, | 25 LayerTreeHostImpl* host_impl, |
| 26 std::unique_ptr<RasterBufferProvider>* raster_buffer_provider, | 26 std::unique_ptr<RasterBufferProvider>* raster_buffer_provider, |
| 27 std::unique_ptr<ResourcePool>* resource_pool); | 27 std::unique_ptr<ResourcePool>* resource_pool); |
| 28 virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, | 28 virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, |
| 29 const BeginFrameArgs& args) {} | 29 const BeginFrameArgs& args) {} |
| 30 virtual void DidFinishImplFrameOnThread(LayerTreeHostImpl* host_impl) {} | 30 virtual void DidFinishImplFrameOnThread(LayerTreeHostImpl* host_impl) {} |
| 31 virtual void DidSendBeginMainFrameOnThread(LayerTreeHostImpl* host_impl) {} |
| 31 virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, | 32 virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, |
| 32 CommitEarlyOutReason reason) {} | 33 CommitEarlyOutReason reason) {} |
| 33 virtual void ReadyToCommitOnThread(LayerTreeHostImpl* host_impl) {} | 34 virtual void ReadyToCommitOnThread(LayerTreeHostImpl* host_impl) {} |
| 34 virtual void WillPrepareTilesOnThread(LayerTreeHostImpl* host_impl) {} | 35 virtual void WillPrepareTilesOnThread(LayerTreeHostImpl* host_impl) {} |
| 35 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} | 36 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} |
| 36 virtual void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 37 virtual void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} |
| 37 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 38 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} |
| 38 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} | 39 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} |
| 39 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} | 40 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} |
| 40 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, | 41 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 virtual void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, | 52 virtual void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, |
| 52 const Tile* tile) {} | 53 const Tile* tile) {} |
| 53 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, | 54 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, |
| 54 bool visible) {} | 55 bool visible) {} |
| 55 virtual void AnimateLayers(LayerTreeHostImpl* host_impl, | 56 virtual void AnimateLayers(LayerTreeHostImpl* host_impl, |
| 56 base::TimeTicks monotonic_time) {} | 57 base::TimeTicks monotonic_time) {} |
| 57 virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl, | 58 virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl, |
| 58 bool has_unfinished_animation) {} | 59 bool has_unfinished_animation) {} |
| 59 virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl, | 60 virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl, |
| 60 base::TimeTicks monotonic_time) {} | 61 base::TimeTicks monotonic_time) {} |
| 62 virtual void DidInvalidateContentOnImplSide(LayerTreeHostImpl* host_impl) {} |
| 63 virtual void DidRequestImplSideInvalidation(LayerTreeHostImpl* host_impl) {} |
| 61 | 64 |
| 62 // Asynchronous compositor thread hooks. | 65 // Asynchronous compositor thread hooks. |
| 63 // These are called asynchronously from the LayerTreeHostImpl performing its | 66 // These are called asynchronously from the LayerTreeHostImpl performing its |
| 64 // draw, so you should record state you want to use here in | 67 // draw, so you should record state you want to use here in |
| 65 // DrawLayersOnThread() instead. For that reason these methods do not receive | 68 // DrawLayersOnThread() instead. For that reason these methods do not receive |
| 66 // a LayerTreeHostImpl pointer. | 69 // a LayerTreeHostImpl pointer. |
| 67 virtual void DisplayReceivedCompositorFrameOnThread( | 70 virtual void DisplayReceivedCompositorFrameOnThread( |
| 68 const CompositorFrame& frame) {} | 71 const CompositorFrame& frame) {} |
| 69 virtual void DisplayWillDrawAndSwapOnThread( | 72 virtual void DisplayWillDrawAndSwapOnThread( |
| 70 bool will_draw_and_swap, | 73 bool will_draw_and_swap, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // OutputSurface indirections to the LayerTreeTest, that can be further | 115 // OutputSurface indirections to the LayerTreeTest, that can be further |
| 113 // overridden. | 116 // overridden. |
| 114 virtual void RequestNewCompositorFrameSink() = 0; | 117 virtual void RequestNewCompositorFrameSink() = 0; |
| 115 virtual std::unique_ptr<OutputSurface> CreateDisplayOutputSurfaceOnThread( | 118 virtual std::unique_ptr<OutputSurface> CreateDisplayOutputSurfaceOnThread( |
| 116 scoped_refptr<ContextProvider> compositor_context_provider) = 0; | 119 scoped_refptr<ContextProvider> compositor_context_provider) = 0; |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 } // namespace cc | 122 } // namespace cc |
| 120 | 123 |
| 121 #endif // CC_TEST_TEST_HOOKS_H_ | 124 #endif // CC_TEST_TEST_HOOKS_H_ |
| OLD | NEW |