| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ContentLayerClient::GraphicsContextStatus gc_status) override {} | 61 ContentLayerClient::GraphicsContextStatus gc_status) override {} |
| 62 void DidChangeLayerCanUseLCDText() override {} | |
| 63 bool FillsBoundsCompletely() const override { return false; } | 62 bool FillsBoundsCompletely() const override { return false; } |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( | 65 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( |
| 67 ContentLayerClient* delegate) { | 66 ContentLayerClient* delegate) { |
| 68 scoped_refptr<FakePictureLayer> to_return = | 67 scoped_refptr<FakePictureLayer> to_return = |
| 69 FakePictureLayer::Create(delegate); | 68 FakePictureLayer::Create(delegate); |
| 70 to_return->SetIsDrawable(true); | 69 to_return->SetIsDrawable(true); |
| 71 return to_return; | 70 return to_return; |
| 72 } | 71 } |
| (...skipping 8514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8587 // by the viewport. | 8586 // by the viewport. |
| 8588 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); | 8587 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); |
| 8589 | 8588 |
| 8590 // Layers drawing to a child render surface should still have their visible | 8589 // Layers drawing to a child render surface should still have their visible |
| 8591 // content rect clipped by the viewport. | 8590 // content rect clipped by the viewport. |
| 8592 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); | 8591 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); |
| 8593 } | 8592 } |
| 8594 | 8593 |
| 8595 } // namespace | 8594 } // namespace |
| 8596 } // namespace cc | 8595 } // namespace cc |
| OLD | NEW |