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

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

Issue 2254543004: cc : Delete LayerImpl::transform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use test properties transform 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
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/property_tree_builder.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/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/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 void SetRootLayerOnMainThread(Layer* root) { 286 void SetRootLayerOnMainThread(Layer* root) {
287 host_->SetRootLayer(scoped_refptr<Layer>(root)); 287 host_->SetRootLayer(scoped_refptr<Layer>(root));
288 } 288 }
289 289
290 void SetRootLayerOnMainThread(LayerImpl* root) {} 290 void SetRootLayerOnMainThread(LayerImpl* root) {}
291 291
292 void SetProperties(LayerImpl* layer, 292 void SetProperties(LayerImpl* layer,
293 const gfx::Transform& transform, 293 const gfx::Transform& transform,
294 const gfx::PointF& position, 294 const gfx::PointF& position,
295 const gfx::Size& bounds) { 295 const gfx::Size& bounds) {
296 layer->SetTransform(transform); 296 layer->test_properties()->transform = transform;
297 layer->SetPosition(position); 297 layer->SetPosition(position);
298 layer->SetBounds(bounds); 298 layer->SetBounds(bounds);
299 } 299 }
300 300
301 void SetReplica(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) { 301 void SetReplica(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) {
302 // We need to set parent on replica layer for property tree building. 302 // We need to set parent on replica layer for property tree building.
303 layer->test_properties()->parent = owning_layer; 303 layer->test_properties()->parent = owning_layer;
304 owning_layer->test_properties()->SetReplicaLayer(std::move(layer)); 304 owning_layer->test_properties()->SetReplicaLayer(std::move(layer));
305 } 305 }
306 306
(...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 EXPECT_EQ(gfx::Rect(), 2627 EXPECT_EQ(gfx::Rect(),
2628 occlusion.UnoccludedSurfaceContentRect( 2628 occlusion.UnoccludedSurfaceContentRect(
2629 surface, gfx::Rect(80, 70, 50, 50))); 2629 surface, gfx::Rect(80, 70, 50, 50)));
2630 } 2630 }
2631 }; 2631 };
2632 2632
2633 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2633 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2634 2634
2635 } // namespace 2635 } // namespace
2636 } // namespace cc 2636 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698