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 5654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5665 // layer should be included even though it is transparent. | 5665 // layer should be included even though it is transparent. |
5666 ASSERT_EQ(1u, render_surface_layer_list.size()); | 5666 ASSERT_EQ(1u, render_surface_layer_list.size()); |
5667 ASSERT_EQ(2u, root->render_surface()->layer_list().size()); | 5667 ASSERT_EQ(2u, root->render_surface()->layer_list().size()); |
5668 } | 5668 } |
5669 | 5669 |
5670 using LCDTextTestParam = std::tr1::tuple<bool, bool, bool>; | 5670 using LCDTextTestParam = std::tr1::tuple<bool, bool, bool>; |
5671 class LCDTextTest | 5671 class LCDTextTest |
5672 : public LayerTreeHostCommonTestBase, | 5672 : public LayerTreeHostCommonTestBase, |
5673 public testing::TestWithParam<LCDTextTestParam> { | 5673 public testing::TestWithParam<LCDTextTestParam> { |
5674 protected: | 5674 protected: |
5675 virtual void SetUp() { | 5675 void SetUp() override { |
5676 can_use_lcd_text_ = std::tr1::get<0>(GetParam()); | 5676 can_use_lcd_text_ = std::tr1::get<0>(GetParam()); |
5677 layers_always_allowed_lcd_text_ = std::tr1::get<1>(GetParam()); | 5677 layers_always_allowed_lcd_text_ = std::tr1::get<1>(GetParam()); |
5678 | 5678 |
5679 root_ = Layer::Create(); | 5679 root_ = Layer::Create(); |
5680 child_ = Layer::Create(); | 5680 child_ = Layer::Create(); |
5681 grand_child_ = Layer::Create(); | 5681 grand_child_ = Layer::Create(); |
5682 child_->AddChild(grand_child_.get()); | 5682 child_->AddChild(grand_child_.get()); |
5683 root_->AddChild(child_.get()); | 5683 root_->AddChild(child_.get()); |
5684 | 5684 |
5685 root_->SetContentsOpaque(true); | 5685 root_->SetContentsOpaque(true); |
(...skipping 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8576 | 8576 |
8577 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 8577 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
8578 | 8578 |
8579 gfx::Rect affected_by_delta(0, 0, root_size.width(), | 8579 gfx::Rect affected_by_delta(0, 0, root_size.width(), |
8580 root_size.height() + 50); | 8580 root_size.height() + 50); |
8581 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); | 8581 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); |
8582 } | 8582 } |
8583 | 8583 |
8584 } // namespace | 8584 } // namespace |
8585 } // namespace cc | 8585 } // namespace cc |
OLD | NEW |