OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |