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

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

Issue 1180073015: cc: Remove LayerImpl::SetContentBounds() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-setcontentbounds: . Created 5 years, 6 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/occlusion_tracker_perftest.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 "cc/animation/layer_animation_controller.h" 7 #include "cc/animation/layer_animation_controller.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 const gfx::Transform identity_matrix; 281 const gfx::Transform identity_matrix;
282 282
283 private: 283 private:
284 void SetRootLayerOnMainThread(Layer* root) { 284 void SetRootLayerOnMainThread(Layer* root) {
285 host_->SetRootLayer(scoped_refptr<Layer>(root)); 285 host_->SetRootLayer(scoped_refptr<Layer>(root));
286 } 286 }
287 287
288 void SetRootLayerOnMainThread(LayerImpl* root) {} 288 void SetRootLayerOnMainThread(LayerImpl* root) {}
289 289
290 void SetBaseProperties(LayerImpl* layer, 290 void SetProperties(LayerImpl* layer,
291 const gfx::Transform& transform, 291 const gfx::Transform& transform,
292 const gfx::PointF& position, 292 const gfx::PointF& position,
293 const gfx::Size& bounds) { 293 const gfx::Size& bounds) {
294 layer->SetTransform(transform); 294 layer->SetTransform(transform);
295 layer->SetPosition(position); 295 layer->SetPosition(position);
296 layer->SetBounds(bounds); 296 layer->SetBounds(bounds);
297 } 297 }
298 298
299 void SetProperties(LayerImpl* layer,
300 const gfx::Transform& transform,
301 const gfx::PointF& position,
302 const gfx::Size& bounds) {
303 SetBaseProperties(layer, transform, position, bounds);
304
305 layer->SetContentBounds(layer->bounds());
306 }
307
308 void SetReplica(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) { 299 void SetReplica(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) {
309 owning_layer->SetReplicaLayer(layer.Pass()); 300 owning_layer->SetReplicaLayer(layer.Pass());
310 } 301 }
311 302
312 void SetMask(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) { 303 void SetMask(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) {
313 owning_layer->SetMaskLayer(layer.Pass()); 304 owning_layer->SetMaskLayer(layer.Pass());
314 } 305 }
315 306
316 bool opaque_layers_; 307 bool opaque_layers_;
317 FakeLayerTreeHostClient client_; 308 FakeLayerTreeHostClient client_;
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 EXPECT_EQ(gfx::Rect(), 2510 EXPECT_EQ(gfx::Rect(),
2520 occlusion.UnoccludedSurfaceContentRect( 2511 occlusion.UnoccludedSurfaceContentRect(
2521 surface, gfx::Rect(80, 70, 50, 50))); 2512 surface, gfx::Rect(80, 70, 50, 50)));
2522 } 2513 }
2523 }; 2514 };
2524 2515
2525 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2516 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2526 2517
2527 } // namespace 2518 } // namespace
2528 } // namespace cc 2519 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/occlusion_tracker_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698