| Index: cc/CCOcclusionTrackerTest.cpp
|
| diff --git a/cc/CCOcclusionTrackerTest.cpp b/cc/CCOcclusionTrackerTest.cpp
|
| index f52ce09c7def911ccc7a5f7d424e3e007a6a9b7a..e5155da52df0b37b4e06a16d12a3283a8de6670c 100644
|
| --- a/cc/CCOcclusionTrackerTest.cpp
|
| +++ b/cc/CCOcclusionTrackerTest.cpp
|
| @@ -7,10 +7,10 @@
|
| #include "CCOcclusionTracker.h"
|
|
|
| #include "CCAnimationTestCommon.h"
|
| +#include "CCGeometryTestUtils.h"
|
| #include "CCLayerAnimationController.h"
|
| #include "CCLayerImpl.h"
|
| #include "CCLayerTreeHostCommon.h"
|
| -#include "CCLayerTreeTestCommon.h"
|
| #include "CCMathUtil.h"
|
| #include "CCOcclusionTrackerTestCommon.h"
|
| #include "CCOverdrawMetrics.h"
|
| @@ -426,9 +426,9 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
|
| @@ -446,14 +446,14 @@ protected:
|
| occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
|
| }
|
| };
|
|
|
| @@ -479,9 +479,9 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
|
| @@ -499,14 +499,14 @@ protected:
|
| occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
|
| }
|
| };
|
|
|
| @@ -530,9 +530,9 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(50, 50, 50, 50)));
|
| @@ -550,25 +550,25 @@ protected:
|
| occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 50, 50, 50)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(51, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(51, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 100, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(49, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(51, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(100, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(51, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(50, 100, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(49, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
|
|
|
| occlusion.useDefaultLayerClipRect();
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 50, 50, 50)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(51, 49, 49, 1), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(51, 49, 49, 1), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)).isEmpty());
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)).isEmpty());
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(49, 51, 1, 49), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(49, 51, 1, 49), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
|
| occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
|
| }
|
| };
|
| @@ -598,17 +598,17 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterContributingSurface(child, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->leaveContributingSurface(child, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
|
| @@ -680,36 +680,36 @@ protected:
|
|
|
| this->visitLayer(child2, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitLayer(layer, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->enterContributingSurface(child, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // Occlusion in |child2| should get merged with the |child| surface we are leaving now.
|
| this->leaveContributingSurface(child, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(90, 30, 10, 10), occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(90, 30, 10, 10), occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)));
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 60, 10)));
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 60, 10)));
|
| @@ -722,21 +722,21 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 60, 10)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 60, 10)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 29, 60, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 60, 10)));
|
| - EXPECT_INT_RECT_EQ(IntRect(90, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 60, 10)));
|
| + EXPECT_RECT_EQ(IntRect(29, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 60, 10)));
|
| + EXPECT_RECT_EQ(IntRect(30, 29, 60, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 60, 10)));
|
| + EXPECT_RECT_EQ(IntRect(90, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 60, 10)));
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 31, 60, 10)).isEmpty());
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 40, 70, 60)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
|
| // This rect is mostly occluded by |child2|.
|
| - EXPECT_INT_RECT_EQ(IntRect(90, 39, 10, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(90, 39, 10, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
|
| // This rect extends past top/right ends of |child2|.
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 29, 70, 11), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
|
| + EXPECT_RECT_EQ(IntRect(30, 29, 70, 11), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
|
| // This rect extends past left/right ends of |child2|.
|
| - EXPECT_INT_RECT_EQ(IntRect(20, 39, 80, 60), occlusion.unoccludedContentRect(parent, IntRect(20, 39, 80, 60)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(20, 39, 80, 60), occlusion.unoccludedContentRect(parent, IntRect(20, 39, 80, 60)));
|
| + EXPECT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
|
|
|
| /* Justification for the above occlusion from |layer|:
|
| 100
|
| @@ -794,9 +794,9 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterContributingSurface(child, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(clippedLayerInChild, occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(clippedLayerInChild, occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(child, clippedLayerInChild));
|
| @@ -821,13 +821,13 @@ protected:
|
| this->leaveContributingSurface(child, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(75, 55, 1, 1)));
|
| - EXPECT_INT_RECT_EQ(IntRect(75, 55, 1, 1), occlusion.unoccludedContentRect(parent, IntRect(75, 55, 1, 1)));
|
| + EXPECT_RECT_EQ(IntRect(75, 55, 1, 1), occlusion.unoccludedContentRect(parent, IntRect(75, 55, 1, 1)));
|
| }
|
| };
|
|
|
| @@ -858,9 +858,9 @@ protected:
|
| this->visitLayer(layer1, occlusion);
|
| this->enterContributingSurface(child, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
|
| @@ -870,17 +870,17 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 431, 60, 70)));
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 430, 60, 70)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(9, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)));
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)));
|
| + EXPECT_RECT_EQ(IntRect(9, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)));
|
| + EXPECT_RECT_EQ(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)));
|
| + EXPECT_RECT_EQ(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)));
|
| + EXPECT_RECT_EQ(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)));
|
|
|
| this->leaveContributingSurface(child, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
|
| @@ -888,10 +888,10 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
|
|
|
| EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 40, 70, 60)).isEmpty());
|
| - EXPECT_INT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 39, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(30, 39, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
|
| + EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
|
|
|
| /* Justification for the above occlusion from |layer1| and |layer2|:
|
|
|
| @@ -946,9 +946,9 @@ protected:
|
| this->visitLayer(layer2, occlusion);
|
| this->enterContributingSurface(child2, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
|
| @@ -966,15 +966,15 @@ protected:
|
| occlusion.setLayerClipRect(IntRect(-20, -20, 1000, 1000));
|
|
|
| // There is nothing above child2's surface in the z-order.
|
| - EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
|
| + EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
|
|
|
| this->leaveContributingSurface(child2, occlusion);
|
| this->visitLayer(layer1, occlusion);
|
| this->enterContributingSurface(child1, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(-10, 430, 80, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(-10, 430, 80, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(child1, IntRect(-10, 430, 80, 70)));
|
| @@ -984,14 +984,14 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(child1, IntRect(-10, 430, 80, 71)));
|
|
|
| // child2's contents will occlude child1 below it.
|
| - EXPECT_INT_RECT_EQ(IntRect(-10, 430, 10, 70), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(-10, 430, 80, 70)));
|
| + EXPECT_RECT_EQ(IntRect(-10, 430, 10, 70), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(-10, 430, 80, 70)));
|
|
|
| this->leaveContributingSurface(child1, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(20, 20, 80, 80)));
|
| @@ -1061,9 +1061,9 @@ protected:
|
| this->visitLayer(layer2, occlusion);
|
| this->enterLayer(child2, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
|
| @@ -1076,15 +1076,15 @@ protected:
|
| this->enterContributingSurface(child2, occlusion);
|
|
|
| // There is nothing above child2's surface in the z-order.
|
| - EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
|
| + EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
|
|
|
| this->leaveContributingSurface(child2, occlusion);
|
| this->visitLayer(layer1, occlusion);
|
| this->enterContributingSurface(child1, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(child1, IntRect(420, -20, 80, 90)));
|
| @@ -1094,16 +1094,16 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(child1, IntRect(421, -20, 80, 90)));
|
|
|
| // child2's contents will occlude child1 below it.
|
| - EXPECT_INT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 80, 90)));
|
| - EXPECT_INT_RECT_EQ(IntRect(490, -10, 10, 80), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -10, 80, 90)));
|
| - EXPECT_INT_RECT_EQ(IntRect(420, -20, 70, 10), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 70, 90)));
|
| + EXPECT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 80, 90)));
|
| + EXPECT_RECT_EQ(IntRect(490, -10, 10, 80), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -10, 80, 90)));
|
| + EXPECT_RECT_EQ(IntRect(420, -20, 70, 10), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 70, 90)));
|
|
|
| this->leaveContributingSurface(child1, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(10, 20, 90, 80)));
|
| @@ -1189,16 +1189,16 @@ protected:
|
| this->visitLayer(opaqueLayer, occlusion);
|
| this->enterContributingSurface(opaqueLayer, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // And it gets translated to the parent surface.
|
| this->leaveContributingSurface(opaqueLayer, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // The blur layer needs to throw away any occlusion from outside its subtree.
|
| @@ -1215,9 +1215,9 @@ protected:
|
| // But the opaque layer's occlusion is preserved on the parent.
|
| this->leaveContributingSurface(blurLayer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -1239,16 +1239,16 @@ protected:
|
|
|
| this->visitLayer(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitContributingSurface(surface, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| // The surface and replica should both be occluding the parent.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -1271,16 +1271,16 @@ protected:
|
|
|
| this->visitLayer(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitContributingSurface(surface, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| // The surface and replica should both be occluding the parent.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 70), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 100, 70), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -1303,16 +1303,16 @@ protected:
|
|
|
| this->visitLayer(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitContributingSurface(surface, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| // The replica should not be occluding the parent, since it has a mask applied to it.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -1357,7 +1357,7 @@ protected:
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| }
|
| };
|
|
|
| @@ -1401,7 +1401,7 @@ protected:
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
|
| EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| }
|
| };
|
|
|
| @@ -1518,11 +1518,11 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
|
| + EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
|
| + EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -1561,11 +1561,11 @@ protected:
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
|
| + EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
|
| + EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -1734,7 +1734,7 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
|
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
|
| @@ -1750,7 +1750,7 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(120, 120, 180, 180), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(120, 120, 180, 180), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
|
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
|
| @@ -1766,7 +1766,7 @@ protected:
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(250, 250, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(250, 250, 50, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
|
|
| EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
|
| @@ -1795,7 +1795,7 @@ protected:
|
| this->enterLayer(layer, occlusion);
|
|
|
| // The layer is rotated in 3d but without preserving 3d, so it only gets resized.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
|
| }
|
| };
|
|
|
| @@ -1860,7 +1860,7 @@ protected:
|
| TestCCOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
|
| this->enterLayer(layer, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
|
| }
|
| };
|
|
|
| @@ -1954,9 +1954,9 @@ protected:
|
| // Ensure that those pixels don't occlude things outside the clipRect.
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| }
|
| };
|
| @@ -1990,27 +1990,27 @@ protected:
|
| this->visitLayer(topmost, occlusion);
|
| this->enterLayer(parent2, occlusion);
|
| // This occlusion will affect all surfaces.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent2, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent2, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(parent2, occlusion);
|
|
|
| this->visitLayer(surfaceChild2, occlusion);
|
| this->enterLayer(surfaceChild, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(surfaceChild, occlusion);
|
| this->enterLayer(surface, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(surface, occlusion);
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
| // Occlusion within the surface is lost when leaving the animating surface.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
|
| this->leaveContributingSurface(surface, occlusion);
|
|
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| // Occlusion is not added for the animating |layer|.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| }
|
| };
|
|
|
| @@ -2042,27 +2042,27 @@ protected:
|
| this->visitLayer(topmost, occlusion);
|
| this->enterLayer(parent2, occlusion);
|
| // This occlusion will affect all surfaces.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(parent2, occlusion);
|
|
|
| this->visitLayer(surfaceChild2, occlusion);
|
| this->enterLayer(surfaceChild, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(surfaceChild, occlusion);
|
| this->enterLayer(surface, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(surface, occlusion);
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
| // Occlusion within the surface is lost when leaving the animating surface.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
|
| this->leaveContributingSurface(surface, occlusion);
|
|
|
| this->visitLayer(layer, occlusion);
|
| this->enterLayer(parent, occlusion);
|
|
|
| // Occlusion is not added for the animating |layer|.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| }
|
| };
|
|
|
| @@ -2100,7 +2100,7 @@ protected:
|
| this->visitLayer(surface2, occlusion);
|
| this->enterContributingSurface(surface2, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
|
|
| this->leaveContributingSurface(surface2, occlusion);
|
| @@ -2108,53 +2108,53 @@ protected:
|
|
|
| // surfaceChild2 is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
|
| // It also means that things occluding in screen space (e.g. surface2) cannot occlude this layer.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild2, IntRect(0, 0, 100, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild2, IntRect(0, 0, 100, 300)));
|
| EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 50, 300)));
|
|
|
| this->leaveLayer(surfaceChild2, occlusion);
|
| this->enterLayer(surfaceChild, occlusion);
|
| EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 100, 300)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
|
|
| // The surfaceChild is occluded by the surfaceChild2, but is moving relative its target and the screen, so it
|
| // can't be occluded.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 200, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 200, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 200, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 200, 300)));
|
| EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 50, 300)));
|
|
|
| this->leaveLayer(surfaceChild, occlusion);
|
| this->enterLayer(surface, occlusion);
|
| // The surfaceChild is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
|
|
| this->leaveLayer(surface, occlusion);
|
| // The surface's owning layer is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
| // The contributing |surface| is animating so it can't be occluded.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
|
| this->leaveContributingSurface(surface, occlusion);
|
|
|
| this->enterLayer(layer, occlusion);
|
| // The |surface| is moving in the screen and in its target, so all occlusion within the surface is lost when leaving it.
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| this->leaveLayer(layer, occlusion);
|
|
|
| this->enterLayer(parent, occlusion);
|
| // The |layer| is animating in the screen and in its target, so no occlusion is added.
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| + EXPECT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
|
| }
|
| };
|
|
|
| @@ -2182,9 +2182,9 @@ protected:
|
| this->visitLayer(surface2, occlusion);
|
| this->visitContributingSurface(surface2, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // Clear any stored occlusion.
|
| @@ -2194,9 +2194,9 @@ protected:
|
| this->visitLayer(surface, occlusion);
|
| this->visitContributingSurface(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -2219,9 +2219,9 @@ protected:
|
| this->visitLayer(surface, occlusion);
|
| this->visitContributingSurface(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -2245,22 +2245,22 @@ protected:
|
| // |topmost| occludes the replica, but not the surface itself.
|
| this->visitLayer(topmost, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitLayer(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
|
|
| // Surface is not occluded so it shouldn't think it is.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -2283,23 +2283,23 @@ protected:
|
| // |topmost| occludes the surface, but not the entire surface's replica.
|
| this->visitLayer(topmost, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitLayer(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
|
|
| // Surface is occluded, but only the top 10px of the replica.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 10, 100, 90), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 10, 100, 90), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -2324,23 +2324,23 @@ protected:
|
| this->visitLayer(overReplica, occlusion);
|
| this->visitLayer(overSurface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitLayer(surface, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
|
|
| // Surface and replica are occluded different amounts.
|
| - EXPECT_INT_RECT_EQ(IntRect(40, 0, 60, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(50, 0, 50, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(40, 0, 60, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(50, 0, 50, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -2364,18 +2364,18 @@ protected:
|
| // |topmost| occludes everything partially so we know occlusion is happening at all.
|
| this->visitLayer(topmost, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitLayer(surfaceChild, occlusion);
|
|
|
| // surfaceChild increases the occlusion in the screen by a narrow sliver.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| // In its own surface, surfaceChild is at 0,0 as is its occlusion.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // The root layer always has a clipRect. So the parent of |surface| has a clipRect. However, the owning layer for |surface| does not
|
| @@ -2385,20 +2385,20 @@ protected:
|
| this->enterContributingSurface(surfaceChild, occlusion);
|
| // The surfaceChild's parent does not have a clipRect as it owns a render surface. Make sure the unoccluded rect
|
| // does not get clipped away inappropriately.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 40, 100, 10), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 50)));
|
| + EXPECT_RECT_EQ(IntRect(0, 40, 100, 10), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 50)));
|
| this->leaveContributingSurface(surfaceChild, occlusion);
|
|
|
| // When the surfaceChild's occlusion is transformed up to its parent, make sure it is not clipped away inappropriately also.
|
| this->enterLayer(surface, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 10, 100, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 10, 100, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| this->leaveLayer(surface, occlusion);
|
|
|
| this->enterContributingSurface(surface, occlusion);
|
| // The surface's parent does have a clipRect as it is the root layer.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 50, 100, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 50, 100, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -2424,7 +2424,7 @@ protected:
|
| // The root layer always has a clipRect. So the parent of |surface| has a clipRect giving the surface itself a clipRect.
|
| this->enterContributingSurface(surface, occlusion);
|
| // Make sure the parent's clipRect clips the unoccluded region of the child surface.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
|
| }
|
| this->resetLayerIterator();
|
| {
|
| @@ -2436,7 +2436,7 @@ protected:
|
| // The root layer always has a clipRect. So the parent of |surface| has a clipRect giving the surface itself a clipRect.
|
| this->enterContributingSurface(surface, occlusion);
|
| // Make sure the viewport rect clips the unoccluded region of the child surface.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
|
| }
|
| }
|
| };
|
| @@ -2463,17 +2463,17 @@ protected:
|
| // |topmost| occludes everything partially so we know occlusion is happening at all.
|
| this->visitLayer(topmost, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // surfaceChild is not opaque and does not occlude, so we have a non-empty unoccluded area on surface.
|
| this->visitLayer(surfaceChild, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // The root layer always has a clipRect. So the parent of |surface| has a clipRect. However, the owning layer for |surface| does not
|
| @@ -2482,13 +2482,13 @@ protected:
|
|
|
| this->enterContributingSurface(surfaceChild, occlusion);
|
| // The surfaceChild's parent does not have a clipRect as it owns a render surface.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 100)));
|
| this->leaveContributingSurface(surfaceChild, occlusion);
|
|
|
| this->visitLayer(surface, occlusion);
|
| this->enterContributingSurface(surface, occlusion);
|
| // The surface's parent does have a clipRect as it is the root layer.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
|
| }
|
| };
|
|
|
| @@ -2536,28 +2536,28 @@ protected:
|
| this->visitLayer(occludingLayer2, occlusion);
|
| this->visitLayer(occludingLayer1, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // Everything outside the surface/replica is occluded but the surface/replica itself is not.
|
| this->enterLayer(filteredSurface, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 100, 100)));
|
| -
|
| - EXPECT_INT_RECT_EQ(IntRect(300 + 1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 1, 0, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(300 + 0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, 1, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(300 + 0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 - 1, 0, 100, 100)));
|
| - EXPECT_INT_RECT_EQ(IntRect(300 + 0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, -1, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 100, 100)));
|
| +
|
| + EXPECT_RECT_EQ(IntRect(300 + 1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 1, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(300 + 0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, 1, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(300 + 0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 - 1, 0, 100, 100)));
|
| + EXPECT_RECT_EQ(IntRect(300 + 0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, -1, 100, 100)));
|
| this->leaveLayer(filteredSurface, occlusion);
|
|
|
| // The filtered layer/replica does not occlude.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // The surface has a background blur, so it needs pixels that are currently considered occluded in order to be drawn. So the pixels
|
| @@ -2565,9 +2565,9 @@ protected:
|
| this->visitContributingSurface(filteredSurface, occlusion);
|
|
|
| this->enterLayer(parent, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| IntRect outsetRect;
|
| @@ -2576,44 +2576,44 @@ protected:
|
| // Nothing in the blur outsets for the filteredSurface is occluded.
|
| outsetRect = IntRect(50 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
|
| testRect = outsetRect;
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
|
|
| // Stuff outside the blur outsets is still occluded though.
|
| testRect = outsetRect;
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| testRect = outsetRect;
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| testRect = outsetRect;
|
| testRect.move(-1, 0);
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| testRect = outsetRect;
|
| testRect.move(0, -1);
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
|
|
| // Nothing in the blur outsets for the filteredSurface's replica is occluded.
|
| outsetRect = IntRect(200 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
|
| testRect = outsetRect;
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
|
|
| // Stuff outside the blur outsets is still occluded though.
|
| testRect = outsetRect;
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| testRect = outsetRect;
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| testRect = outsetRect;
|
| testRect.move(-1, 0);
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| testRect = outsetRect;
|
| testRect.move(0, -1);
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| + EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
|
| }
|
| };
|
|
|
| @@ -2651,9 +2651,9 @@ protected:
|
| occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
|
|
|
| this->visitLayer(occludingLayerAbove, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(100 / 2, 100 / 2, 50 / 2, 50 / 2), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(100 / 2, 100 / 2, 50 / 2, 50 / 2), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(100, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(100, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| this->visitLayer(filteredSurface2, occlusion);
|
| @@ -2666,7 +2666,7 @@ protected:
|
|
|
| // Test expectations in the target.
|
| IntRect expectedOcclusion = IntRect(100 + outsetRight * 2, 100 + outsetBottom * 2, 50 - (outsetLeft + outsetRight) * 2, 50 - (outsetTop + outsetBottom) * 2);
|
| - EXPECT_INT_RECT_EQ(expectedOcclusion, occlusion.occlusionInTargetSurface().rects()[0]);
|
| + EXPECT_RECT_EQ(expectedOcclusion, occlusion.occlusionInTargetSurface().rects()[0]);
|
|
|
| // Test expectations in the screen. Take the ceiling of half of the outsets.
|
| outsetTop = (outsetTop + 1) / 2;
|
| @@ -2675,7 +2675,7 @@ protected:
|
| outsetLeft = (outsetLeft + 1) / 2;
|
| expectedOcclusion = IntRect(100 / 2 + outsetRight * 2, 100 / 2 + outsetBottom * 2, 50 / 2 - (outsetLeft + outsetRight) * 2, 50 /2 - (outsetTop + outsetBottom) * 2);
|
|
|
| - EXPECT_INT_RECT_EQ(expectedOcclusion, occlusion.occlusionInScreenSpace().rects()[0]);
|
| + EXPECT_RECT_EQ(expectedOcclusion, occlusion.occlusionInScreenSpace().rects()[0]);
|
| }
|
| };
|
|
|
| @@ -2722,28 +2722,28 @@ protected:
|
| this->visitLayer(occludingLayer2, occlusion);
|
| this->visitLayer(occludingLayer1, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // Everything outside the surface/replica is occluded but the surface/replica itself is not.
|
| this->enterLayer(filteredSurface, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 50, 50)));
|
| -
|
| - EXPECT_INT_RECT_EQ(IntRect(150 + 1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 1, 0, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(150 + 0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, 1, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(150 + 0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 - 1, 0, 50, 50)));
|
| - EXPECT_INT_RECT_EQ(IntRect(150 + 0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, -1, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 50, 50)));
|
| +
|
| + EXPECT_RECT_EQ(IntRect(150 + 1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 1, 0, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(150 + 0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, 1, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(150 + 0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 - 1, 0, 50, 50)));
|
| + EXPECT_RECT_EQ(IntRect(150 + 0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, -1, 50, 50)));
|
| this->leaveLayer(filteredSurface, occlusion);
|
|
|
| // The filtered layer/replica does not occlude.
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // The surface has a background blur, so it needs pixels that are currently considered occluded in order to be drawn. So the pixels
|
| @@ -2751,7 +2751,7 @@ protected:
|
| this->visitContributingSurface(filteredSurface, occlusion);
|
|
|
| this->enterContributingSurface(clippingSurface, occlusion);
|
| - EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
|
|
|
| IntRect outsetRect;
|
| @@ -2762,45 +2762,45 @@ protected:
|
| outsetRect = IntRect(50 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
|
| clippedOutsetRect = intersection(outsetRect, IntRect(0 - outsetLeft, 0 - outsetTop, 300 + outsetLeft + outsetRight, 70 + outsetTop + outsetBottom));
|
| testRect = outsetRect;
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
|
|
| // Stuff outside the (clipped) blur outsets is still occluded though.
|
| testRect = outsetRect;
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| testRect = outsetRect;
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| testRect = outsetRect;
|
| testRect.move(-1, 0);
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| testRect = outsetRect;
|
| testRect.move(0, -1);
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
|
|
| // Nothing in the (clipped) blur outsets for the filteredSurface's replica is occluded.
|
| outsetRect = IntRect(200 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
|
| clippedOutsetRect = intersection(outsetRect, IntRect(0 - outsetLeft, 0 - outsetTop, 300 + outsetLeft + outsetRight, 70 + outsetTop + outsetBottom));
|
| testRect = outsetRect;
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
|
|
| // Stuff outside the (clipped) blur outsets is still occluded though.
|
| testRect = outsetRect;
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| testRect = outsetRect;
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| testRect = outsetRect;
|
| testRect.move(-1, 0);
|
| testRect.expand(1, 0);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| testRect = outsetRect;
|
| testRect.move(0, -1);
|
| testRect.expand(0, 1);
|
| - EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| + EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
|
| }
|
| };
|
|
|
| @@ -2846,9 +2846,9 @@ protected:
|
| IntRect occlusionBehindReplica = IntRect(210, 60, 30, 30);
|
|
|
| IntRect expectedOpaqueBounds = unionRect(occlusionBehindSurface, occlusionBehindReplica);
|
| - EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -2894,9 +2894,9 @@ protected:
|
| IntRect occlusionAboveReplica = IntRect(200, 50, 50, 50);
|
|
|
| IntRect expectedOpaqueBounds = unionRect(occlusionAboveSurface, occlusionAboveReplica);
|
| - EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
| @@ -2995,17 +2995,17 @@ protected:
|
| // The small layer is not tracked because it is too small.
|
| this->visitLayer(small, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
|
|
|
| // The large layer is tracked as it is large enough.
|
| this->visitLayer(large, occlusion);
|
|
|
| - EXPECT_INT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInScreenSpace().bounds());
|
| + EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInScreenSpace().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
|
| - EXPECT_INT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInTargetSurface().bounds());
|
| + EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInTargetSurface().bounds());
|
| EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
|
| }
|
| };
|
|
|