Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3089)

Unified Diff: cc/CCRenderSurfaceTest.cpp

Issue 11076013: [cc] Store CCLayerImpls as scoped_ptrs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCQuadCullerTest.cpp ('k') | cc/CCRendererGLTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCRenderSurfaceTest.cpp
diff --git a/cc/CCRenderSurfaceTest.cpp b/cc/CCRenderSurfaceTest.cpp
index 35f6cc042a418d9f08a92af60e1972f551445d53..c0cb19d4ba0f3b5aced5953a58012f0e35dd1203 100644
--- a/cc/CCRenderSurfaceTest.cpp
+++ b/cc/CCRenderSurfaceTest.cpp
@@ -42,7 +42,7 @@ TEST(CCRenderSurfaceTest, verifySurfaceChangesAreTrackedProperly)
// This will fake that we are on the correct thread for testing purposes.
DebugScopedSetImplThread setImplThread;
- OwnPtr<CCLayerImpl> owningLayer = CCLayerImpl::create(1);
+ scoped_ptr<CCLayerImpl> owningLayer = CCLayerImpl::create(1);
owningLayer->createRenderSurface();
ASSERT_TRUE(owningLayer->renderSurface());
CCRenderSurface* renderSurface = owningLayer->renderSurface();
@@ -62,7 +62,7 @@ TEST(CCRenderSurfaceTest, verifySurfaceChangesAreTrackedProperly)
EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setClipRect(testRect));
EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setContentRect(testRect));
- OwnPtr<CCLayerImpl> dummyMask = CCLayerImpl::create(1);
+ scoped_ptr<CCLayerImpl> dummyMask = CCLayerImpl::create(1);
WebTransformationMatrix dummyMatrix;
dummyMatrix.translate(1.0, 2.0);
@@ -79,15 +79,15 @@ TEST(CCRenderSurfaceTest, sanityCheckSurfaceCreatesCorrectSharedQuadState)
// This will fake that we are on the correct thread for testing purposes.
DebugScopedSetImplThread setImplThread;
- OwnPtr<CCLayerImpl> rootLayer = CCLayerImpl::create(1);
+ scoped_ptr<CCLayerImpl> rootLayer = CCLayerImpl::create(1);
- OwnPtr<CCLayerImpl> owningLayer = CCLayerImpl::create(2);
+ scoped_ptr<CCLayerImpl> owningLayer = CCLayerImpl::create(2);
owningLayer->createRenderSurface();
ASSERT_TRUE(owningLayer->renderSurface());
owningLayer->setRenderTarget(owningLayer.get());
CCRenderSurface* renderSurface = owningLayer->renderSurface();
- rootLayer->addChild(owningLayer.release());
+ rootLayer->addChild(owningLayer.Pass());
IntRect contentRect = IntRect(IntPoint::zero(), IntSize(50, 50));
IntRect clipRect = IntRect(IntPoint(5, 5), IntSize(40, 40));
@@ -133,15 +133,15 @@ TEST(CCRenderSurfaceTest, sanityCheckSurfaceCreatesCorrectRenderPass)
// This will fake that we are on the correct thread for testing purposes.
DebugScopedSetImplThread setImplThread;
- OwnPtr<CCLayerImpl> rootLayer = CCLayerImpl::create(1);
+ scoped_ptr<CCLayerImpl> rootLayer = CCLayerImpl::create(1);
- OwnPtr<CCLayerImpl> owningLayer = CCLayerImpl::create(2);
+ scoped_ptr<CCLayerImpl> owningLayer = CCLayerImpl::create(2);
owningLayer->createRenderSurface();
ASSERT_TRUE(owningLayer->renderSurface());
owningLayer->setRenderTarget(owningLayer.get());
CCRenderSurface* renderSurface = owningLayer->renderSurface();
- rootLayer->addChild(owningLayer.release());
+ rootLayer->addChild(owningLayer.Pass());
IntRect contentRect = IntRect(IntPoint::zero(), IntSize(50, 50));
WebTransformationMatrix origin;
« no previous file with comments | « cc/CCQuadCullerTest.cpp ('k') | cc/CCRendererGLTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698