| OLD | NEW |
| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 void ReadSettings(const LayerTreeSettings& settings); | 33 void ReadSettings(const LayerTreeSettings& settings); |
| 34 | 34 |
| 35 virtual void CreateResourceAndTileTaskWorkerPool( | 35 virtual void CreateResourceAndTileTaskWorkerPool( |
| 36 LayerTreeHostImpl* host_impl, | 36 LayerTreeHostImpl* host_impl, |
| 37 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 37 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
| 38 scoped_ptr<ResourcePool>* resource_pool, | 38 scoped_ptr<ResourcePool>* resource_pool, |
| 39 scoped_ptr<ResourcePool>* staging_resource_pool); | 39 scoped_ptr<ResourcePool>* staging_resource_pool); |
| 40 virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, | 40 virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, |
| 41 const BeginFrameArgs& args) {} | 41 const BeginFrameArgs& args) {} |
| 42 virtual void DidFinishImplFrameOnThread(LayerTreeHostImpl* host_impl) {} | |
| 43 virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, | 42 virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, |
| 44 CommitEarlyOutReason reason) {} | 43 CommitEarlyOutReason reason) {} |
| 45 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} | 44 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} |
| 46 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 45 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} |
| 47 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} | 46 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} |
| 48 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} | 47 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) {} |
| 49 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, | 48 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, |
| 50 bool success) {} | 49 bool success) {} |
| 51 virtual DrawResult PrepareToDrawOnThread( | 50 virtual DrawResult PrepareToDrawOnThread( |
| 52 LayerTreeHostImpl* host_impl, | 51 LayerTreeHostImpl* host_impl, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 81 virtual void DidInitializeOutputSurface() {} | 80 virtual void DidInitializeOutputSurface() {} |
| 82 virtual void DidFailToInitializeOutputSurface() {} | 81 virtual void DidFailToInitializeOutputSurface() {} |
| 83 virtual void DidAddAnimation() {} | 82 virtual void DidAddAnimation() {} |
| 84 virtual void WillCommit() {} | 83 virtual void WillCommit() {} |
| 85 virtual void DidCommit() {} | 84 virtual void DidCommit() {} |
| 86 virtual void DidCommitAndDrawFrame() {} | 85 virtual void DidCommitAndDrawFrame() {} |
| 87 virtual void DidCompleteSwapBuffers() {} | 86 virtual void DidCompleteSwapBuffers() {} |
| 88 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, | 87 virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, |
| 89 bool visible) {} | 88 bool visible) {} |
| 90 virtual void ScheduleComposite() {} | 89 virtual void ScheduleComposite() {} |
| 90 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} |
| 91 | 91 |
| 92 // Hooks for SchedulerClient. | 92 // Hooks for SchedulerClient. |
| 93 virtual void WillBeginImplFrame(const BeginFrameArgs& args) {} |
| 93 virtual void ScheduledActionWillSendBeginMainFrame() {} | 94 virtual void ScheduledActionWillSendBeginMainFrame() {} |
| 94 virtual void ScheduledActionSendBeginMainFrame() {} | 95 virtual void ScheduledActionSendBeginMainFrame() {} |
| 95 virtual void ScheduledActionDrawAndSwapIfPossible() {} | 96 virtual void ScheduledActionDrawAndSwapIfPossible() {} |
| 96 virtual void ScheduledActionAnimate() {} | 97 virtual void ScheduledActionAnimate() {} |
| 97 virtual void ScheduledActionCommit() {} | 98 virtual void ScheduledActionCommit() {} |
| 98 virtual void ScheduledActionBeginOutputSurfaceCreation() {} | 99 virtual void ScheduledActionBeginOutputSurfaceCreation() {} |
| 99 virtual void ScheduledActionPrepareTiles() {} | 100 virtual void ScheduledActionPrepareTiles() {} |
| 100 virtual void ScheduledActionInvalidateOutputSurface() {} | 101 virtual void ScheduledActionInvalidateOutputSurface() {} |
| 101 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} | |
| 102 virtual void SendBeginMainFrameNotExpectedSoon() {} | |
| 103 | 102 |
| 104 // Implementation of AnimationDelegate: | 103 // Implementation of AnimationDelegate: |
| 105 void NotifyAnimationStarted(base::TimeTicks monotonic_time, | 104 void NotifyAnimationStarted(base::TimeTicks monotonic_time, |
| 106 Animation::TargetProperty target_property, | 105 Animation::TargetProperty target_property, |
| 107 int group) override {} | 106 int group) override {} |
| 108 void NotifyAnimationFinished(base::TimeTicks monotonic_time, | 107 void NotifyAnimationFinished(base::TimeTicks monotonic_time, |
| 109 Animation::TargetProperty target_property, | 108 Animation::TargetProperty target_property, |
| 110 int group) override {} | 109 int group) override {} |
| 111 | 110 |
| 112 virtual void RequestNewOutputSurface() = 0; | 111 virtual void RequestNewOutputSurface() = 0; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 379 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
| 381 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 380 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
| 382 | 381 |
| 383 // Some tests want to control when notify ready for activation occurs, | 382 // Some tests want to control when notify ready for activation occurs, |
| 384 // but this is not supported in the single-threaded case. | 383 // but this is not supported in the single-threaded case. |
| 385 #define SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ | 384 #define SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ |
| 386 SINGLE_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ | 385 SINGLE_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ |
| 387 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 386 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
| 388 | 387 |
| 389 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 388 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
| OLD | NEW |