| 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 #include "cc/test/layer_tree_test.h" | 5 #include "cc/test/layer_tree_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
| 9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
| 10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 bool result = LayerTreeHostImpl::SwapBuffers(frame); | 110 bool result = LayerTreeHostImpl::SwapBuffers(frame); |
| 111 test_hooks_->SwapBuffersOnThread(this, result); | 111 test_hooks_->SwapBuffersOnThread(this, result); |
| 112 return result; | 112 return result; |
| 113 } | 113 } |
| 114 | 114 |
| 115 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE { | 115 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE { |
| 116 LayerTreeHostImpl::OnSwapBuffersComplete(ack); | 116 LayerTreeHostImpl::OnSwapBuffersComplete(ack); |
| 117 test_hooks_->SwapBuffersCompleteOnThread(this); | 117 test_hooks_->SwapBuffersCompleteOnThread(this); |
| 118 } | 118 } |
| 119 | 119 |
| 120 virtual void UpdateVisibleTiles() OVERRIDE { |
| 121 LayerTreeHostImpl::UpdateVisibleTiles(); |
| 122 test_hooks_->UpdateVisibleTilesOnThread(this); |
| 123 } |
| 124 |
| 120 virtual void NotifyReadyToActivate() OVERRIDE { | 125 virtual void NotifyReadyToActivate() OVERRIDE { |
| 121 if (block_notify_ready_to_activate_for_testing_) | 126 if (block_notify_ready_to_activate_for_testing_) |
| 122 notify_ready_to_activate_was_blocked_ = true; | 127 notify_ready_to_activate_was_blocked_ = true; |
| 123 else | 128 else |
| 124 client_->NotifyReadyToActivate(); | 129 client_->NotifyReadyToActivate(); |
| 125 } | 130 } |
| 126 | 131 |
| 127 virtual void BlockNotifyReadyToActivateForTesting(bool block) OVERRIDE { | 132 virtual void BlockNotifyReadyToActivateForTesting(bool block) OVERRIDE { |
| 128 block_notify_ready_to_activate_for_testing_ = block; | 133 block_notify_ready_to_activate_for_testing_ = block; |
| 129 if (!block && notify_ready_to_activate_was_blocked_) { | 134 if (!block && notify_ready_to_activate_was_blocked_) { |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 651 |
| 647 scoped_refptr<cc::ContextProvider> LayerTreeTest:: | 652 scoped_refptr<cc::ContextProvider> LayerTreeTest:: |
| 648 OffscreenContextProviderForCompositorThread() { | 653 OffscreenContextProviderForCompositorThread() { |
| 649 if (!compositor_thread_contexts_.get() || | 654 if (!compositor_thread_contexts_.get() || |
| 650 compositor_thread_contexts_->DestroyedOnMainThread()) | 655 compositor_thread_contexts_->DestroyedOnMainThread()) |
| 651 compositor_thread_contexts_ = TestContextProvider::Create(); | 656 compositor_thread_contexts_ = TestContextProvider::Create(); |
| 652 return compositor_thread_contexts_; | 657 return compositor_thread_contexts_; |
| 653 } | 658 } |
| 654 | 659 |
| 655 } // namespace cc | 660 } // namespace cc |
| OLD | NEW |