| 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 scoped_refptr<MockLayer> layer(new MockLayer); | 824 scoped_refptr<MockLayer> layer(new MockLayer); |
| 825 EXPECT_FALSE(layer->needsDisplay()); | 825 EXPECT_FALSE(layer->needsDisplay()); |
| 826 layer->setBounds(gfx::Size(0, 10)); | 826 layer->setBounds(gfx::Size(0, 10)); |
| 827 EXPECT_FALSE(layer->needsDisplay()); | 827 EXPECT_FALSE(layer->needsDisplay()); |
| 828 layer->setBounds(gfx::Size(10, 10)); | 828 layer->setBounds(gfx::Size(10, 10)); |
| 829 EXPECT_TRUE(layer->needsDisplay()); | 829 EXPECT_TRUE(layer->needsDisplay()); |
| 830 } | 830 } |
| 831 | 831 |
| 832 } // namespace | 832 } // namespace |
| 833 } // namespace cc | 833 } // namespace cc |
| OLD | NEW |