| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
| 8 #include "cc/layers/picture_layer.h" | 8 #include "cc/layers/picture_layer.h" |
| 9 #include "cc/test/fake_content_layer_client.h" | 9 #include "cc/test/fake_content_layer_client.h" |
| 10 #include "cc/test/layer_test_common.h" | 10 #include "cc/test/layer_test_common.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 public: | 81 public: |
| 82 void SetupTree() override { | 82 void SetupTree() override { |
| 83 scoped_refptr<Layer> root = Layer::Create(); | 83 scoped_refptr<Layer> root = Layer::Create(); |
| 84 root->SetBounds(gfx::Size(100, 100)); | 84 root->SetBounds(gfx::Size(100, 100)); |
| 85 root->SetIsDrawable(true); | 85 root->SetIsDrawable(true); |
| 86 | 86 |
| 87 child_ = Layer::Create(); | 87 child_ = Layer::Create(); |
| 88 child_->SetBounds(gfx::Size(1, 1)); | 88 child_->SetBounds(gfx::Size(1, 1)); |
| 89 child_->SetPosition(gfx::PointF(10.f, 5.5f)); | 89 child_->SetPosition(gfx::PointF(10.f, 5.5f)); |
| 90 child_->SetIsDrawable(true); | 90 child_->SetIsDrawable(true); |
| 91 child_->SetForceRenderSurfaceForTesting(true); | 91 child_->SetForceRenderSurface(true); |
| 92 root->AddChild(child_); | 92 root->AddChild(child_); |
| 93 | 93 |
| 94 scoped_refptr<Layer> child2 = Layer::Create(); | 94 scoped_refptr<Layer> child2 = Layer::Create(); |
| 95 child2->SetBounds(gfx::Size(10, 12)); | 95 child2->SetBounds(gfx::Size(10, 12)); |
| 96 child2->SetPosition(gfx::PointF(13.f, 8.5f)); | 96 child2->SetPosition(gfx::PointF(13.f, 8.5f)); |
| 97 child2->SetContentsOpaque(true); | 97 child2->SetContentsOpaque(true); |
| 98 child2->SetIsDrawable(true); | 98 child2->SetIsDrawable(true); |
| 99 root->AddChild(child2); | 99 root->AddChild(child2); |
| 100 | 100 |
| 101 layer_tree_host()->SetRootLayer(root); | 101 layer_tree_host()->SetRootLayer(root); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 private: | 263 private: |
| 264 FakeContentLayerClient client_; | 264 FakeContentLayerClient client_; |
| 265 scoped_refptr<Layer> child_; | 265 scoped_refptr<Layer> child_; |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 SINGLE_AND_MULTI_THREAD_TEST_F( | 268 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 269 LayerTreeHostOcclusionTestDrawPropertiesOnScaledMask); | 269 LayerTreeHostOcclusionTestDrawPropertiesOnScaledMask); |
| 270 | 270 |
| 271 } // namespace | 271 } // namespace |
| 272 } // namespace cc | 272 } // namespace cc |
| OLD | NEW |