| 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_common.h" | 5 #include "cc/test/layer_tree_test_common.h" |
| 6 | 6 |
| 7 #include "cc/animation.h" | 7 #include "cc/animation.h" |
| 8 #include "cc/animation_registrar.h" | 8 #include "cc/animation_registrar.h" |
| 9 #include "cc/content_layer.h" | 9 #include "cc/content_layer.h" |
| 10 #include "cc/input_handler.h" | 10 #include "cc/input_handler.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 result = false; | 91 result = false; |
| 92 return result; | 92 return result; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void MockLayerTreeHostImpl::DrawLayers(FrameData* frame) | 95 void MockLayerTreeHostImpl::DrawLayers(FrameData* frame) |
| 96 { | 96 { |
| 97 LayerTreeHostImpl::DrawLayers(frame); | 97 LayerTreeHostImpl::DrawLayers(frame); |
| 98 m_testHooks->drawLayersOnThread(this); | 98 m_testHooks->drawLayersOnThread(this); |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool MockLayerTreeHostImpl::SwapBuffers() |
| 102 { |
| 103 bool result = LayerTreeHostImpl::SwapBuffers(); |
| 104 m_testHooks->swapBuffersOnThread(this, result); |
| 105 return result; |
| 106 } |
| 107 |
| 101 bool MockLayerTreeHostImpl::ActivatePendingTreeIfNeeded() | 108 bool MockLayerTreeHostImpl::ActivatePendingTreeIfNeeded() |
| 102 { | 109 { |
| 103 if (!pending_tree()) | 110 if (!pending_tree()) |
| 104 return false; | 111 return false; |
| 105 | 112 |
| 106 if (!m_testHooks->canActivatePendingTree()) | 113 if (!m_testHooks->canActivatePendingTree()) |
| 107 return false; | 114 return false; |
| 108 | 115 |
| 109 bool activated = LayerTreeHostImpl::ActivatePendingTreeIfNeeded(); | 116 bool activated = LayerTreeHostImpl::ActivatePendingTreeIfNeeded(); |
| 110 if (activated) | 117 if (activated) |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 ASSERT_FALSE(m_layerTreeHost.get()); | 521 ASSERT_FALSE(m_layerTreeHost.get()); |
| 515 m_client.reset(); | 522 m_client.reset(); |
| 516 if (m_timedOut) { | 523 if (m_timedOut) { |
| 517 FAIL() << "Test timed out"; | 524 FAIL() << "Test timed out"; |
| 518 return; | 525 return; |
| 519 } | 526 } |
| 520 afterTest(); | 527 afterTest(); |
| 521 } | 528 } |
| 522 | 529 |
| 523 } // namespace cc | 530 } // namespace cc |
| OLD | NEW |