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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 virtual void CommitComplete() OVERRIDE { | 160 virtual void CommitComplete() OVERRIDE { |
161 LayerTreeHostImpl::CommitComplete(); | 161 LayerTreeHostImpl::CommitComplete(); |
162 test_hooks_->CommitCompleteOnThread(this); | 162 test_hooks_->CommitCompleteOnThread(this); |
163 } | 163 } |
164 | 164 |
165 virtual DrawResult PrepareToDraw(FrameData* frame) OVERRIDE { | 165 virtual DrawResult PrepareToDraw(FrameData* frame) OVERRIDE { |
166 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); | 166 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); |
167 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); | 167 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); |
168 } | 168 } |
169 | 169 |
170 virtual void DrawLayers(FrameData* frame, | 170 virtual void DrawLayers(FrameData* frame) OVERRIDE { |
171 base::TimeTicks frame_begin_time) OVERRIDE { | 171 LayerTreeHostImpl::DrawLayers(frame); |
172 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time); | |
173 test_hooks_->DrawLayersOnThread(this); | 172 test_hooks_->DrawLayersOnThread(this); |
174 } | 173 } |
175 | 174 |
176 virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) OVERRIDE { | 175 virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) OVERRIDE { |
177 bool result = LayerTreeHostImpl::SwapBuffers(frame); | 176 bool result = LayerTreeHostImpl::SwapBuffers(frame); |
178 test_hooks_->SwapBuffersOnThread(this, result); | 177 test_hooks_->SwapBuffersOnThread(this, result); |
179 return result; | 178 return result; |
180 } | 179 } |
181 | 180 |
182 virtual void DidSwapBuffersComplete() OVERRIDE { | 181 virtual void DidSwapBuffersComplete() OVERRIDE { |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 return -1; | 736 return -1; |
738 } | 737 } |
739 | 738 |
740 void LayerTreeTest::DestroyLayerTreeHost() { | 739 void LayerTreeTest::DestroyLayerTreeHost() { |
741 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 740 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
742 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 741 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
743 layer_tree_host_.reset(); | 742 layer_tree_host_.reset(); |
744 } | 743 } |
745 | 744 |
746 } // namespace cc | 745 } // namespace cc |
OLD | NEW |