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/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
10 #include "cc/resources/layer_painter.h" | 10 #include "cc/resources/layer_painter.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); | 44 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); |
45 } | 45 } |
46 | 46 |
47 MOCK_METHOD0(SetNeedsCommit, void()); | 47 MOCK_METHOD0(SetNeedsCommit, void()); |
48 MOCK_METHOD0(SetNeedsUpdateLayers, void()); | 48 MOCK_METHOD0(SetNeedsUpdateLayers, void()); |
49 MOCK_METHOD0(SetNeedsFullTreeSync, void()); | 49 MOCK_METHOD0(SetNeedsFullTreeSync, void()); |
50 }; | 50 }; |
51 | 51 |
52 class MockLayerPainter : public LayerPainter { | 52 class MockLayerPainter : public LayerPainter { |
53 public: | 53 public: |
54 virtual void Paint(SkCanvas* canvas, | 54 virtual void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) OVERRIDE { |
55 const gfx::Rect& content_rect, | 55 } |
56 gfx::RectF* opaque) OVERRIDE {} | |
57 }; | 56 }; |
58 | 57 |
59 class LayerTest : public testing::Test { | 58 class LayerTest : public testing::Test { |
60 public: | 59 public: |
61 LayerTest() | 60 LayerTest() |
62 : host_impl_(&proxy_, &shared_bitmap_manager_), | 61 : host_impl_(&proxy_, &shared_bitmap_manager_), |
63 fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} | 62 fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} |
64 | 63 |
65 protected: | 64 protected: |
66 virtual void SetUp() OVERRIDE { | 65 virtual void SetUp() OVERRIDE { |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 root_layer->AddChild(becomes_not_draws_content); | 1190 root_layer->AddChild(becomes_not_draws_content); |
1192 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); | 1191 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); |
1193 | 1192 |
1194 becomes_draws_content->SetIsDrawable(true); | 1193 becomes_draws_content->SetIsDrawable(true); |
1195 root_layer->AddChild(becomes_draws_content); | 1194 root_layer->AddChild(becomes_draws_content); |
1196 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); | 1195 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); |
1197 } | 1196 } |
1198 | 1197 |
1199 } // namespace | 1198 } // namespace |
1200 } // namespace cc | 1199 } // namespace cc |
OLD | NEW |