diff options
author | bsalomon <bsalomon@google.com> | 2014-07-25 08:35:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-25 08:35:45 -0700 |
commit | 6d3fe022d68fd6dd32c0fab30e24fa5a4f048946 (patch) | |
tree | 7af60205eeb7a7644e1bf4a8edfa0b1545619b0a /include | |
parent | 570c392a0056115e103b42c373a61e4e152ea92c (diff) |
Rename GrGpuObject to GrGpuResource
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/418143004
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrContext.h | 10 | ||||
-rw-r--r-- | include/gpu/GrGpuResource.h (renamed from include/gpu/GrGpuObject.h) | 16 | ||||
-rw-r--r-- | include/gpu/GrSurface.h | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index a379f80be0..f533851ac3 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -90,9 +90,9 @@ public: * buffer, etc. references/IDs are now invalid. Should be called even when * GrContext is no longer going to be used for two reasons: * 1) ~GrContext will not try to free the objects in the 3D API. - * 2) If you've created GrGpuObjects that outlive the GrContext they will - * be marked as invalid (GrGpuObjects::isValid()) and won't attempt to - * free their underlying resource in the 3D API. + * 2) If you've created GrGpuResources that outlive the GrContext they + * will be marked as invalid (GrGpuResource::isValid()) and won't + * attempt to free their underlying resource in the 3D API. * Content drawn since the last GrContext::flush() may be lost. */ void contextLost(); @@ -185,14 +185,14 @@ public: /** * Stores a custom resource in the cache, based on the specified key. */ - void addResourceToCache(const GrResourceKey&, GrGpuObject*); + void addResourceToCache(const GrResourceKey&, GrGpuResource*); /** * Finds a resource in the cache, based on the specified key. This is intended for use in * conjunction with addResourceToCache(). The return value will be NULL if not found. The * caller must balance with a call to unref(). */ - GrGpuObject* findAndRefCachedResource(const GrResourceKey&); + GrGpuResource* findAndRefCachedResource(const GrResourceKey&); /** * Creates a new text rendering context that is optimal for the diff --git a/include/gpu/GrGpuObject.h b/include/gpu/GrGpuResource.h index 51cac1c1b9..127f64b903 100644 --- a/include/gpu/GrGpuObject.h +++ b/include/gpu/GrGpuResource.h @@ -5,8 +5,8 @@ * found in the LICENSE file. */ -#ifndef GrGpuObject_DEFINED -#define GrGpuObject_DEFINED +#ifndef GrGpuResource_DEFINED +#define GrGpuResource_DEFINED #include "SkInstCnt.h" #include "SkTInternalLList.h" @@ -18,9 +18,9 @@ class GrContext; /** * Base class for objects that can be kept in the GrResourceCache. */ -class GrGpuObject : public SkNoncopyable { +class GrGpuResource : public SkNoncopyable { public: - SK_DECLARE_INST_COUNT_ROOT(GrGpuObject) + SK_DECLARE_INST_COUNT_ROOT(GrGpuResource) // These method signatures are written to mirror SkRefCnt. However, we don't require // thread safety as GrCacheable objects are not intended to cross thread boundaries. @@ -89,8 +89,8 @@ public: uint32_t getUniqueID() const { return fUniqueID; } protected: - GrGpuObject(GrGpu*, bool isWrapped); - virtual ~GrGpuObject(); + GrGpuResource(GrGpu*, bool isWrapped); + virtual ~GrGpuResource(); bool isInCache() const { return NULL != fCacheEntry; } @@ -119,10 +119,10 @@ private: static uint32_t CreateUniqueID(); // We're in an internal doubly linked list - SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuObject); + SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); GrGpu* fGpu; // not reffed. The GrGpu can be deleted while there - // are still live GrGpuObjects. It will call + // are still live GrGpuResources. It will call // release() on all such objects in its destructor. enum Flags { /** diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h index a851c9e03c..6087ef44b3 100644 --- a/include/gpu/GrSurface.h +++ b/include/gpu/GrSurface.h @@ -10,14 +10,14 @@ #define GrSurface_DEFINED #include "GrTypes.h" -#include "GrGpuObject.h" +#include "GrGpuResource.h" #include "SkRect.h" class GrTexture; class GrRenderTarget; struct SkImageInfo; -class GrSurface : public GrGpuObject { +class GrSurface : public GrGpuResource { public: SK_DECLARE_INST_COUNT(GrSurface); @@ -144,7 +144,7 @@ protected: GrTextureDesc fDesc; private: - typedef GrGpuObject INHERITED; + typedef GrGpuResource INHERITED; }; #endif // GrSurface_DEFINED |