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