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/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 private: | 49 private: |
50 ~LayerWithForcedDrawsContent() override {} | 50 ~LayerWithForcedDrawsContent() override {} |
51 }; | 51 }; |
52 | 52 |
53 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } | 53 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } |
54 | 54 |
55 class MockContentLayerClient : public ContentLayerClient { | 55 class MockContentLayerClient : public ContentLayerClient { |
56 public: | 56 public: |
57 MockContentLayerClient() {} | 57 MockContentLayerClient() {} |
58 ~MockContentLayerClient() override {} | 58 ~MockContentLayerClient() override {} |
59 void PaintContents( | 59 void PaintContents(SkCanvas* canvas, |
60 SkCanvas* canvas, | 60 const gfx::Rect& clip, |
61 const gfx::Rect& clip, | 61 PaintingControlSetting picture_control) override {} |
62 ContentLayerClient::GraphicsContextStatus gc_status) override {} | |
63 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 62 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
64 const gfx::Rect& clip, | 63 const gfx::Rect& clip, |
65 GraphicsContextStatus gc_status) override { | 64 PaintingControlSetting picture_control) override { |
66 NOTIMPLEMENTED(); | 65 NOTIMPLEMENTED(); |
67 return DisplayItemList::Create(); | 66 return DisplayItemList::Create(); |
68 } | 67 } |
69 bool FillsBoundsCompletely() const override { return false; } | 68 bool FillsBoundsCompletely() const override { return false; } |
70 }; | 69 }; |
71 | 70 |
72 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( | 71 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( |
73 ContentLayerClient* delegate) { | 72 ContentLayerClient* delegate) { |
74 scoped_refptr<FakePictureLayer> to_return = | 73 scoped_refptr<FakePictureLayer> to_return = |
75 FakePictureLayer::Create(delegate); | 74 FakePictureLayer::Create(delegate); |
(...skipping 8591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8667 | 8666 |
8668 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 8667 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
8669 | 8668 |
8670 gfx::Rect affected_by_delta(0, 0, root_size.width(), | 8669 gfx::Rect affected_by_delta(0, 0, root_size.width(), |
8671 root_size.height() + 50); | 8670 root_size.height() + 50); |
8672 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); | 8671 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); |
8673 } | 8672 } |
8674 | 8673 |
8675 } // namespace | 8674 } // namespace |
8676 } // namespace cc | 8675 } // namespace cc |
OLD | NEW |