Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: cc/trees/layer_tree_host_unittest_picture.cc

Issue 2183403002: cc: Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree_change
Patch Set: .. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 pinch_->SetIsContainerForFixedPositionLayers(true); 414 pinch_->SetIsContainerForFixedPositionLayers(true);
415 page_scale_layer->AddChild(pinch_); 415 page_scale_layer->AddChild(pinch_);
416 root_clip->AddChild(page_scale_layer); 416 root_clip->AddChild(page_scale_layer);
417 417
418 // Don't be solid color so the layer has tilings/tiles. 418 // Don't be solid color so the layer has tilings/tiles.
419 client_.set_fill_with_nonsolid_color(true); 419 client_.set_fill_with_nonsolid_color(true);
420 picture_ = FakePictureLayer::Create(&client_); 420 picture_ = FakePictureLayer::Create(&client_);
421 picture_->SetBounds(gfx::Size(100, 100)); 421 picture_->SetBounds(gfx::Size(100, 100));
422 pinch_->AddChild(picture_); 422 pinch_->AddChild(picture_);
423 423
424 layer_tree_host()->RegisterViewportLayers(NULL, page_scale_layer, pinch_, 424 layer_tree_host()->GetLayerTree()->RegisterViewportLayers(
425 nullptr); 425 NULL, page_scale_layer, pinch_, nullptr);
426 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f); 426 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f);
427 layer_tree_host()->SetRootLayer(root_clip); 427 layer_tree_host()->SetRootLayer(root_clip);
428 LayerTreeHostPictureTest::SetupTree(); 428 LayerTreeHostPictureTest::SetupTree();
429 client_.set_bounds(picture_->bounds()); 429 client_.set_bounds(picture_->bounds());
430 } 430 }
431 431
432 void InitializeSettings(LayerTreeSettings* settings) override { 432 void InitializeSettings(LayerTreeSettings* settings) override {
433 settings->layer_transforms_should_scale_layer_contents = true; 433 settings->layer_transforms_should_scale_layer_contents = true;
434 } 434 }
435 435
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 int last_frame_drawn_; 563 int last_frame_drawn_;
564 bool ready_to_draw_; 564 bool ready_to_draw_;
565 }; 565 };
566 566
567 // Multi-thread only because in single thread you can't pinch zoom on the 567 // Multi-thread only because in single thread you can't pinch zoom on the
568 // compositor thread. 568 // compositor thread.
569 MULTI_THREAD_TEST_F(LayerTreeHostPictureTestRSLLMembershipWithScale); 569 MULTI_THREAD_TEST_F(LayerTreeHostPictureTestRSLLMembershipWithScale);
570 570
571 } // namespace 571 } // namespace
572 } // namespace cc 572 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698