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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 virtual void DidCommitAndDrawFrame() OVERRIDE { | 310 virtual void DidCommitAndDrawFrame() OVERRIDE { |
311 test_hooks_->DidCommitAndDrawFrame(); | 311 test_hooks_->DidCommitAndDrawFrame(); |
312 } | 312 } |
313 | 313 |
314 virtual void DidCompleteSwapBuffers() OVERRIDE { | 314 virtual void DidCompleteSwapBuffers() OVERRIDE { |
315 test_hooks_->DidCompleteSwapBuffers(); | 315 test_hooks_->DidCompleteSwapBuffers(); |
316 } | 316 } |
317 | 317 |
318 virtual void DidPostSwapBuffers() OVERRIDE {} | 318 virtual void DidPostSwapBuffers() OVERRIDE {} |
319 virtual void DidAbortSwapBuffers() OVERRIDE {} | 319 virtual void DidAbortSwapBuffers() OVERRIDE {} |
| 320 virtual void DidLoseOutputSurface() OVERRIDE {} |
320 | 321 |
321 private: | 322 private: |
322 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 323 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
323 : test_hooks_(test_hooks) {} | 324 : test_hooks_(test_hooks) {} |
324 | 325 |
325 TestHooks* test_hooks_; | 326 TestHooks* test_hooks_; |
326 }; | 327 }; |
327 | 328 |
328 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 329 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
329 class LayerTreeHostForTesting : public LayerTreeHost { | 330 class LayerTreeHostForTesting : public LayerTreeHost { |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 return -1; | 702 return -1; |
702 } | 703 } |
703 | 704 |
704 void LayerTreeTest::DestroyLayerTreeHost() { | 705 void LayerTreeTest::DestroyLayerTreeHost() { |
705 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 706 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
706 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 707 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
707 layer_tree_host_.reset(); | 708 layer_tree_host_.reset(); |
708 } | 709 } |
709 | 710 |
710 } // namespace cc | 711 } // namespace cc |
OLD | NEW |