summaryrefslogtreecommitdiffstats
path: root/cc/quad_culler_unittest.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-19 21:22:42 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-19 21:22:42 +0000
commitc753e25a8b4366c44134a8c21b9ed3392bf48608 (patch)
treef378c8a762caccf60856a1670ae33dfd638b9453 /cc/quad_culler_unittest.cc
parent503160f80568f024fa712e280bb1a4e1e6ca1ec3 (diff)
downloadchromium_src-c753e25a8b4366c44134a8c21b9ed3392bf48608.zip
chromium_src-c753e25a8b4366c44134a8c21b9ed3392bf48608.tar.gz
chromium_src-c753e25a8b4366c44134a8c21b9ed3392bf48608.tar.bz2
Revert "cc: Rename cc classes and members to match filenames"
This reverts commit 184fac5add06d5f4670fa6be4a4d3b39232d51bb. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/quad_culler_unittest.cc')
-rw-r--r--cc/quad_culler_unittest.cc214
1 files changed, 107 insertions, 107 deletions
diff --git a/cc/quad_culler_unittest.cc b/cc/quad_culler_unittest.cc
index 38d88f2..dd1b460 100644
--- a/cc/quad_culler_unittest.cc
+++ b/cc/quad_culler_unittest.cc
@@ -23,27 +23,27 @@ using WebKit::WebTransformationMatrix;
namespace {
-class TestOcclusionTrackerImpl : public OcclusionTrackerImpl {
+class TestCCOcclusionTrackerImpl : public CCOcclusionTrackerImpl {
public:
- TestOcclusionTrackerImpl(const IntRect& scissorRectInScreen, bool recordMetricsForFrame = true)
- : OcclusionTrackerImpl(scissorRectInScreen, recordMetricsForFrame)
+ TestCCOcclusionTrackerImpl(const IntRect& scissorRectInScreen, bool recordMetricsForFrame = true)
+ : CCOcclusionTrackerImpl(scissorRectInScreen, recordMetricsForFrame)
, m_scissorRectInScreen(scissorRectInScreen)
{
}
protected:
- virtual IntRect layerScissorRectInTargetSurface(const LayerImpl* layer) const { return m_scissorRectInScreen; }
+ virtual IntRect layerScissorRectInTargetSurface(const CCLayerImpl* layer) const { return m_scissorRectInScreen; }
private:
IntRect m_scissorRectInScreen;
};
-typedef LayerIterator<LayerImpl, std::vector<LayerImpl*>, RenderSurfaceImpl, LayerIteratorActions::FrontToBack> LayerIteratorType;
+typedef CCLayerIterator<CCLayerImpl, std::vector<CCLayerImpl*>, CCRenderSurface, CCLayerIteratorActions::FrontToBack> CCLayerIteratorType;
-static scoped_ptr<TiledLayerImpl> makeLayer(TiledLayerImpl* parent, const WebTransformationMatrix& drawTransform, const IntRect& layerRect, float opacity, bool opaque, const IntRect& layerOpaqueRect, std::vector<LayerImpl*>& surfaceLayerList)
+static scoped_ptr<CCTiledLayerImpl> makeLayer(CCTiledLayerImpl* parent, const WebTransformationMatrix& drawTransform, const IntRect& layerRect, float opacity, bool opaque, const IntRect& layerOpaqueRect, std::vector<CCLayerImpl*>& surfaceLayerList)
{
- scoped_ptr<TiledLayerImpl> layer = TiledLayerImpl::create(1);
- scoped_ptr<LayerTilingData> tiler = LayerTilingData::create(IntSize(100, 100), LayerTilingData::NoBorderTexels);
+ scoped_ptr<CCTiledLayerImpl> layer = CCTiledLayerImpl::create(1);
+ scoped_ptr<CCLayerTilingData> tiler = CCLayerTilingData::create(IntSize(100, 100), CCLayerTilingData::NoBorderTexels);
tiler->setBounds(layerRect.size());
layer->setTilingData(*tiler);
layer->setSkipsDraw(false);
@@ -55,14 +55,14 @@ static scoped_ptr<TiledLayerImpl> makeLayer(TiledLayerImpl* parent, const WebTra
layer->setBounds(layerRect.size());
layer->setContentBounds(layerRect.size());
- ResourceProvider::ResourceId resourceId = 1;
+ CCResourceProvider::ResourceId resourceId = 1;
for (int i = 0; i < tiler->numTilesX(); ++i)
for (int j = 0; j < tiler->numTilesY(); ++j) {
IntRect tileOpaqueRect = opaque ? tiler->tileBounds(i, j) : intersection(tiler->tileBounds(i, j), layerOpaqueRect);
layer->pushTileProperties(i, j, resourceId++, tileOpaqueRect);
}
- IntRect rectInTarget = MathUtil::mapClippedRect(layer->drawTransform(), layer->visibleContentRect());
+ IntRect rectInTarget = CCMathUtil::mapClippedRect(layer->drawTransform(), layer->visibleContentRect());
if (!parent) {
layer->createRenderSurface();
surfaceLayerList.push_back(layer.get());
@@ -70,18 +70,18 @@ static scoped_ptr<TiledLayerImpl> makeLayer(TiledLayerImpl* parent, const WebTra
} else {
layer->setRenderTarget(parent->renderTarget());
parent->renderSurface()->layerList().push_back(layer.get());
- rectInTarget.unite(MathUtil::mapClippedRect(parent->drawTransform(), parent->visibleContentRect()));
+ rectInTarget.unite(CCMathUtil::mapClippedRect(parent->drawTransform(), parent->visibleContentRect()));
}
layer->setDrawableContentRect(rectInTarget);
return layer.Pass();
}
-static void appendQuads(QuadList& quadList, SharedQuadStateList& sharedStateList, TiledLayerImpl* layer, LayerIteratorType& it, OcclusionTrackerImpl& occlusionTracker)
+static void appendQuads(CCQuadList& quadList, CCSharedQuadStateList& sharedStateList, CCTiledLayerImpl* layer, CCLayerIteratorType& it, CCOcclusionTrackerImpl& occlusionTracker)
{
occlusionTracker.enterLayer(it);
- QuadCuller quadCuller(quadList, sharedStateList, layer, &occlusionTracker, false, false);
- AppendQuadsData data;
+ CCQuadCuller quadCuller(quadList, sharedStateList, layer, &occlusionTracker, false, false);
+ CCAppendQuadsData data;
layer->appendQuads(quadCuller, data);
occlusionTracker.leaveLayer(it);
++it;
@@ -89,23 +89,23 @@ static void appendQuads(QuadList& quadList, SharedQuadStateList& sharedStateList
#define DECLARE_AND_INITIALIZE_TEST_QUADS \
DebugScopedSetImplThread impl; \
- QuadList quadList; \
- SharedQuadStateList sharedStateList; \
- std::vector<LayerImpl*> renderSurfaceLayerList; \
+ CCQuadList quadList; \
+ CCSharedQuadStateList sharedStateList; \
+ std::vector<CCLayerImpl*> renderSurfaceLayerList; \
WebTransformationMatrix childTransform; \
IntSize rootSize = IntSize(300, 300); \
IntRect rootRect = IntRect(IntPoint(), rootSize); \
IntSize childSize = IntSize(200, 200); \
IntRect childRect = IntRect(IntPoint(), childSize);
-TEST(QuadCullerTest, verifyNoCulling)
+TEST(CCQuadCullerTest, verifyNoCulling)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, false, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, false, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -115,14 +115,14 @@ TEST(QuadCullerTest, verifyNoCulling)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
-TEST(QuadCullerTest, verifyCullChildLinesUpTopLeft)
+TEST(CCQuadCullerTest, verifyCullChildLinesUpTopLeft)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -132,14 +132,14 @@ TEST(QuadCullerTest, verifyCullChildLinesUpTopLeft)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 40000, 1);
}
-TEST(QuadCullerTest, verifyCullWhenChildOpacityNotOne)
+TEST(CCQuadCullerTest, verifyCullWhenChildOpacityNotOne)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 0.9f, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 0.9f, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -149,14 +149,14 @@ TEST(QuadCullerTest, verifyCullWhenChildOpacityNotOne)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
-TEST(QuadCullerTest, verifyCullWhenChildOpaqueFlagFalse)
+TEST(CCQuadCullerTest, verifyCullWhenChildOpaqueFlagFalse)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -166,16 +166,16 @@ TEST(QuadCullerTest, verifyCullWhenChildOpaqueFlagFalse)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
-TEST(QuadCullerTest, verifyCullCenterTileOnly)
+TEST(CCQuadCullerTest, verifyCullCenterTileOnly)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
childTransform.translate(50, 50);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -201,7 +201,7 @@ TEST(QuadCullerTest, verifyCullCenterTileOnly)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 30000, 1);
}
-TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize1)
+TEST(CCQuadCullerTest, verifyCullCenterTileNonIntegralSize1)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
@@ -215,10 +215,10 @@ TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize1)
rootRect = childRect = IntRect(0, 0, 100, 100);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -229,7 +229,7 @@ TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize1)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
-TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize2)
+TEST(CCQuadCullerTest, verifyCullCenterTileNonIntegralSize2)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
@@ -243,10 +243,10 @@ TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize2)
rootRect = childRect = IntRect(0, 0, 100, 100);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -257,16 +257,16 @@ TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize2)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
-TEST(QuadCullerTest, verifyCullChildLinesUpBottomRight)
+TEST(CCQuadCullerTest, verifyCullChildLinesUpBottomRight)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
childTransform.translate(100, 100);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -276,17 +276,17 @@ TEST(QuadCullerTest, verifyCullChildLinesUpBottomRight)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 40000, 1);
}
-TEST(QuadCullerTest, verifyCullSubRegion)
+TEST(CCQuadCullerTest, verifyCullSubRegion)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
childTransform.translate(50, 50);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
IntRect childOpaqueRect(childRect.x() + childRect.width() / 4, childRect.y() + childRect.height() / 4, childRect.width() / 2, childRect.height() / 2);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -296,17 +296,17 @@ TEST(QuadCullerTest, verifyCullSubRegion)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 10000, 1);
}
-TEST(QuadCullerTest, verifyCullSubRegion2)
+TEST(CCQuadCullerTest, verifyCullSubRegion2)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
childTransform.translate(50, 10);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
IntRect childOpaqueRect(childRect.x() + childRect.width() / 4, childRect.y() + childRect.height() / 4, childRect.width() / 2, childRect.height() * 3 / 4);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -316,17 +316,17 @@ TEST(QuadCullerTest, verifyCullSubRegion2)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 15000, 1);
}
-TEST(QuadCullerTest, verifyCullSubRegionCheckOvercull)
+TEST(CCQuadCullerTest, verifyCullSubRegionCheckOvercull)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
childTransform.translate(50, 49);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
IntRect childOpaqueRect(childRect.x() + childRect.width() / 4, childRect.y() + childRect.height() / 4, childRect.width() / 2, childRect.height() / 2);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -336,17 +336,17 @@ TEST(QuadCullerTest, verifyCullSubRegionCheckOvercull)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 10000, 1);
}
-TEST(QuadCullerTest, verifyNonAxisAlignedQuadsDontOcclude)
+TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsDontOcclude)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
// Use a small rotation so as to not disturb the geometry significantly.
childTransform.rotate(1);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -361,7 +361,7 @@ TEST(QuadCullerTest, verifyNonAxisAlignedQuadsDontOcclude)
// tile parent layer is rotated by 1 degree. Of the four tiles the child would
// normally occlude, three will move (slightly) out from under the child layer, and
// one moves further under the child. Only this last tile should be culled.
-TEST(QuadCullerTest, verifyNonAxisAlignedQuadsSafelyCulled)
+TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsSafelyCulled)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
@@ -369,10 +369,10 @@ TEST(QuadCullerTest, verifyNonAxisAlignedQuadsSafelyCulled)
WebTransformationMatrix parentTransform;
parentTransform.rotate(1);
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, parentTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, parentTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -382,14 +382,14 @@ TEST(QuadCullerTest, verifyNonAxisAlignedQuadsSafelyCulled)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 29400, 1);
}
-TEST(QuadCullerTest, verifyCullOutsideScissorOverTile)
+TEST(CCQuadCullerTest, verifyCullOutsideScissorOverTile)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(200, 100, 100, 100));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(200, 100, 100, 100));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -399,14 +399,14 @@ TEST(QuadCullerTest, verifyCullOutsideScissorOverTile)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 120000, 1);
}
-TEST(QuadCullerTest, verifyCullOutsideScissorOverCulledTile)
+TEST(CCQuadCullerTest, verifyCullOutsideScissorOverCulledTile)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(100, 100, 100, 100));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(100, 100, 100, 100));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -416,14 +416,14 @@ TEST(QuadCullerTest, verifyCullOutsideScissorOverCulledTile)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 120000, 1);
}
-TEST(QuadCullerTest, verifyCullOutsideScissorOverPartialTiles)
+TEST(CCQuadCullerTest, verifyCullOutsideScissorOverPartialTiles)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -433,14 +433,14 @@ TEST(QuadCullerTest, verifyCullOutsideScissorOverPartialTiles)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 90000, 1);
}
-TEST(QuadCullerTest, verifyCullOutsideScissorOverNoTiles)
+TEST(CCQuadCullerTest, verifyCullOutsideScissorOverNoTiles)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(500, 500, 100, 100));
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(500, 500, 100, 100));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
@@ -450,14 +450,14 @@ TEST(QuadCullerTest, verifyCullOutsideScissorOverNoTiles)
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 130000, 1);
}
-TEST(QuadCullerTest, verifyWithoutMetrics)
+TEST(CCQuadCullerTest, verifyWithoutMetrics)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- scoped_ptr<TiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
- scoped_ptr<TiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
- TestOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200), false);
- LayerIteratorType it = LayerIteratorType::begin(&renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ scoped_ptr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200), false);
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);