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

Side by Side Diff: cc/occlusion_tracker_unittest.cc

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/occlusion_tracker.h" 7 #include "cc/occlusion_tracker.h"
8 8
9 #include "Region.h" 9 #include "Region.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 352
353 void setProperties(Layer* layer, const WebTransformationMatrix& transform, c onst FloatPoint& position, const IntSize& bounds) 353 void setProperties(Layer* layer, const WebTransformationMatrix& transform, c onst FloatPoint& position, const IntSize& bounds)
354 { 354 {
355 setBaseProperties(layer, transform, position, bounds); 355 setBaseProperties(layer, transform, position, bounds);
356 } 356 }
357 357
358 void setProperties(LayerImpl* layer, const WebTransformationMatrix& transfor m, const FloatPoint& position, const IntSize& bounds) 358 void setProperties(LayerImpl* layer, const WebTransformationMatrix& transfor m, const FloatPoint& position, const IntSize& bounds)
359 { 359 {
360 setBaseProperties(layer, transform, position, bounds); 360 setBaseProperties(layer, transform, position, bounds);
361
362 layer->setContentBounds(layer->bounds());
363 } 361 }
364 362
365 void setReplica(Layer* owningLayer, scoped_refptr<Layer> layer) 363 void setReplica(Layer* owningLayer, scoped_refptr<Layer> layer)
366 { 364 {
367 owningLayer->setReplicaLayer(layer.get()); 365 owningLayer->setReplicaLayer(layer.get());
368 m_replicaLayers.push_back(layer); 366 m_replicaLayers.push_back(layer);
369 } 367 }
370 368
371 void setReplica(LayerImpl* owningLayer, scoped_ptr<LayerImpl> layer) 369 void setReplica(LayerImpl* owningLayer, scoped_ptr<LayerImpl> layer)
372 { 370 {
(...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS creenSpace().bounds()); 3076 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS creenSpace().bounds());
3079 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); 3077 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
3080 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT argetSurface().bounds()); 3078 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT argetSurface().bounds());
3081 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); 3079 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
3082 } 3080 }
3083 }; 3081 };
3084 3082
3085 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); 3083 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize);
3086 3084
3087 } // namespace 3085 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698