Chromium Code Reviews| Index: cc/CCLayerTreeHost.h |
| diff --git a/cc/CCLayerTreeHost.h b/cc/CCLayerTreeHost.h |
| index 4eccef2091a3cf3747a09005ed58f7aca18f540e..4c73ade82563903bc6935c6735fd0f075f2d9408 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) |
|
jamesr
2012/10/07 19:31:09
hmm, why's this COMPILER_GCC guarded?
enne (OOO)
2012/10/07 19:33:54
I am not 100% sure (and maybe this is just cargo c
|
| +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; |