| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/fake_content_layer_client.h" | 7 #include "cc/test/fake_content_layer_client.h" |
| 8 #include "cc/test/fake_picture_layer.h" | 8 #include "cc/test/fake_picture_layer.h" |
| 9 #include "cc/test/fake_picture_layer_impl.h" | 9 #include "cc/test/fake_picture_layer_impl.h" |
| 10 #include "cc/test/layer_tree_test.h" | 10 #include "cc/test/layer_tree_test.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 pinch_->SetIsContainerForFixedPositionLayers(true); | 416 pinch_->SetIsContainerForFixedPositionLayers(true); |
| 417 page_scale_layer->AddChild(pinch_); | 417 page_scale_layer->AddChild(pinch_); |
| 418 root_clip->AddChild(page_scale_layer); | 418 root_clip->AddChild(page_scale_layer); |
| 419 | 419 |
| 420 // Don't be solid color so the layer has tilings/tiles. | 420 // Don't be solid color so the layer has tilings/tiles. |
| 421 client_.set_fill_with_nonsolid_color(true); | 421 client_.set_fill_with_nonsolid_color(true); |
| 422 picture_ = FakePictureLayer::Create(&client_); | 422 picture_ = FakePictureLayer::Create(&client_); |
| 423 picture_->SetBounds(gfx::Size(100, 100)); | 423 picture_->SetBounds(gfx::Size(100, 100)); |
| 424 pinch_->AddChild(picture_); | 424 pinch_->AddChild(picture_); |
| 425 | 425 |
| 426 layer_tree_host()->RegisterViewportLayers(NULL, page_scale_layer, pinch_, | 426 layer_tree_host()->RegisterViewportLayers(NULL, page_scale_layer, root_clip, |
| 427 nullptr); | 427 nullptr, pinch_, nullptr); |
| 428 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f); | 428 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f); |
| 429 layer_tree_host()->SetRootLayer(root_clip); | 429 layer_tree_host()->SetRootLayer(root_clip); |
| 430 LayerTreeHostPictureTest::SetupTree(); | 430 LayerTreeHostPictureTest::SetupTree(); |
| 431 client_.set_bounds(picture_->bounds()); | 431 client_.set_bounds(picture_->bounds()); |
| 432 } | 432 } |
| 433 | 433 |
| 434 void InitializeSettings(LayerTreeSettings* settings) override { | 434 void InitializeSettings(LayerTreeSettings* settings) override { |
| 435 settings->layer_transforms_should_scale_layer_contents = true; | 435 settings->layer_transforms_should_scale_layer_contents = true; |
| 436 } | 436 } |
| 437 | 437 |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 void AfterTest() override {} | 676 void AfterTest() override {} |
| 677 | 677 |
| 678 scoped_refptr<FakePictureLayer> will_change_layer_; | 678 scoped_refptr<FakePictureLayer> will_change_layer_; |
| 679 scoped_refptr<FakePictureLayer> normal_layer_; | 679 scoped_refptr<FakePictureLayer> normal_layer_; |
| 680 }; | 680 }; |
| 681 | 681 |
| 682 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostPictureTestForceRecalculateScales); | 682 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostPictureTestForceRecalculateScales); |
| 683 | 683 |
| 684 } // namespace | 684 } // namespace |
| 685 } // namespace cc | 685 } // namespace cc |
| OLD | NEW |