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

Side by Side Diff: cc/trees/layer_tree_host_unittest_occlusion.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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_copyrequest.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_tree_test.h" 10 #include "cc/test/layer_tree_test.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 public: 80 public:
81 void SetupTree() override { 81 void SetupTree() override {
82 scoped_refptr<Layer> root = Layer::Create(); 82 scoped_refptr<Layer> root = Layer::Create();
83 root->SetBounds(gfx::Size(100, 100)); 83 root->SetBounds(gfx::Size(100, 100));
84 root->SetIsDrawable(true); 84 root->SetIsDrawable(true);
85 85
86 child_ = Layer::Create(); 86 child_ = Layer::Create();
87 child_->SetBounds(gfx::Size(1, 1)); 87 child_->SetBounds(gfx::Size(1, 1));
88 child_->SetPosition(gfx::PointF(10.f, 5.5f)); 88 child_->SetPosition(gfx::PointF(10.f, 5.5f));
89 child_->SetIsDrawable(true); 89 child_->SetIsDrawable(true);
90 child_->SetForceRenderSurface(true); 90 child_->SetForceRenderSurfaceForTesting(true);
91 root->AddChild(child_); 91 root->AddChild(child_);
92 92
93 scoped_refptr<Layer> child2 = Layer::Create(); 93 scoped_refptr<Layer> child2 = Layer::Create();
94 child2->SetBounds(gfx::Size(10, 12)); 94 child2->SetBounds(gfx::Size(10, 12));
95 child2->SetPosition(gfx::PointF(13.f, 8.5f)); 95 child2->SetPosition(gfx::PointF(13.f, 8.5f));
96 child2->SetContentsOpaque(true); 96 child2->SetContentsOpaque(true);
97 child2->SetIsDrawable(true); 97 child2->SetIsDrawable(true);
98 root->AddChild(child2); 98 root->AddChild(child2);
99 99
100 layer_tree_host()->SetRootLayer(root); 100 layer_tree_host()->SetRootLayer(root);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 public: 276 public:
277 void SetupTree() override { 277 void SetupTree() override {
278 scoped_refptr<Layer> root = Layer::Create(); 278 scoped_refptr<Layer> root = Layer::Create();
279 root->SetBounds(gfx::Size(100, 100)); 279 root->SetBounds(gfx::Size(100, 100));
280 root->SetIsDrawable(true); 280 root->SetIsDrawable(true);
281 281
282 child_ = Layer::Create(); 282 child_ = Layer::Create();
283 child_->SetBounds(gfx::Size(1, 1)); 283 child_->SetBounds(gfx::Size(1, 1));
284 child_->SetPosition(gfx::PointF(10.f, 5.5f)); 284 child_->SetPosition(gfx::PointF(10.f, 5.5f));
285 child_->SetIsDrawable(true); 285 child_->SetIsDrawable(true);
286 child_->SetForceRenderSurface(true); 286 child_->SetForceRenderSurfaceForTesting(true);
287 root->AddChild(child_); 287 root->AddChild(child_);
288 288
289 scoped_refptr<Layer> replica = Layer::Create(); 289 scoped_refptr<Layer> replica = Layer::Create();
290 gfx::Transform translate; 290 gfx::Transform translate;
291 translate.Translate(20.f, 4.f); 291 translate.Translate(20.f, 4.f);
292 replica->SetTransform(translate); 292 replica->SetTransform(translate);
293 child_->SetReplicaLayer(replica.get()); 293 child_->SetReplicaLayer(replica.get());
294 294
295 scoped_refptr<Layer> mask = PictureLayer::Create(&client_); 295 scoped_refptr<Layer> mask = PictureLayer::Create(&client_);
296 mask->SetBounds(gfx::Size(30, 40)); 296 mask->SetBounds(gfx::Size(30, 40));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 private: 342 private:
343 FakeContentLayerClient client_; 343 FakeContentLayerClient client_;
344 scoped_refptr<Layer> child_; 344 scoped_refptr<Layer> child_;
345 }; 345 };
346 346
347 SINGLE_AND_MULTI_THREAD_TEST_F( 347 SINGLE_AND_MULTI_THREAD_TEST_F(
348 LayerTreeHostOcclusionTestDrawPropertiesInsideReplica); 348 LayerTreeHostOcclusionTestDrawPropertiesInsideReplica);
349 349
350 } // namespace 350 } // namespace
351 } // namespace cc 351 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_copyrequest.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698