diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-08 03:09:14 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-08 03:09:14 +0000 |
commit | b0c72aea160a27f0cbdf5c82e1d70a0b797321ae (patch) | |
tree | 35ddebfa7f19f21b54cf07711574e14cbbc6e119 /cc | |
parent | f3843583f850d2cc3b1bb174ac698033df6682c5 (diff) | |
download | chromium_src-b0c72aea160a27f0cbdf5c82e1d70a0b797321ae.zip chromium_src-b0c72aea160a27f0cbdf5c82e1d70a0b797321ae.tar.gz chromium_src-b0c72aea160a27f0cbdf5c82e1d70a0b797321ae.tar.bz2 |
[cc] Remove all WTF #includes from CCLayerTreeHost
This transitively involved cleaning up RateLimiter and the types that CCProxy,
CCPrioritizedTextureManager, and CCPrioritizedTexture are stored in.
BUG=154451
Review URL: https://chromiumcodereview.appspot.com/11035071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
30 files changed, 125 insertions, 114 deletions
diff --git a/cc/BitmapCanvasLayerTextureUpdater.cpp b/cc/BitmapCanvasLayerTextureUpdater.cpp index 35fb5a0..3231b7d 100644 --- a/cc/BitmapCanvasLayerTextureUpdater.cpp +++ b/cc/BitmapCanvasLayerTextureUpdater.cpp @@ -15,8 +15,8 @@ namespace cc { -BitmapCanvasLayerTextureUpdater::Texture::Texture(BitmapCanvasLayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture) - : LayerTextureUpdater::Texture(texture) +BitmapCanvasLayerTextureUpdater::Texture::Texture(BitmapCanvasLayerTextureUpdater* textureUpdater, scoped_ptr<CCPrioritizedTexture> texture) + : LayerTextureUpdater::Texture(texture.Pass()) , m_textureUpdater(textureUpdater) { } diff --git a/cc/BitmapCanvasLayerTextureUpdater.h b/cc/BitmapCanvasLayerTextureUpdater.h index c6fb9e1..8cf4e25 100644 --- a/cc/BitmapCanvasLayerTextureUpdater.h +++ b/cc/BitmapCanvasLayerTextureUpdater.h @@ -23,7 +23,7 @@ class BitmapCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater { public: class Texture : public LayerTextureUpdater::Texture { public: - Texture(BitmapCanvasLayerTextureUpdater*, PassOwnPtr<CCPrioritizedTexture>); + Texture(BitmapCanvasLayerTextureUpdater*, scoped_ptr<CCPrioritizedTexture>); virtual ~Texture(); virtual void updateRect(CCResourceProvider*, const IntRect& sourceRect, const IntSize& destOffset) OVERRIDE; diff --git a/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp b/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp index adb3b0f..93c8483 100644 --- a/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp +++ b/cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp @@ -18,8 +18,8 @@ namespace cc { -BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture(BitmapSkPictureCanvasLayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture) - : CanvasLayerTextureUpdater::Texture(texture) +BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture(BitmapSkPictureCanvasLayerTextureUpdater* textureUpdater, scoped_ptr<CCPrioritizedTexture> texture) + : CanvasLayerTextureUpdater::Texture(texture.Pass()) , m_textureUpdater(textureUpdater) { } diff --git a/cc/BitmapSkPictureCanvasLayerTextureUpdater.h b/cc/BitmapSkPictureCanvasLayerTextureUpdater.h index d5eeab1..140f9be 100644 --- a/cc/BitmapSkPictureCanvasLayerTextureUpdater.h +++ b/cc/BitmapSkPictureCanvasLayerTextureUpdater.h @@ -18,7 +18,7 @@ class BitmapSkPictureCanvasLayerTextureUpdater : public SkPictureCanvasLayerText public: class Texture : public CanvasLayerTextureUpdater::Texture { public: - Texture(BitmapSkPictureCanvasLayerTextureUpdater*, PassOwnPtr<CCPrioritizedTexture>); + Texture(BitmapSkPictureCanvasLayerTextureUpdater*, scoped_ptr<CCPrioritizedTexture>); virtual void prepareRect(const IntRect& sourceRect, CCRenderingStats&) OVERRIDE; virtual void updateRect(CCResourceProvider*, const IntRect& sourceRect, const IntSize& destOffset) OVERRIDE; diff --git a/cc/CCDelegatedRendererLayerImplTest.cpp b/cc/CCDelegatedRendererLayerImplTest.cpp index 1366c99..312a3d3 100644 --- a/cc/CCDelegatedRendererLayerImplTest.cpp +++ b/cc/CCDelegatedRendererLayerImplTest.cpp @@ -50,7 +50,7 @@ public: virtual void onCanDrawStateChanged(bool) OVERRIDE { } virtual void setNeedsRedrawOnImplThread() OVERRIDE { } virtual void setNeedsCommitOnImplThread() OVERRIDE { } - virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE { } + virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE { } virtual void releaseContentsTexturesOnImplThread() OVERRIDE { } protected: diff --git a/cc/CCLayerTreeHost.cpp b/cc/CCLayerTreeHost.cpp index 3f4b0dc..a4090a4 100644 --- a/cc/CCLayerTreeHost.cpp +++ b/cc/CCLayerTreeHost.cpp @@ -134,9 +134,9 @@ CCLayerTreeHost::~CCLayerTreeHost() m_rootLayer->setLayerTreeHost(0); ASSERT(CCProxy::isMainThread()); TRACE_EVENT0("cc", "CCLayerTreeHost::~CCLayerTreeHost"); - ASSERT(m_proxy); + ASSERT(m_proxy.get()); m_proxy->stop(); - m_proxy.clear(); + m_proxy.reset(); numLayerTreeInstances--; RateLimiterMap::iterator it = m_rateLimiters.begin(); if (it != m_rateLimiters.end()) @@ -380,10 +380,10 @@ bool CCLayerTreeHost::commitRequested() const return m_proxy->commitRequested(); } -void CCLayerTreeHost::setAnimationEvents(PassOwnPtr<CCAnimationEventsVector> events, double wallClockTime) +void CCLayerTreeHost::setAnimationEvents(scoped_ptr<CCAnimationEventsVector> events, double wallClockTime) { ASSERT(CCThreadProxy::isMainThread()); - setAnimationEventsRecursive(*events, m_rootLayer.get(), wallClockTime); + setAnimationEventsRecursive(*events.get(), m_rootLayer.get(), wallClockTime); } void CCLayerTreeHost::didAddAnimation() @@ -758,8 +758,8 @@ void CCLayerTreeHost::startRateLimiter(WebKit::WebGraphicsContext3D* context) it->second->start(); #endif else { - RefPtr<RateLimiter> rateLimiter = RateLimiter::create(context, this); - m_rateLimiters.set(context, rateLimiter); + scoped_refptr<RateLimiter> rateLimiter = RateLimiter::create(context, this); + m_rateLimiters[context] = rateLimiter; rateLimiter->start(); } } @@ -773,7 +773,7 @@ void CCLayerTreeHost::stopRateLimiter(WebKit::WebGraphicsContext3D* context) #else it->second->stop(); #endif - m_rateLimiters.remove(it); + m_rateLimiters.erase(it); } } @@ -798,9 +798,9 @@ bool CCLayerTreeHost::requestPartialTextureUpdate() return true; } -void CCLayerTreeHost::deleteTextureAfterCommit(PassOwnPtr<CCPrioritizedTexture> texture) +void CCLayerTreeHost::deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture> texture) { - m_deleteTextureAfterCommitList.append(texture); + m_deleteTextureAfterCommitList.append(texture.Pass()); } void CCLayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) diff --git a/cc/CCLayerTreeHost.h b/cc/CCLayerTreeHost.h index 4eccef2..4c73ade 100644 --- a/cc/CCLayerTreeHost.h +++ b/cc/CCLayerTreeHost.h @@ -6,9 +6,9 @@ #define CCLayerTreeHost_h #include "base/basictypes.h" +#include "base/hash_tables.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "cc/own_ptr_vector.h" #include "CCAnimationEvents.h" #include "CCGraphicsContext.h" #include "CCLayerTreeHostClient.h" @@ -19,11 +19,20 @@ #include "CCRenderingStats.h" #include "IntRect.h" #include "RateLimiter.h" +#include "scoped_ptr_vector.h" #include "SkColor.h" #include <limits> -#include <wtf/HashMap.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> + +#if defined(COMPILER_GCC) +namespace BASE_HASH_NAMESPACE { +template<> +struct hash<WebKit::WebGraphicsContext3D*> { + size_t operator()(WebKit::WebGraphicsContext3D* ptr) const { + return hash<size_t>()(reinterpret_cast<size_t>(ptr)); + } +}; +} // namespace BASE_HASH_NAMESPACE +#endif // COMPILER namespace cc { @@ -147,7 +156,7 @@ public: void setNeedsRedraw(); bool commitRequested() const; - void setAnimationEvents(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime); + void setAnimationEvents(scoped_ptr<CCAnimationEventsVector>, double wallClockTime); virtual void didAddAnimation(); LayerChromium* rootLayer() { return m_rootLayer.get(); } @@ -200,7 +209,7 @@ public: bool bufferedUpdates(); bool requestPartialTextureUpdate(); - void deleteTextureAfterCommit(PassOwnPtr<CCPrioritizedTexture>); + void deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture>); void setDeviceScaleFactor(float); float deviceScaleFactor() const { return m_deviceScaleFactor; } @@ -241,7 +250,7 @@ private: int m_commitNumber; CCRenderingStats m_renderingStats; - OwnPtr<CCProxy> m_proxy; + scoped_ptr<CCProxy> m_proxy; bool m_rendererInitialized; bool m_contextLost; int m_numTimesRecreateShouldFail; @@ -251,8 +260,8 @@ private: scoped_refptr<HeadsUpDisplayLayerChromium> m_hudLayer; scoped_ptr<CCFontAtlas> m_fontAtlas; - OwnPtr<CCPrioritizedTextureManager> m_contentsTextureManager; - OwnPtr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder; + scoped_ptr<CCPrioritizedTextureManager> m_contentsTextureManager; + scoped_ptr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder; CCLayerTreeSettings m_settings; @@ -262,7 +271,7 @@ private: bool m_visible; - typedef HashMap<WebKit::WebGraphicsContext3D*, RefPtr<RateLimiter> > RateLimiterMap; + typedef base::hash_map<WebKit::WebGraphicsContext3D*, scoped_refptr<RateLimiter> > RateLimiterMap; RateLimiterMap m_rateLimiters; float m_pageScaleFactor; @@ -272,7 +281,7 @@ private: SkColor m_backgroundColor; bool m_hasTransparentBackground; - typedef OwnPtrVector<CCPrioritizedTexture> TextureList; + typedef ScopedPtrVector<CCPrioritizedTexture> TextureList; TextureList m_deleteTextureAfterCommitList; size_t m_partialTextureUpdateRequests; diff --git a/cc/CCLayerTreeHostImpl.cpp b/cc/CCLayerTreeHostImpl.cpp index 24701c7..e89811a 100644 --- a/cc/CCLayerTreeHostImpl.cpp +++ b/cc/CCLayerTreeHostImpl.cpp @@ -1232,13 +1232,13 @@ void CCLayerTreeHostImpl::animateLayers(double monotonicTime, double wallClockTi TRACE_EVENT0("cc", "CCLayerTreeHostImpl::animateLayers"); - OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector)); + scoped_ptr<CCAnimationEventsVector> events(make_scoped_ptr(new CCAnimationEventsVector)); bool didAnimate = false; animateLayersRecursive(m_rootLayerImpl.get(), monotonicTime, wallClockTime, events.get(), didAnimate, m_needsAnimateLayers); if (!events->empty()) - m_client->postAnimationEventsToMainThreadOnImplThread(events.release(), wallClockTime); + m_client->postAnimationEventsToMainThreadOnImplThread(events.Pass(), wallClockTime); if (didAnimate) m_client->setNeedsRedrawOnImplThread(); diff --git a/cc/CCLayerTreeHostImpl.h b/cc/CCLayerTreeHostImpl.h index 7952d18..785464d 100644 --- a/cc/CCLayerTreeHostImpl.h +++ b/cc/CCLayerTreeHostImpl.h @@ -41,7 +41,7 @@ public: virtual void onCanDrawStateChanged(bool canDraw) = 0; virtual void setNeedsRedrawOnImplThread() = 0; virtual void setNeedsCommitOnImplThread() = 0; - virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) = 0; + virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector>, double wallClockTime) = 0; virtual void releaseContentsTexturesOnImplThread() = 0; }; diff --git a/cc/CCLayerTreeHostImplTest.cpp b/cc/CCLayerTreeHostImplTest.cpp index 3450ba3..f6bcdcb 100644 --- a/cc/CCLayerTreeHostImplTest.cpp +++ b/cc/CCLayerTreeHostImplTest.cpp @@ -71,7 +71,7 @@ public: virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE { m_onCanDrawStateChangedCalled = true; } virtual void setNeedsRedrawOnImplThread() OVERRIDE { m_didRequestRedraw = true; } virtual void setNeedsCommitOnImplThread() OVERRIDE { m_didRequestCommit = true; } - virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE { } + virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE { } virtual void releaseContentsTexturesOnImplThread() OVERRIDE { } scoped_ptr<CCLayerTreeHostImpl> createLayerTreeHost(bool partialSwap, scoped_ptr<CCGraphicsContext> graphicsContext, PassOwnPtr<CCLayerImpl> rootPtr) diff --git a/cc/CCLayerTreeHostTest.cpp b/cc/CCLayerTreeHostTest.cpp index 1bc669e..0a79ea2 100644 --- a/cc/CCLayerTreeHostTest.cpp +++ b/cc/CCLayerTreeHostTest.cpp @@ -2401,7 +2401,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestSurfaceNotAllocatedForLayersOu class EvictionTrackingTexture : public LayerTextureUpdater::Texture { public: - static PassOwnPtr<EvictionTrackingTexture> create(PassOwnPtr<CCPrioritizedTexture> texture) { return adoptPtr(new EvictionTrackingTexture(texture)); } + static PassOwnPtr<EvictionTrackingTexture> create(scoped_ptr<CCPrioritizedTexture> texture) { return adoptPtr(new EvictionTrackingTexture(texture.Pass())); } virtual ~EvictionTrackingTexture() { } virtual void updateRect(CCResourceProvider* resourceProvider, const IntRect&, const IntSize&) OVERRIDE @@ -2414,8 +2414,8 @@ public: bool updated() const { return m_updated; } private: - explicit EvictionTrackingTexture(PassOwnPtr<CCPrioritizedTexture> texture) - : LayerTextureUpdater::Texture(texture) + explicit EvictionTrackingTexture(scoped_ptr<CCPrioritizedTexture> texture) + : LayerTextureUpdater::Texture(texture.Pass()) , m_updated(false) { } bool m_updated; diff --git a/cc/CCPrioritizedTexture.h b/cc/CCPrioritizedTexture.h index 519934f..3196867 100644 --- a/cc/CCPrioritizedTexture.h +++ b/cc/CCPrioritizedTexture.h @@ -6,6 +6,7 @@ #define CCPrioritizedTexture_h #include "base/basictypes.h" +#include "base/memory/scoped_ptr.h" #include "CCPriorityCalculator.h" #include "CCResourceProvider.h" #include "CCTexture.h" @@ -19,13 +20,13 @@ class CCPrioritizedTextureManager; class CCPrioritizedTexture { public: - static PassOwnPtr<CCPrioritizedTexture> create(CCPrioritizedTextureManager* manager, IntSize size, GC3Denum format) + static scoped_ptr<CCPrioritizedTexture> create(CCPrioritizedTextureManager* manager, IntSize size, GC3Denum format) { - return adoptPtr(new CCPrioritizedTexture(manager, size, format)); + return make_scoped_ptr(new CCPrioritizedTexture(manager, size, format)); } - static PassOwnPtr<CCPrioritizedTexture> create(CCPrioritizedTextureManager* manager) + static scoped_ptr<CCPrioritizedTexture> create(CCPrioritizedTextureManager* manager) { - return adoptPtr(new CCPrioritizedTexture(manager, IntSize(), 0)); + return make_scoped_ptr(new CCPrioritizedTexture(manager, IntSize(), 0)); } ~CCPrioritizedTexture(); diff --git a/cc/CCPrioritizedTextureManager.h b/cc/CCPrioritizedTextureManager.h index 88a4f45..432322f 100644 --- a/cc/CCPrioritizedTextureManager.h +++ b/cc/CCPrioritizedTextureManager.h @@ -6,6 +6,7 @@ #define CCPrioritizedTextureManager_h #include "base/basictypes.h" +#include "base/memory/scoped_ptr.h" #include "CCPrioritizedTexture.h" #include "CCPriorityCalculator.h" #include "CCTexture.h" @@ -23,13 +24,13 @@ class CCPriorityCalculator; class CCPrioritizedTextureManager { public: - static PassOwnPtr<CCPrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool) + static scoped_ptr<CCPrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool) { - return adoptPtr(new CCPrioritizedTextureManager(maxMemoryLimitBytes, maxTextureSize, pool)); + return make_scoped_ptr(new CCPrioritizedTextureManager(maxMemoryLimitBytes, maxTextureSize, pool)); } - PassOwnPtr<CCPrioritizedTexture> createTexture(IntSize size, GC3Denum format) + scoped_ptr<CCPrioritizedTexture> createTexture(IntSize size, GC3Denum format) { - return adoptPtr(new CCPrioritizedTexture(this, size, format)); + return make_scoped_ptr(new CCPrioritizedTexture(this, size, format)); } ~CCPrioritizedTextureManager(); diff --git a/cc/CCPrioritizedTextureTest.cpp b/cc/CCPrioritizedTextureTest.cpp index 04d5ab3..68d26f5 100644 --- a/cc/CCPrioritizedTextureTest.cpp +++ b/cc/CCPrioritizedTextureTest.cpp @@ -43,12 +43,12 @@ public: return CCTexture::memorySizeBytes(m_textureSize, m_textureFormat) * textureCount; } - PassOwnPtr<CCPrioritizedTextureManager> createManager(size_t maxTextures) + scoped_ptr<CCPrioritizedTextureManager> createManager(size_t maxTextures) { return CCPrioritizedTextureManager::create(texturesMemorySize(maxTextures), 1024, 0); } - bool validateTexture(OwnPtr<CCPrioritizedTexture>& texture, bool requestLate) + bool validateTexture(scoped_ptr<CCPrioritizedTexture>& texture, bool requestLate) { textureManagerAssertInvariants(texture->textureManager()); if (requestLate) @@ -106,10 +106,10 @@ namespace { TEST_F(CCPrioritizedTextureTest, requestTextureExceedingMaxLimit) { const size_t maxTextures = 8; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); // Create textures for double our memory limit. - OwnPtr<CCPrioritizedTexture> textures[maxTextures*2]; + scoped_ptr<CCPrioritizedTexture> textures[maxTextures*2]; for (size_t i = 0; i < maxTextures*2; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -146,8 +146,8 @@ TEST_F(CCPrioritizedTextureTest, requestTextureExceedingMaxLimit) TEST_F(CCPrioritizedTextureTest, changeMemoryLimits) { const size_t maxTextures = 8; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); - OwnPtr<CCPrioritizedTexture> textures[maxTextures]; + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTexture> textures[maxTextures]; for (size_t i = 0; i < maxTextures; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -201,9 +201,9 @@ TEST_F(CCPrioritizedTextureTest, textureManagerPartialUpdateTextures) { const size_t maxTextures = 4; const size_t numTextures = 4; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); - OwnPtr<CCPrioritizedTexture> textures[numTextures]; - OwnPtr<CCPrioritizedTexture> moreTextures[numTextures]; + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTexture> textures[numTextures]; + scoped_ptr<CCPrioritizedTexture> moreTextures[numTextures]; for (size_t i = 0; i < numTextures; ++i) { textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -260,8 +260,8 @@ TEST_F(CCPrioritizedTextureTest, textureManagerPartialUpdateTextures) TEST_F(CCPrioritizedTextureTest, textureManagerPrioritiesAreEqual) { const size_t maxTextures = 16; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); - OwnPtr<CCPrioritizedTexture> textures[maxTextures]; + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTexture> textures[maxTextures]; for (size_t i = 0; i < maxTextures; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -299,8 +299,8 @@ TEST_F(CCPrioritizedTextureTest, textureManagerPrioritiesAreEqual) TEST_F(CCPrioritizedTextureTest, textureManagerDestroyedFirst) { - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(1); - OwnPtr<CCPrioritizedTexture> texture = textureManager->createTexture(m_textureSize, m_textureFormat); + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(1); + scoped_ptr<CCPrioritizedTexture> texture = textureManager->createTexture(m_textureSize, m_textureFormat); // Texture is initially invalid, but it will become available. EXPECT_FALSE(texture->haveBackingTexture()); @@ -316,7 +316,7 @@ TEST_F(CCPrioritizedTextureTest, textureManagerDestroyedFirst) DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBlocked; textureManager->clearAllMemory(resourceProvider()); } - textureManager.clear(); + textureManager.reset(); EXPECT_FALSE(texture->canAcquireBackingTexture()); EXPECT_FALSE(texture->haveBackingTexture()); @@ -324,9 +324,9 @@ TEST_F(CCPrioritizedTextureTest, textureManagerDestroyedFirst) TEST_F(CCPrioritizedTextureTest, textureMovedToNewManager) { - OwnPtr<CCPrioritizedTextureManager> textureManagerOne = createManager(1); - OwnPtr<CCPrioritizedTextureManager> textureManagerTwo = createManager(1); - OwnPtr<CCPrioritizedTexture> texture = textureManagerOne->createTexture(m_textureSize, m_textureFormat); + scoped_ptr<CCPrioritizedTextureManager> textureManagerOne = createManager(1); + scoped_ptr<CCPrioritizedTextureManager> textureManagerTwo = createManager(1); + scoped_ptr<CCPrioritizedTexture> texture = textureManagerOne->createTexture(m_textureSize, m_textureFormat); // Texture is initially invalid, but it will become available. EXPECT_FALSE(texture->haveBackingTexture()); @@ -344,7 +344,7 @@ TEST_F(CCPrioritizedTextureTest, textureMovedToNewManager) DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBlocked; textureManagerOne->clearAllMemory(resourceProvider()); } - textureManagerOne.clear(); + textureManagerOne.reset(); EXPECT_FALSE(texture->canAcquireBackingTexture()); EXPECT_FALSE(texture->haveBackingTexture()); @@ -364,15 +364,15 @@ TEST_F(CCPrioritizedTextureTest, textureMovedToNewManager) TEST_F(CCPrioritizedTextureTest, renderSurfacesReduceMemoryAvailableOutsideRootSurface) { const size_t maxTextures = 8; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); // Half of the memory is taken by surfaces (with high priority place-holder) - OwnPtr<CCPrioritizedTexture> renderSurfacePlaceHolder = textureManager->createTexture(m_textureSize, m_textureFormat); + scoped_ptr<CCPrioritizedTexture> renderSurfacePlaceHolder = textureManager->createTexture(m_textureSize, m_textureFormat); renderSurfacePlaceHolder->setToSelfManagedMemoryPlaceholder(texturesMemorySize(4)); renderSurfacePlaceHolder->setRequestPriority(CCPriorityCalculator::renderSurfacePriority()); // Create textures to fill our memory limit. - OwnPtr<CCPrioritizedTexture> textures[maxTextures]; + scoped_ptr<CCPrioritizedTexture> textures[maxTextures]; for (size_t i = 0; i < maxTextures; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -410,15 +410,15 @@ TEST_F(CCPrioritizedTextureTest, renderSurfacesReduceMemoryAvailableOutsideRootS TEST_F(CCPrioritizedTextureTest, renderSurfacesReduceMemoryAvailableForRequestLate) { const size_t maxTextures = 8; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); // Half of the memory is taken by surfaces (with high priority place-holder) - OwnPtr<CCPrioritizedTexture> renderSurfacePlaceHolder = textureManager->createTexture(m_textureSize, m_textureFormat); + scoped_ptr<CCPrioritizedTexture> renderSurfacePlaceHolder = textureManager->createTexture(m_textureSize, m_textureFormat); renderSurfacePlaceHolder->setToSelfManagedMemoryPlaceholder(texturesMemorySize(4)); renderSurfacePlaceHolder->setRequestPriority(CCPriorityCalculator::renderSurfacePriority()); // Create textures to fill our memory limit. - OwnPtr<CCPrioritizedTexture> textures[maxTextures]; + scoped_ptr<CCPrioritizedTexture> textures[maxTextures]; for (size_t i = 0; i < maxTextures; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -447,15 +447,15 @@ TEST_F(CCPrioritizedTextureTest, renderSurfacesReduceMemoryAvailableForRequestLa TEST_F(CCPrioritizedTextureTest, whenRenderSurfaceNotAvailableTexturesAlsoNotAvailable) { const size_t maxTextures = 8; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); // Half of the memory is taken by surfaces (with high priority place-holder) - OwnPtr<CCPrioritizedTexture> renderSurfacePlaceHolder = textureManager->createTexture(m_textureSize, m_textureFormat); + scoped_ptr<CCPrioritizedTexture> renderSurfacePlaceHolder = textureManager->createTexture(m_textureSize, m_textureFormat); renderSurfacePlaceHolder->setToSelfManagedMemoryPlaceholder(texturesMemorySize(4)); renderSurfacePlaceHolder->setRequestPriority(CCPriorityCalculator::renderSurfacePriority()); // Create textures to fill our memory limit. - OwnPtr<CCPrioritizedTexture> textures[maxTextures]; + scoped_ptr<CCPrioritizedTexture> textures[maxTextures]; for (size_t i = 0; i < maxTextures; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); @@ -487,11 +487,11 @@ TEST_F(CCPrioritizedTextureTest, whenRenderSurfaceNotAvailableTexturesAlsoNotAva TEST_F(CCPrioritizedTextureTest, requestLateBackingsSorting) { const size_t maxTextures = 8; - OwnPtr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); + scoped_ptr<CCPrioritizedTextureManager> textureManager = createManager(maxTextures); textureManager->setMaxMemoryLimitBytes(texturesMemorySize(maxTextures)); // Create textures to fill our memory limit. - OwnPtr<CCPrioritizedTexture> textures[maxTextures]; + scoped_ptr<CCPrioritizedTexture> textures[maxTextures]; for (size_t i = 0; i < maxTextures; ++i) textures[i] = textureManager->createTexture(m_textureSize, m_textureFormat); diff --git a/cc/CCSingleThreadProxy.cpp b/cc/CCSingleThreadProxy.cpp index 6e342a0..42451e1 100644 --- a/cc/CCSingleThreadProxy.cpp +++ b/cc/CCSingleThreadProxy.cpp @@ -18,9 +18,9 @@ using namespace WTF; namespace cc { -PassOwnPtr<CCProxy> CCSingleThreadProxy::create(CCLayerTreeHost* layerTreeHost) +scoped_ptr<CCProxy> CCSingleThreadProxy::create(CCLayerTreeHost* layerTreeHost) { - return adoptPtr(new CCSingleThreadProxy(layerTreeHost)); + return make_scoped_ptr(new CCSingleThreadProxy(layerTreeHost)).PassAs<CCProxy>(); } CCSingleThreadProxy::CCSingleThreadProxy(CCLayerTreeHost* layerTreeHost) @@ -272,11 +272,11 @@ void CCSingleThreadProxy::setNeedsCommitOnImplThread() m_layerTreeHost->scheduleComposite(); } -void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector> events, double wallClockTime) +void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector> events, double wallClockTime) { ASSERT(CCProxy::isImplThread()); DebugScopedSetMainThread main; - m_layerTreeHost->setAnimationEvents(events, wallClockTime); + m_layerTreeHost->setAnimationEvents(events.Pass(), wallClockTime); } void CCSingleThreadProxy::releaseContentsTexturesOnImplThread() diff --git a/cc/CCSingleThreadProxy.h b/cc/CCSingleThreadProxy.h index ce7c0b4..979dbb3 100644 --- a/cc/CCSingleThreadProxy.h +++ b/cc/CCSingleThreadProxy.h @@ -10,7 +10,6 @@ #include "CCProxy.h" #include <base/time.h> #include <limits> -#include <wtf/OwnPtr.h> namespace cc { @@ -18,7 +17,7 @@ class CCLayerTreeHost; class CCSingleThreadProxy : public CCProxy, CCLayerTreeHostImplClient { public: - static PassOwnPtr<CCProxy> create(CCLayerTreeHost*); + static scoped_ptr<CCProxy> create(CCLayerTreeHost*); virtual ~CCSingleThreadProxy(); // CCProxy implementation @@ -52,7 +51,7 @@ public: virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE { } virtual void setNeedsRedrawOnImplThread() OVERRIDE; virtual void setNeedsCommitOnImplThread() OVERRIDE; - virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE; + virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE; virtual void releaseContentsTexturesOnImplThread() OVERRIDE; // Called by the legacy path where RenderWidget does the scheduling. diff --git a/cc/CCTextureUpdateControllerTest.cpp b/cc/CCTextureUpdateControllerTest.cpp index 610e6d3..f74ee8e 100644 --- a/cc/CCTextureUpdateControllerTest.cpp +++ b/cc/CCTextureUpdateControllerTest.cpp @@ -65,8 +65,8 @@ private: class TextureForUploadTest : public LayerTextureUpdater::Texture { public: - TextureForUploadTest() - : LayerTextureUpdater::Texture(nullptr) + TextureForUploadTest() + : LayerTextureUpdater::Texture(scoped_ptr<CCPrioritizedTexture>()) , m_evicted(false) { } diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp index 3c5f9b6..37d86a9 100644 --- a/cc/CCThreadProxy.cpp +++ b/cc/CCThreadProxy.cpp @@ -31,9 +31,9 @@ static const double contextRecreationTickRate = 0.03; namespace cc { -PassOwnPtr<CCProxy> CCThreadProxy::create(CCLayerTreeHost* layerTreeHost) +scoped_ptr<CCProxy> CCThreadProxy::create(CCLayerTreeHost* layerTreeHost) { - return adoptPtr(new CCThreadProxy(layerTreeHost)); + return make_scoped_ptr(new CCThreadProxy(layerTreeHost)).PassAs<CCProxy>(); } CCThreadProxy::CCThreadProxy(CCLayerTreeHost* layerTreeHost) @@ -343,11 +343,11 @@ void CCThreadProxy::setNeedsForcedCommitOnImplThread() m_schedulerOnImplThread->setNeedsForcedCommit(); } -void CCThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector> events, double wallClockTime) +void CCThreadProxy::postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector> events, double wallClockTime) { ASSERT(isImplThread()); TRACE_EVENT0("cc", "CCThreadProxy::postAnimationEventsToMainThreadOnImplThread"); - m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::setAnimationEvents, events, wallClockTime)); + m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::setAnimationEvents, events.release(), wallClockTime)); } void CCThreadProxy::releaseContentsTexturesOnImplThread() @@ -817,13 +817,15 @@ void CCThreadProxy::didCompleteSwapBuffers() m_layerTreeHost->didCompleteSwapBuffers(); } -void CCThreadProxy::setAnimationEvents(PassOwnPtr<CCAnimationEventsVector> events, double wallClockTime) +void CCThreadProxy::setAnimationEvents(CCAnimationEventsVector* passed_events, double wallClockTime) { + scoped_ptr<CCAnimationEventsVector> events(make_scoped_ptr(passed_events)); + TRACE_EVENT0("cc", "CCThreadProxy::setAnimationEvents"); ASSERT(isMainThread()); if (!m_layerTreeHost) return; - m_layerTreeHost->setAnimationEvents(events, wallClockTime); + m_layerTreeHost->setAnimationEvents(events.Pass(), wallClockTime); } class CCThreadProxyContextRecreationTimer : public CCTimer, CCTimerClient { diff --git a/cc/CCThreadProxy.h b/cc/CCThreadProxy.h index 698c48a..beb448b 100644 --- a/cc/CCThreadProxy.h +++ b/cc/CCThreadProxy.h @@ -26,7 +26,7 @@ class CCThreadProxyContextRecreationTimer; class CCThreadProxy : public CCProxy, CCLayerTreeHostImplClient, CCSchedulerClient, CCTextureUpdateControllerClient { public: - static PassOwnPtr<CCProxy> create(CCLayerTreeHost*); + static scoped_ptr<CCProxy> create(CCLayerTreeHost*); virtual ~CCThreadProxy(); @@ -61,7 +61,7 @@ public: virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; virtual void setNeedsRedrawOnImplThread() OVERRIDE; virtual void setNeedsCommitOnImplThread() OVERRIDE; - virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE; + virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE; virtual void releaseContentsTexturesOnImplThread() OVERRIDE; // CCSchedulerClient implementation @@ -96,7 +96,7 @@ private: void beginFrame(); void didCommitAndDrawFrame(); void didCompleteSwapBuffers(); - void setAnimationEvents(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime); + void setAnimationEvents(CCAnimationEventsVector*, double wallClockTime); void beginContextRecreation(); void tryToRecreateContext(); diff --git a/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp b/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp index 3ae8aef..adfcd07 100644 --- a/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp +++ b/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp @@ -36,8 +36,8 @@ static PassOwnPtr<SkCanvas> createAcceleratedCanvas(GrContext* grContext, return adoptPtr(new SkCanvas(device.get())); } -FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture(FrameBufferSkPictureCanvasLayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture) - : LayerTextureUpdater::Texture(texture) +FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture(FrameBufferSkPictureCanvasLayerTextureUpdater* textureUpdater, scoped_ptr<CCPrioritizedTexture> texture) + : LayerTextureUpdater::Texture(texture.Pass()) , m_textureUpdater(textureUpdater) { } diff --git a/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.h b/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.h index 77d1013..79093f2 100644 --- a/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.h +++ b/cc/FrameBufferSkPictureCanvasLayerTextureUpdater.h @@ -26,7 +26,7 @@ class FrameBufferSkPictureCanvasLayerTextureUpdater : public SkPictureCanvasLaye public: class Texture : public LayerTextureUpdater::Texture { public: - Texture(FrameBufferSkPictureCanvasLayerTextureUpdater*, PassOwnPtr<CCPrioritizedTexture>); + Texture(FrameBufferSkPictureCanvasLayerTextureUpdater*, scoped_ptr<CCPrioritizedTexture>); virtual ~Texture(); virtual void updateRect(CCResourceProvider*, const IntRect& sourceRect, const IntSize& destOffset) OVERRIDE; diff --git a/cc/ImageLayerChromium.cpp b/cc/ImageLayerChromium.cpp index ec1117a..c98796b 100644 --- a/cc/ImageLayerChromium.cpp +++ b/cc/ImageLayerChromium.cpp @@ -19,8 +19,8 @@ class ImageLayerTextureUpdater : public LayerTextureUpdater { public: class Texture : public LayerTextureUpdater::Texture { public: - Texture(ImageLayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture) - : LayerTextureUpdater::Texture(texture) + Texture(ImageLayerTextureUpdater* textureUpdater, scoped_ptr<CCPrioritizedTexture> texture) + : LayerTextureUpdater::Texture(texture.Pass()) , m_textureUpdater(textureUpdater) { } diff --git a/cc/LayerTextureUpdater.cpp b/cc/LayerTextureUpdater.cpp index ed61a35..d4e708f 100644 --- a/cc/LayerTextureUpdater.cpp +++ b/cc/LayerTextureUpdater.cpp @@ -8,8 +8,8 @@ namespace cc { -LayerTextureUpdater::Texture::Texture(PassOwnPtr<CCPrioritizedTexture> texture) - : m_texture(texture) +LayerTextureUpdater::Texture::Texture(scoped_ptr<CCPrioritizedTexture> texture) + : m_texture(texture.Pass()) { } diff --git a/cc/LayerTextureUpdater.h b/cc/LayerTextureUpdater.h index 0426bc4..89fc520 100644 --- a/cc/LayerTextureUpdater.h +++ b/cc/LayerTextureUpdater.h @@ -27,15 +27,15 @@ public: virtual ~Texture(); CCPrioritizedTexture* texture() { return m_texture.get(); } - void swapTextureWith(OwnPtr<CCPrioritizedTexture>& texture) { m_texture.swap(texture); } + void swapTextureWith(scoped_ptr<CCPrioritizedTexture>& texture) { m_texture.swap(texture); } virtual void prepareRect(const IntRect& /* sourceRect */, CCRenderingStats&) { } virtual void updateRect(CCResourceProvider*, const IntRect& sourceRect, const IntSize& destOffset) = 0; virtual bool backingResourceWasEvicted() const; protected: - explicit Texture(PassOwnPtr<CCPrioritizedTexture> texture); + explicit Texture(scoped_ptr<CCPrioritizedTexture> texture); private: - OwnPtr<CCPrioritizedTexture> m_texture; + scoped_ptr<CCPrioritizedTexture> m_texture; }; LayerTextureUpdater() diff --git a/cc/RateLimiter.cpp b/cc/RateLimiter.cpp index ddcce47..a521525 100644 --- a/cc/RateLimiter.cpp +++ b/cc/RateLimiter.cpp @@ -35,12 +35,12 @@ private: m_rateLimiter->rateLimitContext(); } - RefPtr<RateLimiter> m_rateLimiter; + scoped_refptr<RateLimiter> m_rateLimiter; }; -PassRefPtr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client) +scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client) { - return adoptRef(new RateLimiter(context, client)); + return make_scoped_refptr(new RateLimiter(context, client)); } RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client) @@ -48,7 +48,6 @@ RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClien , m_active(false) , m_client(client) { - turnOffVerifier(); ASSERT(context); } diff --git a/cc/RateLimiter.h b/cc/RateLimiter.h index 13c7915..7b48d74 100644 --- a/cc/RateLimiter.h +++ b/cc/RateLimiter.h @@ -7,8 +7,7 @@ #if USE(ACCELERATED_COMPOSITING) -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> +#include "base/memory/ref_counted.h" namespace WebKit { class WebGraphicsContext3D; @@ -25,10 +24,9 @@ public: // To use, construct a RateLimiter class around the context and call start() whenever calls are made on the // context outside of normal flow control. RateLimiter will block if the context is too far ahead of the // compositor. -class RateLimiter : public RefCounted<RateLimiter> { +class RateLimiter : public base::RefCounted<RateLimiter> { public: - static PassRefPtr<RateLimiter> create(WebKit::WebGraphicsContext3D*, RateLimiterClient*); - ~RateLimiter(); + static scoped_refptr<RateLimiter> create(WebKit::WebGraphicsContext3D*, RateLimiterClient*); void start(); @@ -37,6 +35,8 @@ public: private: RateLimiter(WebKit::WebGraphicsContext3D*, RateLimiterClient*); + ~RateLimiter(); + friend class base::RefCounted<RateLimiter>; class Task; friend class Task; diff --git a/cc/TiledLayerChromium.cpp b/cc/TiledLayerChromium.cpp index 1ab8f62..3b72f19 100644 --- a/cc/TiledLayerChromium.cpp +++ b/cc/TiledLayerChromium.cpp @@ -643,12 +643,12 @@ void TiledLayerChromium::setTexturePriorities(const CCPriorityCalculator& priori tile->dirtyRect = tileRect; LayerTextureUpdater::Texture* backBuffer = tile->texture(); setPriorityForTexture(visibleContentRect(), tile->dirtyRect, drawsToRoot, smallAnimatedLayer, backBuffer->texture()); - OwnPtr<CCPrioritizedTexture> frontBuffer = CCPrioritizedTexture::create(backBuffer->texture()->textureManager(), + scoped_ptr<CCPrioritizedTexture> frontBuffer = CCPrioritizedTexture::create(backBuffer->texture()->textureManager(), backBuffer->texture()->size(), backBuffer->texture()->format()); // Swap backBuffer into frontBuffer and add it to delete after commit queue. backBuffer->swapTextureWith(frontBuffer); - layerTreeHost()->deleteTextureAfterCommit(frontBuffer.release()); + layerTreeHost()->deleteTextureAfterCommit(frontBuffer.Pass()); } } } diff --git a/cc/TiledLayerChromiumTest.cpp b/cc/TiledLayerChromiumTest.cpp index 11de0c7..61728a3 100644 --- a/cc/TiledLayerChromiumTest.cpp +++ b/cc/TiledLayerChromiumTest.cpp @@ -165,7 +165,7 @@ public: CCRenderingStats m_stats; FakeTextureUploader m_uploader; CCPriorityCalculator m_priorityCalculator; - OwnPtr<CCPrioritizedTextureManager> m_textureManager; + scoped_ptr<CCPrioritizedTextureManager> m_textureManager; TestCCOcclusionTracker* m_occlusion; }; diff --git a/cc/test/CCTiledLayerTestCommon.cpp b/cc/test/CCTiledLayerTestCommon.cpp index 58ff0a5..bf528ca 100644 --- a/cc/test/CCTiledLayerTestCommon.cpp +++ b/cc/test/CCTiledLayerTestCommon.cpp @@ -10,8 +10,8 @@ using namespace cc; namespace WebKitTests { -FakeLayerTextureUpdater::Texture::Texture(FakeLayerTextureUpdater* layer, PassOwnPtr<CCPrioritizedTexture> texture) - : LayerTextureUpdater::Texture(texture) +FakeLayerTextureUpdater::Texture::Texture(FakeLayerTextureUpdater* layer, scoped_ptr<CCPrioritizedTexture> texture) + : LayerTextureUpdater::Texture(texture.Pass()) , m_layer(layer) { } diff --git a/cc/test/CCTiledLayerTestCommon.h b/cc/test/CCTiledLayerTestCommon.h index a3547ee..f2ffbf8 100644 --- a/cc/test/CCTiledLayerTestCommon.h +++ b/cc/test/CCTiledLayerTestCommon.h @@ -26,7 +26,7 @@ class FakeLayerTextureUpdater : public cc::LayerTextureUpdater { public: class Texture : public cc::LayerTextureUpdater::Texture { public: - Texture(FakeLayerTextureUpdater*, PassOwnPtr<cc::CCPrioritizedTexture>); + Texture(FakeLayerTextureUpdater*, scoped_ptr<cc::CCPrioritizedTexture>); virtual ~Texture(); virtual void updateRect(cc::CCResourceProvider* , const cc::IntRect&, const cc::IntSize&) OVERRIDE; |