| 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 "CCOcclusionTracker.h" | 7 #include "CCOcclusionTracker.h" |
| 8 | 8 |
| 9 #include "CCAnimationTestCommon.h" | 9 #include "CCAnimationTestCommon.h" |
| 10 #include "CCGeometryTestUtils.h" | 10 #include "CCGeometryTestUtils.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 return layer; | 185 return layer; |
| 186 } | 186 } |
| 187 | 187 |
| 188 typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerTy
pe* parent, const WebTransformationMatrix& transform, const FloatPoint& position
, const IntSize& bounds, bool opaque) | 188 typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerTy
pe* parent, const WebTransformationMatrix& transform, const FloatPoint& position
, const IntSize& bounds, bool opaque) |
| 189 { | 189 { |
| 190 typename Types::ContentLayerPtrType layer(Types::createContentLayer()); | 190 typename Types::ContentLayerPtrType layer(Types::createContentLayer()); |
| 191 typename Types::ContentLayerType* layerPtr = layer.get(); | 191 typename Types::ContentLayerType* layerPtr = layer.get(); |
| 192 setProperties(layerPtr, transform, position, bounds); | 192 setProperties(layerPtr, transform, position, bounds); |
| 193 | 193 |
| 194 if (opaqueLayers) | 194 if (opaqueLayers) |
| 195 layerPtr->setOpaque(opaque); | 195 layerPtr->setContentsOpaque(opaque); |
| 196 else { | 196 else { |
| 197 layerPtr->setOpaque(false); | 197 layerPtr->setContentsOpaque(false); |
| 198 if (opaque) | 198 if (opaque) |
| 199 layerPtr->setOpaqueContentsRect(IntRect(IntPoint(), bounds)); | 199 layerPtr->setOpaqueContentsRect(IntRect(IntPoint(), bounds)); |
| 200 else | 200 else |
| 201 layerPtr->setOpaqueContentsRect(IntRect()); | 201 layerPtr->setOpaqueContentsRect(IntRect()); |
| 202 } | 202 } |
| 203 | 203 |
| 204 parent->addChild(layer.release()); | 204 parent->addChild(layer.release()); |
| 205 return layerPtr; | 205 return layerPtr; |
| 206 } | 206 } |
| 207 | 207 |
| (...skipping 2798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3006 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS
creenSpace().bounds()); | 3006 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS
creenSpace().bounds()); |
| 3007 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); | 3007 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); |
| 3008 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT
argetSurface().bounds()); | 3008 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT
argetSurface().bounds()); |
| 3009 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); | 3009 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); |
| 3010 } | 3010 } |
| 3011 }; | 3011 }; |
| 3012 | 3012 |
| 3013 ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestMinimumTrackingSize); | 3013 ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestMinimumTrackingSize); |
| 3014 | 3014 |
| 3015 } // namespace | 3015 } // namespace |
| OLD | NEW |