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/layer.h" | 5 #include "cc/layer.h" |
6 | 6 |
7 #include "cc/keyframed_animation_curve.h" | 7 #include "cc/keyframed_animation_curve.h" |
8 #include "cc/layer_impl.h" | 8 #include "cc/layer_impl.h" |
9 #include "cc/layer_painter.h" | 9 #include "cc/layer_painter.h" |
10 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 private: | 55 private: |
56 FakeLayerImplTreeHostClient m_fakeClient; | 56 FakeLayerImplTreeHostClient m_fakeClient; |
57 }; | 57 }; |
58 | 58 |
59 class MockLayerPainter : public LayerPainter { | 59 class MockLayerPainter : public LayerPainter { |
60 public: | 60 public: |
61 virtual void paint(SkCanvas*, const gfx::Rect&, gfx::RectF&) OVERRIDE { } | 61 virtual void paint(SkCanvas*, gfx::Rect, gfx::RectF&) OVERRIDE { } |
62 }; | 62 }; |
63 | 63 |
64 | 64 |
65 class LayerTest : public testing::Test { | 65 class LayerTest : public testing::Test { |
66 public: | 66 public: |
67 LayerTest() | 67 LayerTest() |
68 : m_hostImpl(&m_proxy) | 68 : m_hostImpl(&m_proxy) |
69 { | 69 { |
70 } | 70 } |
71 | 71 |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 scoped_refptr<MockLayer> layer(new MockLayer); | 854 scoped_refptr<MockLayer> layer(new MockLayer); |
855 EXPECT_FALSE(layer->needsDisplay()); | 855 EXPECT_FALSE(layer->needsDisplay()); |
856 layer->setBounds(gfx::Size(0, 10)); | 856 layer->setBounds(gfx::Size(0, 10)); |
857 EXPECT_FALSE(layer->needsDisplay()); | 857 EXPECT_FALSE(layer->needsDisplay()); |
858 layer->setBounds(gfx::Size(10, 10)); | 858 layer->setBounds(gfx::Size(10, 10)); |
859 EXPECT_TRUE(layer->needsDisplay()); | 859 EXPECT_TRUE(layer->needsDisplay()); |
860 } | 860 } |
861 | 861 |
862 } // namespace | 862 } // namespace |
863 } // namespace cc | 863 } // namespace cc |
OLD | NEW |