| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 pinch_->SetScrollClipLayerId(root->id()); | 403 pinch_->SetScrollClipLayerId(root->id()); |
| 404 pinch_->SetIsContainerForFixedPositionLayers(true); | 404 pinch_->SetIsContainerForFixedPositionLayers(true); |
| 405 root->AddChild(pinch_); | 405 root->AddChild(pinch_); |
| 406 | 406 |
| 407 // Don't be solid color so the layer has tilings/tiles. | 407 // Don't be solid color so the layer has tilings/tiles. |
| 408 client_.set_fill_with_nonsolid_color(true); | 408 client_.set_fill_with_nonsolid_color(true); |
| 409 picture_ = FakePictureLayer::Create(layer_settings(), &client_); | 409 picture_ = FakePictureLayer::Create(layer_settings(), &client_); |
| 410 picture_->SetBounds(gfx::Size(100, 100)); | 410 picture_->SetBounds(gfx::Size(100, 100)); |
| 411 pinch_->AddChild(picture_); | 411 pinch_->AddChild(picture_); |
| 412 | 412 |
| 413 layer_tree_host()->RegisterViewportLayers(NULL, root, pinch_, pinch_); | 413 layer_tree_host()->RegisterViewportLayers(NULL, root, pinch_, nullptr); |
| 414 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f); | 414 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f); |
| 415 layer_tree_host()->SetRootLayer(root); | 415 layer_tree_host()->SetRootLayer(root); |
| 416 LayerTreeHostPictureTest::SetupTree(); | 416 LayerTreeHostPictureTest::SetupTree(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void InitializeSettings(LayerTreeSettings* settings) override { | 419 void InitializeSettings(LayerTreeSettings* settings) override { |
| 420 settings->layer_transforms_should_scale_layer_contents = true; | 420 settings->layer_transforms_should_scale_layer_contents = true; |
| 421 } | 421 } |
| 422 | 422 |
| 423 void BeginTest() override { | 423 void BeginTest() override { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 int last_frame_drawn_; | 554 int last_frame_drawn_; |
| 555 bool ready_to_draw_; | 555 bool ready_to_draw_; |
| 556 }; | 556 }; |
| 557 | 557 |
| 558 // Multi-thread only because in single thread you can't pinch zoom on the | 558 // Multi-thread only because in single thread you can't pinch zoom on the |
| 559 // compositor thread. | 559 // compositor thread. |
| 560 MULTI_THREAD_TEST_F(LayerTreeHostPictureTestRSLLMembershipWithScale); | 560 MULTI_THREAD_TEST_F(LayerTreeHostPictureTestRSLLMembershipWithScale); |
| 561 | 561 |
| 562 } // namespace | 562 } // namespace |
| 563 } // namespace cc | 563 } // namespace cc |
| OLD | NEW |