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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include "cc/animation/keyframed_animation_curve.h" | 7 #include "cc/animation/keyframed_animation_curve.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/base/thread.h" | 9 #include "cc/base/thread.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 code_to_test; \ | 37 code_to_test; \ |
38 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ | 38 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ |
39 } while (false) | 39 } while (false) |
40 | 40 |
41 | 41 |
42 namespace cc { | 42 namespace cc { |
43 namespace { | 43 namespace { |
44 | 44 |
45 class MockLayerTreeHost : public LayerTreeHost { | 45 class MockLayerTreeHost : public LayerTreeHost { |
46 public: | 46 public: |
47 MockLayerTreeHost(LayerTreeHostClient* client) | 47 explicit MockLayerTreeHost(LayerTreeHostClient* client) |
48 : LayerTreeHost(client, LayerTreeSettings()) { | 48 : LayerTreeHost(client, LayerTreeSettings()) { |
49 Initialize(scoped_ptr<Thread>(NULL)); | 49 Initialize(scoped_ptr<Thread>(NULL)); |
50 } | 50 } |
51 | 51 |
52 MOCK_METHOD0(SetNeedsCommit, void()); | 52 MOCK_METHOD0(SetNeedsCommit, void()); |
53 MOCK_METHOD0(SetNeedsFullTreeSync, void()); | 53 MOCK_METHOD0(SetNeedsFullTreeSync, void()); |
54 }; | 54 }; |
55 | 55 |
56 class MockLayerPainter : public LayerPainter { | 56 class MockLayerPainter : public LayerPainter { |
57 public: | 57 public: |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 layer->SetLayerTreeHost(layer_tree_host.get()); | 1002 layer->SetLayerTreeHost(layer_tree_host.get()); |
1003 AssertLayerTreeHostMatchesForSubtree(layer.get(), layer_tree_host.get()); | 1003 AssertLayerTreeHostMatchesForSubtree(layer.get(), layer_tree_host.get()); |
1004 | 1004 |
1005 // Case 3: with a LayerTreeHost where accelerated animation is disabled, the | 1005 // Case 3: with a LayerTreeHost where accelerated animation is disabled, the |
1006 // animation should be rejected. | 1006 // animation should be rejected. |
1007 EXPECT_FALSE(AddTestAnimation(layer.get())); | 1007 EXPECT_FALSE(AddTestAnimation(layer.get())); |
1008 } | 1008 } |
1009 | 1009 |
1010 } // namespace | 1010 } // namespace |
1011 } // namespace cc | 1011 } // namespace cc |
OLD | NEW |