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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Created 3 years, 7 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 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_test_common.h" 10 #include "cc/test/layer_test_common.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 public: 81 public:
82 void SetupTree() override { 82 void SetupTree() override {
83 scoped_refptr<Layer> root = Layer::Create(); 83 scoped_refptr<Layer> root = Layer::Create();
84 root->SetBounds(gfx::Size(100, 100)); 84 root->SetBounds(gfx::Size(100, 100));
85 root->SetIsDrawable(true); 85 root->SetIsDrawable(true);
86 86
87 child_ = Layer::Create(); 87 child_ = Layer::Create();
88 child_->SetBounds(gfx::Size(1, 1)); 88 child_->SetBounds(gfx::Size(1, 1));
89 child_->SetPosition(gfx::PointF(10.f, 5.5f)); 89 child_->SetPosition(gfx::PointF(10.f, 5.5f));
90 child_->SetIsDrawable(true); 90 child_->SetIsDrawable(true);
91 child_->SetForceRenderSurfaceForTesting(true); 91 child_->SetForceRenderSurface(true);
92 root->AddChild(child_); 92 root->AddChild(child_);
93 93
94 scoped_refptr<Layer> child2 = Layer::Create(); 94 scoped_refptr<Layer> child2 = Layer::Create();
95 child2->SetBounds(gfx::Size(10, 12)); 95 child2->SetBounds(gfx::Size(10, 12));
96 child2->SetPosition(gfx::PointF(13.f, 8.5f)); 96 child2->SetPosition(gfx::PointF(13.f, 8.5f));
97 child2->SetContentsOpaque(true); 97 child2->SetContentsOpaque(true);
98 child2->SetIsDrawable(true); 98 child2->SetIsDrawable(true);
99 root->AddChild(child2); 99 root->AddChild(child2);
100 100
101 layer_tree_host()->SetRootLayer(root); 101 layer_tree_host()->SetRootLayer(root);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 private: 263 private:
264 FakeContentLayerClient client_; 264 FakeContentLayerClient client_;
265 scoped_refptr<Layer> child_; 265 scoped_refptr<Layer> child_;
266 }; 266 };
267 267
268 SINGLE_AND_MULTI_THREAD_TEST_F( 268 SINGLE_AND_MULTI_THREAD_TEST_F(
269 LayerTreeHostOcclusionTestDrawPropertiesOnScaledMask); 269 LayerTreeHostOcclusionTestDrawPropertiesOnScaledMask);
270 270
271 } // namespace 271 } // namespace
272 } // namespace cc 272 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698