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

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

Issue 1912893002: cc : Stop pushing properties not used by LayerImpl to LayerImpl. (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPushPropertiesTo); 689 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPushPropertiesTo);
690 690
691 // Verify damage status of property trees is preserved after commit. 691 // Verify damage status of property trees is preserved after commit.
692 class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest { 692 class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
693 protected: 693 protected:
694 void SetupTree() override { 694 void SetupTree() override {
695 scoped_refptr<Layer> root = Layer::Create(); 695 scoped_refptr<Layer> root = Layer::Create();
696 scoped_refptr<Layer> child = Layer::Create(); 696 scoped_refptr<Layer> child = Layer::Create();
697 // This is to force the child to create a transform and effect node. 697 // This is to force the child to create a transform and effect node.
698 child->SetForceRenderSurface(true); 698 child->SetForceRenderSurfaceForTesting(true);
699 root->AddChild(std::move(child)); 699 root->AddChild(std::move(child));
700 layer_tree_host()->SetRootLayer(root); 700 layer_tree_host()->SetRootLayer(root);
701 LayerTreeHostTest::SetupTree(); 701 LayerTreeHostTest::SetupTree();
702 } 702 }
703 703
704 enum Animations { 704 enum Animations {
705 OPACITY, 705 OPACITY,
706 TRANSFORM, 706 TRANSFORM,
707 FILTER, 707 FILTER,
708 END, 708 END,
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 case 1: 1351 case 1:
1352 // Test not owning the surface. 1352 // Test not owning the surface.
1353 parent_layer_->SetOpacity(1.0f); 1353 parent_layer_->SetOpacity(1.0f);
1354 break; 1354 break;
1355 case 2: 1355 case 2:
1356 parent_layer_->SetOpacity(0.0f); 1356 parent_layer_->SetOpacity(0.0f);
1357 break; 1357 break;
1358 case 3: 1358 case 3:
1359 // Test owning the surface. 1359 // Test owning the surface.
1360 parent_layer_->SetOpacity(0.5f); 1360 parent_layer_->SetOpacity(0.5f);
1361 parent_layer_->SetForceRenderSurface(true); 1361 parent_layer_->SetForceRenderSurfaceForTesting(true);
1362 break; 1362 break;
1363 case 4: 1363 case 4:
1364 EndTest(); 1364 EndTest();
1365 break; 1365 break;
1366 default: 1366 default:
1367 NOTREACHED(); 1367 NOTREACHED();
1368 } 1368 }
1369 } 1369 }
1370 1370
1371 void AfterTest() override {} 1371 void AfterTest() override {}
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 } 2337 }
2338 2338
2339 void SetupTree() override { 2339 void SetupTree() override {
2340 root_layer_ = FakePictureLayer::Create(&client_); 2340 root_layer_ = FakePictureLayer::Create(&client_);
2341 root_layer_->SetIsDrawable(true); 2341 root_layer_->SetIsDrawable(true);
2342 root_layer_->SetBounds(gfx::Size(50, 50)); 2342 root_layer_->SetBounds(gfx::Size(50, 50));
2343 2343
2344 parent_layer_ = FakePictureLayer::Create(&client_); 2344 parent_layer_ = FakePictureLayer::Create(&client_);
2345 parent_layer_->SetIsDrawable(true); 2345 parent_layer_->SetIsDrawable(true);
2346 parent_layer_->SetBounds(gfx::Size(50, 50)); 2346 parent_layer_->SetBounds(gfx::Size(50, 50));
2347 parent_layer_->SetForceRenderSurface(true); 2347 parent_layer_->SetForceRenderSurfaceForTesting(true);
2348 2348
2349 child_layer_ = FakePictureLayer::Create(&client_); 2349 child_layer_ = FakePictureLayer::Create(&client_);
2350 child_layer_->SetIsDrawable(true); 2350 child_layer_->SetIsDrawable(true);
2351 child_layer_->SetBounds(gfx::Size(50, 50)); 2351 child_layer_->SetBounds(gfx::Size(50, 50));
2352 2352
2353 root_layer_->AddChild(parent_layer_); 2353 root_layer_->AddChild(parent_layer_);
2354 parent_layer_->AddChild(child_layer_); 2354 parent_layer_->AddChild(child_layer_);
2355 layer_tree_host()->SetRootLayer(root_layer_); 2355 layer_tree_host()->SetRootLayer(root_layer_);
2356 2356
2357 LayerTreeHostTest::SetupTree(); 2357 LayerTreeHostTest::SetupTree();
(...skipping 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after
6298 EndTest(); 6298 EndTest();
6299 } 6299 }
6300 6300
6301 void AfterTest() override {} 6301 void AfterTest() override {}
6302 }; 6302 };
6303 6303
6304 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); 6304 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
6305 6305
6306 } // namespace 6306 } // namespace
6307 } // namespace cc 6307 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698