| 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/font_atlas.h" | 10 #include "cc/font_atlas.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "cc/timing_function.h" | 22 #include "cc/timing_function.h" |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperation.
h" | 24 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperation.
h" |
| 25 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" | 25 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
| 26 #include "ui/gfx/size_conversions.h" | 26 #include "ui/gfx/size_conversions.h" |
| 27 | 27 |
| 28 using namespace WebKit; | 28 using namespace WebKit; |
| 29 | 29 |
| 30 namespace cc { | 30 namespace cc { |
| 31 | 31 |
| 32 bool TestHooks::prepareToDrawOnThread(cc::LayerTreeHostImpl*) | 32 bool TestHooks::prepareToDrawOnThread(cc::LayerTreeHostImpl*, LayerTreeHostImpl:
:FrameData&, bool) |
| 33 { | 33 { |
| 34 return true; | 34 return true; |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool TestHooks::canActivatePendingTree() | 37 bool TestHooks::canActivatePendingTree() |
| 38 { | 38 { |
| 39 return true; | 39 return true; |
| 40 } | 40 } |
| 41 | 41 |
| 42 scoped_ptr<OutputSurface> TestHooks::createOutputSurface() | 42 scoped_ptr<OutputSurface> TestHooks::createOutputSurface() |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 | 57 |
| 58 void MockLayerTreeHostImpl::commitComplete() | 58 void MockLayerTreeHostImpl::commitComplete() |
| 59 { | 59 { |
| 60 LayerTreeHostImpl::commitComplete(); | 60 LayerTreeHostImpl::commitComplete(); |
| 61 m_testHooks->commitCompleteOnThread(this); | 61 m_testHooks->commitCompleteOnThread(this); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool MockLayerTreeHostImpl::prepareToDraw(FrameData& frame) | 64 bool MockLayerTreeHostImpl::prepareToDraw(FrameData& frame) |
| 65 { | 65 { |
| 66 bool result = LayerTreeHostImpl::prepareToDraw(frame); | 66 bool result = LayerTreeHostImpl::prepareToDraw(frame); |
| 67 if (!m_testHooks->prepareToDrawOnThread(this)) | 67 if (!m_testHooks->prepareToDrawOnThread(this, frame, result)) |
| 68 result = false; | 68 result = false; |
| 69 return result; | 69 return result; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void MockLayerTreeHostImpl::drawLayers(FrameData& frame) | 72 void MockLayerTreeHostImpl::drawLayers(FrameData& frame) |
| 73 { | 73 { |
| 74 LayerTreeHostImpl::drawLayers(frame); | 74 LayerTreeHostImpl::drawLayers(frame); |
| 75 m_testHooks->drawLayersOnThread(this); | 75 m_testHooks->drawLayersOnThread(this); |
| 76 } | 76 } |
| 77 | 77 |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 ASSERT_FALSE(m_layerTreeHost.get()); | 437 ASSERT_FALSE(m_layerTreeHost.get()); |
| 438 m_client.reset(); | 438 m_client.reset(); |
| 439 if (m_timedOut) { | 439 if (m_timedOut) { |
| 440 FAIL() << "Test timed out"; | 440 FAIL() << "Test timed out"; |
| 441 return; | 441 return; |
| 442 } | 442 } |
| 443 afterTest(); | 443 afterTest(); |
| 444 } | 444 } |
| 445 | 445 |
| 446 } // namespace cc | 446 } // namespace cc |
| OLD | NEW |