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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } | 54 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } |
55 | 55 |
56 class MockContentLayerClient : public ContentLayerClient { | 56 class MockContentLayerClient : public ContentLayerClient { |
57 public: | 57 public: |
58 MockContentLayerClient() {} | 58 MockContentLayerClient() {} |
59 ~MockContentLayerClient() override {} | 59 ~MockContentLayerClient() override {} |
60 void PaintContents(SkCanvas* canvas, | 60 void PaintContents(SkCanvas* canvas, |
61 const gfx::Rect& clip, | 61 const gfx::Rect& clip, |
62 PaintingControlSetting picture_control) override {} | 62 PaintingControlSetting picture_control) override {} |
63 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 63 void PaintContentsToDisplayList( |
| 64 DisplayItemList* display_list, |
64 const gfx::Rect& clip, | 65 const gfx::Rect& clip, |
65 PaintingControlSetting picture_control) override { | 66 PaintingControlSetting picture_control) override { |
66 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
67 return DisplayItemList::Create(); | |
68 } | 68 } |
69 bool FillsBoundsCompletely() const override { return false; } | 69 bool FillsBoundsCompletely() const override { return false; } |
70 }; | 70 }; |
71 | 71 |
72 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( | 72 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( |
73 ContentLayerClient* delegate) { | 73 ContentLayerClient* delegate) { |
74 scoped_refptr<FakePictureLayer> to_return = | 74 scoped_refptr<FakePictureLayer> to_return = |
75 FakePictureLayer::Create(delegate); | 75 FakePictureLayer::Create(delegate); |
76 to_return->SetIsDrawable(true); | 76 to_return->SetIsDrawable(true); |
77 return to_return; | 77 return to_return; |
(...skipping 9078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9156 host->SetRootLayer(root); | 9156 host->SetRootLayer(root); |
9157 | 9157 |
9158 ExecuteCalculateDrawProperties(root.get()); | 9158 ExecuteCalculateDrawProperties(root.get()); |
9159 | 9159 |
9160 gfx::Rect expected(0, 0, 50, 50); | 9160 gfx::Rect expected(0, 0, 50, 50); |
9161 EXPECT_EQ(expected, fixed->visible_rect_from_property_trees()); | 9161 EXPECT_EQ(expected, fixed->visible_rect_from_property_trees()); |
9162 } | 9162 } |
9163 | 9163 |
9164 } // namespace | 9164 } // namespace |
9165 } // namespace cc | 9165 } // namespace cc |
OLD | NEW |