Index: cc/occlusion_tracker_unittest.cc |
diff --git a/cc/occlusion_tracker_unittest.cc b/cc/occlusion_tracker_unittest.cc |
index 71dee9c12e31e75567290ee72b7424d6fb86d9f2..60aa8e6e6876ef3f58ac074befd113252f6edcba 100644 |
--- a/cc/occlusion_tracker_unittest.cc |
+++ b/cc/occlusion_tracker_unittest.cc |
@@ -41,7 +41,7 @@ public: |
virtual Region visibleContentOpaqueRegion() const OVERRIDE |
{ |
if (m_overrideOpaqueContentsRect) |
- return cc::IntRect(gfx::IntersectRects(m_opaqueContentsRect, visibleContentRect())); |
+ return gfx::IntersectRects(m_opaqueContentsRect, visibleContentRect()); |
return Layer::visibleContentOpaqueRegion(); |
} |
void setOpaqueContentsRect(const gfx::Rect& opaqueContentsRect) |
@@ -71,7 +71,7 @@ public: |
virtual Region visibleContentOpaqueRegion() const OVERRIDE |
{ |
if (m_overrideOpaqueContentsRect) |
- return cc::IntRect(gfx::IntersectRects(m_opaqueContentsRect, visibleContentRect())); |
+ return gfx::IntersectRects(m_opaqueContentsRect, visibleContentRect()); |
return LayerImpl::visibleContentOpaqueRegion(); |
} |
void setOpaqueContentsRect(const gfx::Rect& opaqueContentsRect) |
@@ -200,7 +200,7 @@ protected: |
LayerTreeHost::setNeedsFilterContext(false); |
} |
- typename Types::ContentLayerType* createRoot(const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ typename Types::ContentLayerType* createRoot(const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
typename Types::ContentLayerPtrType layer(Types::createContentLayer()); |
typename Types::ContentLayerType* layerPtr = layer.get(); |
@@ -211,7 +211,7 @@ protected: |
return layerPtr; |
} |
- typename Types::LayerType* createLayer(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ typename Types::LayerType* createLayer(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
typename Types::LayerPtrType layer(Types::createLayer()); |
typename Types::LayerType* layerPtr = layer.get(); |
@@ -220,7 +220,7 @@ protected: |
return layerPtr; |
} |
- typename Types::LayerType* createSurface(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ typename Types::LayerType* createSurface(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
typename Types::LayerType* layer = createLayer(parent, transform, position, bounds); |
WebFilterOperations filters; |
@@ -229,7 +229,7 @@ protected: |
return layer; |
} |
- typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds, bool opaque) |
+ typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds, bool opaque) |
{ |
typename Types::ContentLayerPtrType layer(Types::createContentLayer()); |
typename Types::ContentLayerType* layerPtr = layer.get(); |
@@ -249,7 +249,7 @@ protected: |
return layerPtr; |
} |
- typename Types::LayerType* createReplicaLayer(typename Types::LayerType* owningLayer, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ typename Types::LayerType* createReplicaLayer(typename Types::LayerType* owningLayer, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
typename Types::ContentLayerPtrType layer(Types::createContentLayer()); |
typename Types::ContentLayerType* layerPtr = layer.get(); |
@@ -262,12 +262,12 @@ protected: |
{ |
typename Types::ContentLayerPtrType layer(Types::createContentLayer()); |
typename Types::ContentLayerType* layerPtr = layer.get(); |
- setProperties(layerPtr, identityMatrix, FloatPoint(), bounds); |
+ setProperties(layerPtr, identityMatrix, gfx::PointF(), bounds); |
setMask(owningLayer, Types::passLayerPtr(layer)); |
return layerPtr; |
} |
- typename Types::ContentLayerType* createDrawingSurface(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds, bool opaque) |
+ typename Types::ContentLayerType* createDrawingSurface(typename Types::LayerType* parent, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds, bool opaque) |
{ |
typename Types::ContentLayerType* layer = createDrawingLayer(parent, transform, position, bounds, opaque); |
WebFilterOperations filters; |
@@ -355,21 +355,21 @@ protected: |
const WebTransformationMatrix identityMatrix; |
private: |
- void setBaseProperties(typename Types::LayerType* layer, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ void setBaseProperties(typename Types::LayerType* layer, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
layer->setTransform(transform); |
layer->setSublayerTransform(WebTransformationMatrix()); |
- layer->setAnchorPoint(FloatPoint(0, 0)); |
+ layer->setAnchorPoint(gfx::PointF(0, 0)); |
layer->setPosition(position); |
layer->setBounds(bounds); |
} |
- void setProperties(Layer* layer, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ void setProperties(Layer* layer, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
setBaseProperties(layer, transform, position, bounds); |
} |
- void setProperties(LayerImpl* layer, const WebTransformationMatrix& transform, const FloatPoint& position, const gfx::Size& bounds) |
+ void setProperties(LayerImpl* layer, const WebTransformationMatrix& transform, const gfx::PointF& position, const gfx::Size& bounds) |
{ |
setBaseProperties(layer, transform, position, bounds); |
@@ -459,8 +459,8 @@ protected: |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(30, 30), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(30, 30), gfx::Size(500, 500), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -511,9 +511,9 @@ protected: |
WebTransformationMatrix layerTransform; |
layerTransform.translate(10, 10); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100)); |
- typename Types::ContentLayerType* layer1 = this->createDrawingLayer(parent, layerTransform, FloatPoint(0, 0), IntSize(90, 90), true); |
- typename Types::ContentLayerType* layer2 = this->createDrawingLayer(layer1, layerTransform, FloatPoint(0, 0), IntSize(50, 50), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::Point(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(parent, layerTransform, gfx::PointF(0, 0), gfx::Size(90, 90), true); |
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(layer1, layerTransform, gfx::PointF(0, 0), gfx::Size(50, 50), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -555,8 +555,8 @@ protected: |
layerTransform.rotate(90); |
layerTransform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, layerTransform, gfx::PointF(30, 30), gfx::Size(500, 500), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -607,8 +607,8 @@ protected: |
WebTransformationMatrix layerTransform; |
layerTransform.translate(20, 20); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, layerTransform, gfx::PointF(30, 30), gfx::Size(500, 500), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -673,11 +673,11 @@ protected: |
childTransform.rotate(90); |
childTransform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), gfx::Size(500, 500)); |
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, gfx::PointF(30, 30), gfx::Size(500, 500)); |
child->setMasksToBounds(true); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, gfx::PointF(10, 10), gfx::Size(500, 500), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -750,17 +750,17 @@ protected: |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200)); |
WebTransformationMatrix layer1Matrix; |
layer1Matrix.scale(2); |
- typename Types::ContentLayerType* layer1 = this->createDrawingLayer(parent, layer1Matrix, FloatPoint(0, 0), IntSize(100, 100), true); |
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(parent, layer1Matrix, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
layer1->setForceRenderSurface(true); |
WebTransformationMatrix layer2Matrix; |
layer2Matrix.translate(25, 25); |
- typename Types::ContentLayerType* layer2 = this->createDrawingLayer(layer1, layer2Matrix, FloatPoint(0, 0), IntSize(50, 50), true); |
- typename Types::ContentLayerType* occluder = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 100), IntSize(500, 500), true); |
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(layer1, layer2Matrix, gfx::PointF(0, 0), gfx::Size(50, 50), true); |
+ typename Types::ContentLayerType* occluder = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(100, 100), gfx::Size(500, 500), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -770,7 +770,7 @@ protected: |
EXPECT_RECT_EQ(gfx::Rect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds()); |
EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size()); |
EXPECT_RECT_EQ(gfx::Rect(0, 0, 25, 25), occlusion.unoccludedLayerContentRect(layer2, gfx::Rect(0, 0, 25, 25))); |
@@ -793,14 +793,14 @@ protected: |
childTransform.rotate(90); |
childTransform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), gfx::Size(500, 500)); |
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, gfx::PointF(30, 30), gfx::Size(500, 500)); |
child->setMasksToBounds(true); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, gfx::PointF(10, 10), gfx::Size(500, 500), true); |
// |child2| makes |parent|'s surface get considered by OcclusionTracker first, instead of |child|'s. This exercises different code in |
// leaveToTargetRenderSurface, as the target surface has already been seen. |
- typename Types::ContentLayerType* child2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(30, 30), gfx::Size(60, 20), true); |
+ typename Types::ContentLayerType* child2 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(30, 30), gfx::Size(60, 20), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -909,10 +909,10 @@ protected: |
WebTransformationMatrix layerTransform; |
layerTransform.translate(10, 10); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
- typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), gfx::Size(500, 500)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, gfx::PointF(30, 30), gfx::Size(500, 500)); |
child->setMasksToBounds(true); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(child, layerTransform, FloatPoint(0, 0), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(child, layerTransform, gfx::PointF(0, 0), gfx::Size(500, 500), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -973,12 +973,12 @@ protected: |
childTransform.rotate(90); |
childTransform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), gfx::Size(500, 500)); |
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, gfx::PointF(30, 30), gfx::Size(500, 500)); |
child->setMasksToBounds(true); |
- typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), gfx::Size(500, 500), true); |
- typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 450), gfx::Size(500, 60), true); |
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child, this->identityMatrix, gfx::PointF(10, 10), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child, this->identityMatrix, gfx::PointF(10, 450), gfx::Size(500, 60), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1063,12 +1063,12 @@ protected: |
childTransform.rotate(90); |
childTransform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* child1 = this->createSurface(parent, childTransform, FloatPoint(30, 30), gfx::Size(10, 10)); |
- typename Types::LayerType* child2 = this->createSurface(parent, childTransform, FloatPoint(20, 40), gfx::Size(10, 10)); |
- typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, FloatPoint(-10, -10), gfx::Size(510, 510), true); |
- typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child2, this->identityMatrix, FloatPoint(-10, -10), gfx::Size(510, 510), true); |
+ typename Types::LayerType* child1 = this->createSurface(parent, childTransform, gfx::PointF(30, 30), gfx::Size(10, 10)); |
+ typename Types::LayerType* child2 = this->createSurface(parent, childTransform, gfx::PointF(20, 40), gfx::Size(10, 10)); |
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, gfx::PointF(-10, -10), gfx::Size(510, 510), true); |
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child2, this->identityMatrix, gfx::PointF(-10, -10), gfx::Size(510, 510), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1179,12 +1179,12 @@ protected: |
child2Transform.rotate(90); |
child2Transform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* child1 = this->createSurface(parent, child1Transform, FloatPoint(30, 20), gfx::Size(10, 10)); |
- typename Types::LayerType* child2 = this->createDrawingSurface(parent, child2Transform, FloatPoint(20, 40), gfx::Size(10, 10), false); |
- typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, FloatPoint(-10, -20), gfx::Size(510, 510), true); |
- typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child2, this->identityMatrix, FloatPoint(-10, -10), gfx::Size(510, 510), true); |
+ typename Types::LayerType* child1 = this->createSurface(parent, child1Transform, gfx::PointF(30, 20), gfx::Size(10, 10)); |
+ typename Types::LayerType* child2 = this->createDrawingSurface(parent, child2Transform, gfx::PointF(20, 40), gfx::Size(10, 10), false); |
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, gfx::PointF(-10, -20), gfx::Size(510, 510), true); |
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child2, this->identityMatrix, gfx::PointF(-10, -10), gfx::Size(510, 510), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1283,11 +1283,11 @@ protected: |
layerTransform.rotate(90); |
layerTransform.translate(-250, -250); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::ContentLayerType* blurLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), gfx::Size(500, 500), true); |
- typename Types::ContentLayerType* opaqueLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), gfx::Size(500, 500), true); |
- typename Types::ContentLayerType* opacityLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* blurLayer = this->createDrawingLayer(parent, layerTransform, gfx::PointF(30, 30), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* opaqueLayer = this->createDrawingLayer(parent, layerTransform, gfx::PointF(30, 30), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* opacityLayer = this->createDrawingLayer(parent, layerTransform, gfx::PointF(30, 30), gfx::Size(500, 500), true); |
WebFilterOperations filters; |
filters.append(WebFilterOperation::createBlurFilter(10)); |
@@ -1310,13 +1310,13 @@ protected: |
this->visitLayer(opacityLayer, occlusion); |
this->enterContributingSurface(opacityLayer, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().IsEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
// And has nothing to contribute to its parent surface. |
this->leaveContributingSurface(opacityLayer, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().IsEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
// Opaque layer will contribute to occlusion. |
this->visitLayer(opaqueLayer, occlusion); |
@@ -1336,14 +1336,14 @@ protected: |
// The blur layer needs to throw away any occlusion from outside its subtree. |
this->enterLayer(blurLayer, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().IsEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
// And it won't contribute to occlusion. |
this->leaveLayer(blurLayer, occlusion); |
this->enterContributingSurface(blurLayer, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().IsEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
// But the opaque layer's occlusion is preserved on the parent. |
this->leaveContributingSurface(blurLayer, occlusion); |
@@ -1363,9 +1363,9 @@ protected: |
OcclusionTrackerTestReplicaDoesOcclude(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(50, 50), true); |
- this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(50, 50), gfx::Size()); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(50, 50), true); |
+ this->createReplicaLayer(surface, this->identityMatrix, gfx::PointF(50, 50), gfx::Size()); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1395,10 +1395,10 @@ protected: |
OcclusionTrackerTestReplicaWithClipping(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 170)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 170)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(50, 50), true); |
- this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(50, 50), gfx::Size()); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(50, 50), true); |
+ this->createReplicaLayer(surface, this->identityMatrix, gfx::PointF(50, 50), gfx::Size()); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1428,9 +1428,9 @@ protected: |
OcclusionTrackerTestReplicaWithMask(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(50, 50), true); |
- typename Types::LayerType* replica = this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(50, 50), gfx::Size()); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(50, 50), true); |
+ typename Types::LayerType* replica = this->createReplicaLayer(surface, this->identityMatrix, gfx::PointF(50, 50), gfx::Size()); |
this->createMaskLayer(replica, gfx::Size(10, 10)); |
this->calcDrawEtc(parent); |
@@ -1461,8 +1461,8 @@ protected: |
OcclusionTrackerTestLayerClipRectOutsideChild(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1506,8 +1506,8 @@ protected: |
OcclusionTrackerTestViewportRectOutsideChild(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(200, 100, 100, 100)); |
@@ -1551,8 +1551,8 @@ protected: |
OcclusionTrackerTestLayerClipRectOverChild(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1591,8 +1591,8 @@ protected: |
OcclusionTrackerTestViewportRectOverChild(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(100, 100, 100, 100)); |
@@ -1631,8 +1631,8 @@ protected: |
OcclusionTrackerTestLayerClipRectPartlyOverChild(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1675,8 +1675,8 @@ protected: |
OcclusionTrackerTestViewportRectPartlyOverChild(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(50, 50, 200, 200)); |
@@ -1719,8 +1719,8 @@ protected: |
OcclusionTrackerTestLayerClipRectOverNothing(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1763,8 +1763,8 @@ protected: |
OcclusionTrackerTestViewportRectOverNothing(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(500, 500, 100, 100)); |
@@ -1807,8 +1807,8 @@ protected: |
OcclusionTrackerTestLayerClipRectForLayerOffOrigin(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1832,8 +1832,8 @@ protected: |
OcclusionTrackerTestOpaqueContentsRegionEmpty(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 200), false); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 200), false); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1856,7 +1856,7 @@ protected: |
this->visitContributingSurface(layer, occlusion); |
this->enterLayer(parent, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().bounds().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().bounds().IsEmpty()); |
EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size()); |
} |
}; |
@@ -1869,8 +1869,8 @@ protected: |
OcclusionTrackerTestOpaqueContentsRegionNonEmpty(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 100), gfx::Size(200, 200), false); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(100, 100), gfx::Size(200, 200), false); |
this->calcDrawEtc(parent); |
{ |
@@ -1934,9 +1934,9 @@ protected: |
WebTransformationMatrix transform; |
transform.rotate3d(0, 30, 0); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, FloatPoint(100, 100), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, gfx::PointF(100, 100), gfx::Size(200, 200), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -1967,21 +1967,21 @@ protected: |
WebTransformationMatrix translationToBack; |
translationToFront.translate3d(0, 0, -100); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* child1 = this->createDrawingLayer(parent, translationToBack, FloatPoint(0, 0), gfx::Size(100, 100), true); |
- typename Types::ContentLayerType* child2 = this->createDrawingLayer(parent, translationToFront, FloatPoint(50, 50), gfx::Size(100, 100), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* child1 = this->createDrawingLayer(parent, translationToBack, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
+ typename Types::ContentLayerType* child2 = this->createDrawingLayer(parent, translationToFront, gfx::PointF(50, 50), gfx::Size(100, 100), true); |
parent->setPreserves3D(true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
this->visitLayer(child2, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().IsEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
this->visitLayer(child1, occlusion); |
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty()); |
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().IsEmpty()); |
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().IsEmpty()); |
} |
}; |
@@ -2000,9 +2000,9 @@ protected: |
transform.rotate3d(1, 0, 0, -30); |
transform.translate(-150, -150); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, FloatPoint(100, 100), gfx::Size(200, 200), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, gfx::PointF(100, 100), gfx::Size(200, 200), true); |
container->setPreserves3D(true); |
layer->setPreserves3D(true); |
this->calcDrawEtc(parent); |
@@ -2032,9 +2032,9 @@ protected: |
transform.rotate3d(1, 0, 0, -167); |
transform.translate(-250, -50); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(500, 100)); |
- typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(500, 500)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, FloatPoint(0, 0), gfx::Size(500, 500), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(500, 100)); |
+ typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(500, 500)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, gfx::PointF(0, 0), gfx::Size(500, 500), true); |
container->setPreserves3D(true); |
layer->setPreserves3D(true); |
this->calcDrawEtc(parent); |
@@ -2063,8 +2063,8 @@ protected: |
transform.translate3d(0, 0, 110); |
transform.translate(-50, -50); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, FloatPoint(0, 0), gfx::Size(100, 100), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
parent->setPreserves3D(true); |
layer->setPreserves3D(true); |
this->calcDrawEtc(parent); |
@@ -2094,9 +2094,9 @@ protected: |
transform.translate3d(0, 0, 99); |
transform.translate(-50, -50); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100)); |
parent->setMasksToBounds(true); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, FloatPoint(0, 0), gfx::Size(100, 100), true); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
parent->setPreserves3D(true); |
layer->setPreserves3D(true); |
this->calcDrawEtc(parent); |
@@ -2123,13 +2123,13 @@ protected: |
OcclusionTrackerTestAnimationOpacity1OnMainThread(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), true); |
- typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), true); |
- typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 300), true); |
- typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 300), true); |
- typename Types::ContentLayerType* parent2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), false); |
- typename Types::ContentLayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 0), gfx::Size(50, 300), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), true); |
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), true); |
+ typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 300), true); |
+ typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 300), true); |
+ typename Types::ContentLayerType* parent2 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), false); |
+ typename Types::ContentLayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(250, 0), gfx::Size(50, 300), true); |
addOpacityTransitionToController(*layer->layerAnimationController(), 10, 0, 1, false); |
addOpacityTransitionToController(*surface->layerAnimationController(), 10, 0, 1, false); |
@@ -2176,13 +2176,13 @@ protected: |
OcclusionTrackerTestAnimationOpacity0OnMainThread(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), true); |
- typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), true); |
- typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 300), true); |
- typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 300), true); |
- typename Types::ContentLayerType* parent2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), false); |
- typename Types::ContentLayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 0), gfx::Size(50, 300), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), true); |
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), true); |
+ typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 300), true); |
+ typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 300), true); |
+ typename Types::ContentLayerType* parent2 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), false); |
+ typename Types::ContentLayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(250, 0), gfx::Size(50, 300), true); |
addOpacityTransitionToController(*layer->layerAnimationController(), 10, 1, 0, false); |
addOpacityTransitionToController(*surface->layerAnimationController(), 10, 1, 0, false); |
@@ -2229,12 +2229,12 @@ protected: |
OcclusionTrackerTestAnimationTranslateOnMainThread(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
- typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), true); |
- typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300), true); |
- typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(200, 300), true); |
- typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 300), true); |
- typename Types::ContentLayerType* surface2 = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(50, 300), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), true); |
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300), true); |
+ typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(200, 300), true); |
+ typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 300), true); |
+ typename Types::ContentLayerType* surface2 = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(50, 300), true); |
addAnimatedTransformToController(*layer->layerAnimationController(), 10, 30, 0); |
addAnimatedTransformToController(*surface->layerAnimationController(), 10, 30, 0); |
@@ -2327,9 +2327,9 @@ protected: |
surfaceTransform.scale(2); |
surfaceTransform.translate(-150, -150); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(500, 500)); |
- typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, surfaceTransform, FloatPoint(0, 0), gfx::Size(300, 300), false); |
- typename Types::ContentLayerType* surface2 = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(50, 50), gfx::Size(300, 300), false); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(500, 500)); |
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, surfaceTransform, gfx::PointF(0, 0), gfx::Size(300, 300), false); |
+ typename Types::ContentLayerType* surface2 = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(50, 50), gfx::Size(300, 300), false); |
surface->setOpaqueContentsRect(gfx::Rect(0, 0, 200, 200)); |
surface2->setOpaqueContentsRect(gfx::Rect(0, 0, 200, 200)); |
this->calcDrawEtc(parent); |
@@ -2366,9 +2366,9 @@ protected: |
OcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 300)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
parent->setMasksToBounds(true); |
- typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(500, 300), false); |
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(500, 300), false); |
surface->setOpaqueContentsRect(gfx::Rect(0, 0, 400, 200)); |
this->calcDrawEtc(parent); |
@@ -2392,10 +2392,10 @@ protected: |
OcclusionTrackerTestReplicaOccluded(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100), true); |
- this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(0, 100), gfx::Size(100, 100)); |
- typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(100, 100), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
+ this->createReplicaLayer(surface, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(100, 100)); |
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(100, 100), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -2431,10 +2431,10 @@ protected: |
OcclusionTrackerTestSurfaceWithReplicaUnoccluded(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100), true); |
- this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(0, 100), gfx::Size(100, 100)); |
- typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 110), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
+ this->createReplicaLayer(surface, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(100, 100)); |
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 110), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -2471,11 +2471,11 @@ protected: |
OcclusionTrackerTestSurfaceAndReplicaOccludedDifferently(bool opaqueLayers) : OcclusionTrackerTest<Types>(opaqueLayers) {} |
void runMyTest() |
{ |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100), true); |
- this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(0, 100), gfx::Size(100, 100)); |
- typename Types::LayerType* overSurface = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(40, 100), true); |
- typename Types::LayerType* overReplica = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(50, 100), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
+ this->createReplicaLayer(surface, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(100, 100)); |
+ typename Types::LayerType* overSurface = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(40, 100), true); |
+ typename Types::LayerType* overReplica = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(50, 100), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -2515,10 +2515,10 @@ protected: |
{ |
// This test verifies that the surface cliprect does not end up empty and clip away the entire unoccluded rect. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100), true); |
- typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, FloatPoint(0, 10), gfx::Size(100, 50), true); |
- typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 50), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
+ typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, gfx::PointF(0, 10), gfx::Size(100, 50), true); |
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 50), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(-100, -100, 1000, 1000)); |
@@ -2574,8 +2574,8 @@ protected: |
{ |
// This test verifies that the top-most surface is considered occluded outside of its target's clipRect and outside the viewport rect. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 200)); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 300), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 200)); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 300), true); |
this->calcDrawEtc(parent); |
{ |
@@ -2614,11 +2614,11 @@ protected: |
{ |
// This test verifies that the surface cliprect does not end up empty and clip away the entire unoccluded rect. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(80, 200)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(80, 200)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100), true); |
- typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 100), false); |
- typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(100, 50), true); |
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100), true); |
+ typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 100), false); |
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(100, 50), true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
@@ -2670,14 +2670,14 @@ protected: |
// Make a surface and its replica, each 50x50, that are completely surrounded by opaque layers which are above them in the z-order. |
// The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface |
// appears at 50, 50 and the replica at 200, 50. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 150)); |
- typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), gfx::Size(100, 100), false); |
- this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), gfx::Size()); |
- typename Types::LayerType* occludingLayer1 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 50), true); |
- typename Types::LayerType* occludingLayer2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(300, 50), true); |
- typename Types::LayerType* occludingLayer3 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 50), gfx::Size(50, 50), true); |
- typename Types::LayerType* occludingLayer4 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 50), gfx::Size(100, 50), true); |
- typename Types::LayerType* occludingLayer5 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 50), gfx::Size(50, 50), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 150)); |
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, gfx::PointF(50, 50), gfx::Size(100, 100), false); |
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, gfx::PointF(300, 0), gfx::Size()); |
+ typename Types::LayerType* occludingLayer1 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 50), true); |
+ typename Types::LayerType* occludingLayer2 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(300, 50), true); |
+ typename Types::LayerType* occludingLayer3 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 50), gfx::Size(50, 50), true); |
+ typename Types::LayerType* occludingLayer4 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(100, 50), gfx::Size(100, 50), true); |
+ typename Types::LayerType* occludingLayer5 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(250, 50), gfx::Size(50, 50), true); |
// Filters make the layer own a surface. |
WebFilterOperations filters; |
@@ -2790,12 +2790,12 @@ protected: |
scaleByHalf.scale(0.5); |
// Makes two surfaces that completely cover |parent|. The occlusion both above and below the filters will be reduced by each of them. |
- typename Types::ContentLayerType* root = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(75, 75)); |
- typename Types::LayerType* parent = this->createSurface(root, scaleByHalf, FloatPoint(0, 0), gfx::Size(150, 150)); |
+ typename Types::ContentLayerType* root = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(75, 75)); |
+ typename Types::LayerType* parent = this->createSurface(root, scaleByHalf, gfx::PointF(0, 0), gfx::Size(150, 150)); |
parent->setMasksToBounds(true); |
- typename Types::LayerType* filteredSurface1 = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(0, 0), gfx::Size(300, 300), false); |
- typename Types::LayerType* filteredSurface2 = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(0, 0), gfx::Size(300, 300), false); |
- typename Types::LayerType* occludingLayerAbove = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 100), gfx::Size(50, 50), true); |
+ typename Types::LayerType* filteredSurface1 = this->createDrawingLayer(parent, scaleByHalf, gfx::PointF(0, 0), gfx::Size(300, 300), false); |
+ typename Types::LayerType* filteredSurface2 = this->createDrawingLayer(parent, scaleByHalf, gfx::PointF(0, 0), gfx::Size(300, 300), false); |
+ typename Types::LayerType* occludingLayerAbove = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(100, 100), gfx::Size(50, 50), true); |
// Filters make the layers own surfaces. |
WebFilterOperations filters; |
@@ -2844,18 +2844,18 @@ protected: |
void runMyTest() |
{ |
// Make a surface and its replica, each 50x50, that are completely surrounded by opaque layers which are above them in the z-order. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 150)); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 150)); |
// We stick the filtered surface inside a clipping surface so that we can make sure the clip is honored when exposing pixels for |
// the background filter. |
- typename Types::LayerType* clippingSurface = this->createSurface(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 70)); |
+ typename Types::LayerType* clippingSurface = this->createSurface(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 70)); |
clippingSurface->setMasksToBounds(true); |
- typename Types::LayerType* filteredSurface = this->createDrawingLayer(clippingSurface, this->identityMatrix, FloatPoint(50, 50), gfx::Size(50, 50), false); |
- this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(150, 0), gfx::Size()); |
- typename Types::LayerType* occludingLayer1 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 50), true); |
- typename Types::LayerType* occludingLayer2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), gfx::Size(300, 50), true); |
- typename Types::LayerType* occludingLayer3 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 50), gfx::Size(50, 50), true); |
- typename Types::LayerType* occludingLayer4 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 50), gfx::Size(100, 50), true); |
- typename Types::LayerType* occludingLayer5 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 50), gfx::Size(50, 50), true); |
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(clippingSurface, this->identityMatrix, gfx::PointF(50, 50), gfx::Size(50, 50), false); |
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, gfx::PointF(150, 0), gfx::Size()); |
+ typename Types::LayerType* occludingLayer1 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 50), true); |
+ typename Types::LayerType* occludingLayer2 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 100), gfx::Size(300, 50), true); |
+ typename Types::LayerType* occludingLayer3 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 50), gfx::Size(50, 50), true); |
+ typename Types::LayerType* occludingLayer4 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(100, 50), gfx::Size(100, 50), true); |
+ typename Types::LayerType* occludingLayer5 = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(250, 50), gfx::Size(50, 50), true); |
// Filters make the layer own a surface. This filter is large enough that it goes outside the bottom of the clippingSurface. |
WebFilterOperations filters; |
@@ -2971,11 +2971,11 @@ protected: |
// Make a surface and its replica, each 50x50, with a smaller 30x30 layer centered below each. |
// The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface |
// appears at 50, 50 and the replica at 200, 50. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 150)); |
- typename Types::LayerType* behindSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(60, 60), gfx::Size(30, 30), true); |
- typename Types::LayerType* behindReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(210, 60), gfx::Size(30, 30), true); |
- typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), gfx::Size(100, 100), false); |
- this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), gfx::Size()); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 150)); |
+ typename Types::LayerType* behindSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(60, 60), gfx::Size(30, 30), true); |
+ typename Types::LayerType* behindReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(210, 60), gfx::Size(30, 30), true); |
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, gfx::PointF(50, 50), gfx::Size(100, 100), false); |
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, gfx::PointF(300, 0), gfx::Size()); |
// Filters make the layer own a surface. |
WebFilterOperations filters; |
@@ -3021,11 +3021,11 @@ protected: |
// Make a surface and its replica, each 50x50, that are completely occluded by opaque layers which are above them in the z-order. |
// The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface |
// appears at 50, 50 and the replica at 200, 50. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 150)); |
- typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), gfx::Size(100, 100), false); |
- this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), gfx::Size()); |
- typename Types::LayerType* aboveSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(50, 50), gfx::Size(50, 50), true); |
- typename Types::LayerType* aboveReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(200, 50), gfx::Size(50, 50), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 150)); |
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, gfx::PointF(50, 50), gfx::Size(100, 100), false); |
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, gfx::PointF(300, 0), gfx::Size()); |
+ typename Types::LayerType* aboveSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(50, 50), gfx::Size(50, 50), true); |
+ typename Types::LayerType* aboveReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(200, 50), gfx::Size(50, 50), true); |
// Filters make the layer own a surface. |
WebFilterOperations filters; |
@@ -3070,13 +3070,13 @@ protected: |
// Make a surface and its replica, each 50x50, that are partially occluded by opaque layers which are above them in the z-order. |
// The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface |
// appears at 50, 50 and the replica at 200, 50. |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(300, 150)); |
- typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), gfx::Size(100, 100), false); |
- this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), gfx::Size()); |
- typename Types::LayerType* aboveSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(70, 50), gfx::Size(30, 50), true); |
- typename Types::LayerType* aboveReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(200, 50), gfx::Size(30, 50), true); |
- typename Types::LayerType* besideSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(90, 40), gfx::Size(10, 10), true); |
- typename Types::LayerType* besideReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(200, 40), gfx::Size(10, 10), true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(300, 150)); |
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, gfx::PointF(50, 50), gfx::Size(100, 100), false); |
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, gfx::PointF(300, 0), gfx::Size()); |
+ typename Types::LayerType* aboveSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(70, 50), gfx::Size(30, 50), true); |
+ typename Types::LayerType* aboveReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(200, 50), gfx::Size(30, 50), true); |
+ typename Types::LayerType* besideSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(90, 40), gfx::Size(10, 10), true); |
+ typename Types::LayerType* besideReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(200, 40), gfx::Size(10, 10), true); |
// Filters make the layer own a surface. |
WebFilterOperations filters; |
@@ -3111,10 +3111,10 @@ protected: |
gfx::Rect occlusionBesideReplica = gfx::Rect(200, 40, 10, 10); |
Region expectedOcclusion; |
- expectedOcclusion.unite(cc::IntRect(occlusionAboveSurface)); |
- expectedOcclusion.unite(cc::IntRect(occlusionAboveReplica)); |
- expectedOcclusion.unite(cc::IntRect(occlusionBesideSurface)); |
- expectedOcclusion.unite(cc::IntRect(occlusionBesideReplica)); |
+ expectedOcclusion.Union(occlusionAboveSurface); |
+ expectedOcclusion.Union(occlusionAboveReplica); |
+ expectedOcclusion.Union(occlusionBesideSurface); |
+ expectedOcclusion.Union(occlusionBesideReplica); |
ASSERT_EQ(expectedOcclusion.rects().size(), occlusion.occlusionInTargetSurface().rects().size()); |
ASSERT_EQ(expectedOcclusion.rects().size(), occlusion.occlusionInScreenSpace().rects().size()); |
@@ -3140,9 +3140,9 @@ protected: |
gfx::Size trackingSize(100, 100); |
gfx::Size belowTrackingSize(99, 99); |
- typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), gfx::Size(400, 400)); |
- typename Types::LayerType* large = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), trackingSize, true); |
- typename Types::LayerType* small = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), belowTrackingSize, true); |
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, gfx::PointF(0, 0), gfx::Size(400, 400)); |
+ typename Types::LayerType* large = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), trackingSize, true); |
+ typename Types::LayerType* small = this->createDrawingLayer(parent, this->identityMatrix, gfx::PointF(0, 0), belowTrackingSize, true); |
this->calcDrawEtc(parent); |
TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |