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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } | 52 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } |
53 | 53 |
54 class MockContentLayerClient : public ContentLayerClient { | 54 class MockContentLayerClient : public ContentLayerClient { |
55 public: | 55 public: |
56 MockContentLayerClient() {} | 56 MockContentLayerClient() {} |
57 ~MockContentLayerClient() override {} | 57 ~MockContentLayerClient() override {} |
58 void PaintContents( | 58 void PaintContents( |
59 SkCanvas* canvas, | 59 SkCanvas* canvas, |
60 const gfx::Rect& clip, | 60 const gfx::Rect& clip, |
| 61 bool can_use_lcd_text, |
| 62 bool contents_opaque, |
61 ContentLayerClient::GraphicsContextStatus gc_status) override {} | 63 ContentLayerClient::GraphicsContextStatus gc_status) override {} |
62 void DidChangeLayerCanUseLCDText() override {} | |
63 bool FillsBoundsCompletely() const override { return false; } | 64 bool FillsBoundsCompletely() const override { return false; } |
64 }; | 65 }; |
65 | 66 |
66 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( | 67 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( |
67 ContentLayerClient* delegate) { | 68 ContentLayerClient* delegate) { |
68 scoped_refptr<FakePictureLayer> to_return = | 69 scoped_refptr<FakePictureLayer> to_return = |
69 FakePictureLayer::Create(delegate); | 70 FakePictureLayer::Create(delegate); |
70 to_return->SetIsDrawable(true); | 71 to_return->SetIsDrawable(true); |
71 return to_return; | 72 return to_return; |
72 } | 73 } |
(...skipping 8484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8557 // by the viewport. | 8558 // by the viewport. |
8558 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); | 8559 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); |
8559 | 8560 |
8560 // Layers drawing to a child render surface should still have their visible | 8561 // Layers drawing to a child render surface should still have their visible |
8561 // content rect clipped by the viewport. | 8562 // content rect clipped by the viewport. |
8562 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); | 8563 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); |
8563 } | 8564 } |
8564 | 8565 |
8565 } // namespace | 8566 } // namespace |
8566 } // namespace cc | 8567 } // namespace cc |
OLD | NEW |