| Index: cc/prioritized_texture.h
|
| diff --git a/cc/prioritized_texture.h b/cc/prioritized_texture.h
|
| index 242147c2a8b82bedb313e8d1ff768cacafe75da0..ea1d7001c853de6303c0d5004fd11313836ed628 100644
|
| --- a/cc/prioritized_texture.h
|
| +++ b/cc/prioritized_texture.h
|
| @@ -16,24 +16,24 @@
|
|
|
| namespace cc {
|
|
|
| -class CCPrioritizedTextureManager;
|
| +class PrioritizedTextureManager;
|
|
|
| -class CCPrioritizedTexture {
|
| +class PrioritizedTexture {
|
| public:
|
| - static scoped_ptr<CCPrioritizedTexture> create(CCPrioritizedTextureManager* manager, IntSize size, GC3Denum format)
|
| + static scoped_ptr<PrioritizedTexture> create(PrioritizedTextureManager* manager, IntSize size, GC3Denum format)
|
| {
|
| - return make_scoped_ptr(new CCPrioritizedTexture(manager, size, format));
|
| + return make_scoped_ptr(new PrioritizedTexture(manager, size, format));
|
| }
|
| - static scoped_ptr<CCPrioritizedTexture> create(CCPrioritizedTextureManager* manager)
|
| + static scoped_ptr<PrioritizedTexture> create(PrioritizedTextureManager* manager)
|
| {
|
| - return make_scoped_ptr(new CCPrioritizedTexture(manager, IntSize(), 0));
|
| + return make_scoped_ptr(new PrioritizedTexture(manager, IntSize(), 0));
|
| }
|
| - ~CCPrioritizedTexture();
|
| + ~PrioritizedTexture();
|
|
|
| // Texture properties. Changing these causes the backing texture to be lost.
|
| // Setting these to the same value is a no-op.
|
| - void setTextureManager(CCPrioritizedTextureManager*);
|
| - CCPrioritizedTextureManager* textureManager() { return m_manager; }
|
| + void setTextureManager(PrioritizedTextureManager*);
|
| + PrioritizedTextureManager* textureManager() { return m_manager; }
|
| void setDimensions(IntSize, GC3Denum format);
|
| GC3Denum format() const { return m_format; }
|
| IntSize size() const { return m_size; }
|
| @@ -43,7 +43,7 @@ public:
|
| void setRequestPriority(int priority) { m_priority = priority; }
|
| int requestPriority() const { return m_priority; }
|
|
|
| - // After CCPrioritizedTexture::prioritizeTextures() is called, this returns
|
| + // After PrioritizedTexture::prioritizeTextures() is called, this returns
|
| // if the the request succeeded and this texture can be acquired for use.
|
| bool canAcquireBackingTexture() const { return m_isAbovePriorityCutoff; }
|
|
|
| @@ -57,7 +57,7 @@ public:
|
|
|
| // If canAcquireBackingTexture() is true acquireBackingTexture() will acquire
|
| // a backing texture for use. Call this whenever the texture is actually needed.
|
| - void acquireBackingTexture(CCResourceProvider*);
|
| + void acquireBackingTexture(ResourceProvider*);
|
|
|
| // FIXME: Request late is really a hack for when we are totally out of memory
|
| // (all textures are visible) but we can still squeeze into the limit
|
| @@ -69,9 +69,9 @@ public:
|
| bool requestLate();
|
|
|
| // Uploads pixels into the backing resource. This functions will aquire the backing if needed.
|
| - void upload(CCResourceProvider*, const uint8_t* image, const IntRect& imageRect, const IntRect& sourceRect, const IntSize& destOffset);
|
| + void upload(ResourceProvider*, const uint8_t* image, const IntRect& imageRect, const IntRect& sourceRect, const IntSize& destOffset);
|
|
|
| - CCResourceProvider::ResourceId resourceId() const;
|
| + ResourceProvider::ResourceId resourceId() const;
|
|
|
| // Self-managed textures are accounted for when prioritizing other textures,
|
| // but they are not allocated/recycled/deleted, so this needs to be done
|
| @@ -82,28 +82,28 @@ public:
|
| void setToSelfManagedMemoryPlaceholder(size_t bytes);
|
|
|
| private:
|
| - friend class CCPrioritizedTextureManager;
|
| - friend class CCPrioritizedTextureTest;
|
| + friend class PrioritizedTextureManager;
|
| + friend class PrioritizedTextureTest;
|
|
|
| - class Backing : public CCTexture {
|
| + class Backing : public Texture {
|
| public:
|
| - Backing(unsigned id, CCResourceProvider*, IntSize, GC3Denum format);
|
| + Backing(unsigned id, ResourceProvider*, IntSize, GC3Denum format);
|
| ~Backing();
|
| void updatePriority();
|
| void updateInDrawingImplTree();
|
|
|
| - CCPrioritizedTexture* owner() { return m_owner; }
|
| + PrioritizedTexture* owner() { return m_owner; }
|
| bool canBeRecycled() const;
|
| int requestPriorityAtLastPriorityUpdate() const { return m_priorityAtLastPriorityUpdate; }
|
| bool wasAbovePriorityCutoffAtLastPriorityUpdate() const { return m_wasAbovePriorityCutoffAtLastPriorityUpdate; }
|
| bool inDrawingImplTree() const { return m_inDrawingImplTree; }
|
|
|
| - void deleteResource(CCResourceProvider*);
|
| + void deleteResource(ResourceProvider*);
|
| bool resourceHasBeenDeleted() const;
|
|
|
| private:
|
| - friend class CCPrioritizedTexture;
|
| - CCPrioritizedTexture* m_owner;
|
| + friend class PrioritizedTexture;
|
| + PrioritizedTexture* m_owner;
|
| int m_priorityAtLastPriorityUpdate;
|
| bool m_wasAbovePriorityCutoffAtLastPriorityUpdate;
|
|
|
| @@ -112,17 +112,17 @@ private:
|
|
|
| bool m_resourceHasBeenDeleted;
|
| #ifndef NDEBUG
|
| - CCResourceProvider* m_resourceProvider;
|
| + ResourceProvider* m_resourceProvider;
|
| #endif
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Backing);
|
| };
|
|
|
| - CCPrioritizedTexture(CCPrioritizedTextureManager*, IntSize, GC3Denum format);
|
| + PrioritizedTexture(PrioritizedTextureManager*, IntSize, GC3Denum format);
|
|
|
| bool isAbovePriorityCutoff() { return m_isAbovePriorityCutoff; }
|
| void setAbovePriorityCutoff(bool isAbovePriorityCutoff) { m_isAbovePriorityCutoff = isAbovePriorityCutoff; }
|
| - void setManagerInternal(CCPrioritizedTextureManager* manager) { m_manager = manager; }
|
| + void setManagerInternal(PrioritizedTextureManager* manager) { m_manager = manager; }
|
|
|
| Backing* backing() const { return m_backing; }
|
| void link(Backing*);
|
| @@ -137,9 +137,9 @@ private:
|
| bool m_isSelfManaged;
|
|
|
| Backing* m_backing;
|
| - CCPrioritizedTextureManager* m_manager;
|
| + PrioritizedTextureManager* m_manager;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTexture);
|
| + DISALLOW_COPY_AND_ASSIGN(PrioritizedTexture);
|
| };
|
|
|
| } // namespace cc
|
|
|