| Index: cc/CCQuadCullerTest.cpp
|
| ===================================================================
|
| --- cc/CCQuadCullerTest.cpp (revision 160631)
|
| +++ cc/CCQuadCullerTest.cpp (working copy)
|
| @@ -40,9 +40,9 @@
|
|
|
| typedef CCLayerIterator<CCLayerImpl, std::vector<CCLayerImpl*>, CCRenderSurface, CCLayerIteratorActions::FrontToBack> CCLayerIteratorType;
|
|
|
| -static scoped_ptr<CCTiledLayerImpl> makeLayer(CCTiledLayerImpl* parent, const WebTransformationMatrix& drawTransform, const IntRect& layerRect, float opacity, bool opaque, const IntRect& layerOpaqueRect, std::vector<CCLayerImpl*>& surfaceLayerList)
|
| +static PassOwnPtr<CCTiledLayerImpl> makeLayer(CCTiledLayerImpl* parent, const WebTransformationMatrix& drawTransform, const IntRect& layerRect, float opacity, bool opaque, const IntRect& layerOpaqueRect, std::vector<CCLayerImpl*>& surfaceLayerList)
|
| {
|
| - scoped_ptr<CCTiledLayerImpl> layer = CCTiledLayerImpl::create(1);
|
| + OwnPtr<CCTiledLayerImpl> layer = CCTiledLayerImpl::create(1);
|
| OwnPtr<CCLayerTilingData> tiler = CCLayerTilingData::create(IntSize(100, 100), CCLayerTilingData::NoBorderTexels);
|
| tiler->setBounds(layerRect.size());
|
| layer->setTilingData(*tiler);
|
| @@ -74,7 +74,7 @@
|
| }
|
| layer->setDrawableContentRect(rectInTarget);
|
|
|
| - return layer.Pass();
|
| + return layer.release();
|
| }
|
|
|
| static void appendQuads(CCQuadList& quadList, CCSharedQuadStateList& sharedStateList, CCTiledLayerImpl* layer, CCLayerIteratorType& it, CCOcclusionTrackerImpl& occlusionTracker)
|
| @@ -102,8 +102,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, false, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -119,8 +119,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -136,8 +136,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 0.9f, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -153,8 +153,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -172,8 +172,8 @@
|
|
|
| childTransform.translate(50, 50);
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -215,8 +215,8 @@
|
|
|
| rootRect = childRect = IntRect(0, 0, 100, 100);
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -243,8 +243,8 @@
|
|
|
| rootRect = childRect = IntRect(0, 0, 100, 100);
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -263,8 +263,8 @@
|
|
|
| childTransform.translate(100, 100);
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -282,9 +282,9 @@
|
|
|
| childTransform.translate(50, 50);
|
|
|
| - scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<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<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -302,9 +302,9 @@
|
|
|
| childTransform.translate(50, 10);
|
|
|
| - scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<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<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -322,9 +322,9 @@
|
|
|
| childTransform.translate(50, 49);
|
|
|
| - scoped_ptr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<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<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, false, childOpaqueRect, renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -343,8 +343,8 @@
|
| // Use a small rotation so as to not disturb the geometry significantly.
|
| childTransform.rotate(1);
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -369,8 +369,8 @@
|
| WebTransformationMatrix parentTransform;
|
| parentTransform.rotate(1);
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, parentTransform, rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -386,8 +386,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(200, 100, 100, 100));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -403,8 +403,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(100, 100, 100, 100));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -420,8 +420,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -437,8 +437,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(500, 500, 100, 100));
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
| @@ -454,8 +454,8 @@
|
| {
|
| DECLARE_AND_INITIALIZE_TEST_QUADS
|
|
|
| - 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);
|
| + OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, WebTransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| + OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), WebTransformationMatrix(), childRect, 1, true, IntRect(), renderSurfaceLayerList);
|
| TestCCOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200), false);
|
| CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
|
|
|
|
|