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