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

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

Issue 1850493002: cc : Remove parent for mask and replica layers in LayerImpl (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_common_unittest.cc ('k') | no next file » | 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/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 void SetProperties(LayerImpl* layer, 291 void SetProperties(LayerImpl* layer,
292 const gfx::Transform& transform, 292 const gfx::Transform& transform,
293 const gfx::PointF& position, 293 const gfx::PointF& position,
294 const gfx::Size& bounds) { 294 const gfx::Size& bounds) {
295 layer->SetTransform(transform); 295 layer->SetTransform(transform);
296 layer->SetPosition(position); 296 layer->SetPosition(position);
297 layer->SetBounds(bounds); 297 layer->SetBounds(bounds);
298 } 298 }
299 299
300 void SetReplica(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) { 300 void SetReplica(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) {
301 // We need to set parent on replica layer for property tree building.
302 layer->SetParent(owning_layer);
301 owning_layer->SetReplicaLayer(std::move(layer)); 303 owning_layer->SetReplicaLayer(std::move(layer));
302 } 304 }
303 305
304 void SetMask(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) { 306 void SetMask(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) {
305 owning_layer->SetMaskLayer(std::move(layer)); 307 owning_layer->SetMaskLayer(std::move(layer));
306 } 308 }
307 309
308 bool opaque_layers_; 310 bool opaque_layers_;
309 FakeLayerTreeHostClient client_; 311 FakeLayerTreeHostClient client_;
310 TestTaskGraphRunner task_graph_runner_; 312 TestTaskGraphRunner task_graph_runner_;
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 EXPECT_EQ(gfx::Rect(), 2513 EXPECT_EQ(gfx::Rect(),
2512 occlusion.UnoccludedSurfaceContentRect( 2514 occlusion.UnoccludedSurfaceContentRect(
2513 surface, gfx::Rect(80, 70, 50, 50))); 2515 surface, gfx::Rect(80, 70, 50, 50)));
2514 } 2516 }
2515 }; 2517 };
2516 2518
2517 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2519 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2518 2520
2519 } // namespace 2521 } // namespace
2520 } // namespace cc 2522 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698