| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); | 45 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); |
| 46 } | 46 } |
| 47 | 47 |
| 48 MOCK_METHOD0(SetNeedsCommit, void()); | 48 MOCK_METHOD0(SetNeedsCommit, void()); |
| 49 MOCK_METHOD0(SetNeedsUpdateLayers, void()); | 49 MOCK_METHOD0(SetNeedsUpdateLayers, void()); |
| 50 MOCK_METHOD0(SetNeedsFullTreeSync, void()); | 50 MOCK_METHOD0(SetNeedsFullTreeSync, void()); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 class MockLayerPainter : public LayerPainter { | 53 class MockLayerPainter : public LayerPainter { |
| 54 public: | 54 public: |
| 55 void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {} | 55 void Paint(SkCanvas* canvas, |
| 56 const gfx::Rect& content_rect, |
| 57 bool can_use_lcd_text, |
| 58 bool contents_opaque) override {} |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 class LayerTest : public testing::Test { | 61 class LayerTest : public testing::Test { |
| 59 public: | 62 public: |
| 60 LayerTest() | 63 LayerTest() |
| 61 : host_impl_(&proxy_, &shared_bitmap_manager_), | 64 : host_impl_(&proxy_, &shared_bitmap_manager_), |
| 62 fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} | 65 fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} |
| 63 | 66 |
| 64 protected: | 67 protected: |
| 65 virtual void SetUp() override { | 68 virtual void SetUp() override { |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 root_layer->AddChild(becomes_not_draws_content); | 1247 root_layer->AddChild(becomes_not_draws_content); |
| 1245 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); | 1248 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); |
| 1246 | 1249 |
| 1247 becomes_draws_content->SetIsDrawable(true); | 1250 becomes_draws_content->SetIsDrawable(true); |
| 1248 root_layer->AddChild(becomes_draws_content); | 1251 root_layer->AddChild(becomes_draws_content); |
| 1249 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); | 1252 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); |
| 1250 } | 1253 } |
| 1251 | 1254 |
| 1252 } // namespace | 1255 } // namespace |
| 1253 } // namespace cc | 1256 } // namespace cc |
| OLD | NEW |