diff options
Diffstat (limited to 'gpu/GrGpu.h')
-rw-r--r-- | gpu/GrGpu.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/gpu/GrGpu.h b/gpu/GrGpu.h index c051f912..fc162370 100644 --- a/gpu/GrGpu.h +++ b/gpu/GrGpu.h @@ -13,11 +13,11 @@ #include "SkPath.h" class GrContext; +class GrGpuObject; class GrIndexBufferAllocPool; class GrPath; class GrPathRenderer; class GrPathRendererChain; -class GrResource; class GrStencilBuffer; class GrVertexBufferAllocPool; @@ -231,29 +231,28 @@ public: size_t rowBytes); /** - * Called to tell Gpu object that all GrResources have been lost and should + * Called to tell GrGpu that all GrGpuObjects have been lost and should * be abandoned. Overrides must call INHERITED::abandonResources(). */ virtual void abandonResources(); /** - * Called to tell Gpu object to release all GrResources. Overrides must call + * Called to tell GrGpu to release all GrGpuObjects. Overrides must call * INHERITED::releaseResources(). */ void releaseResources(); /** - * Add resource to list of resources. Should only be called by GrResource. + * Add object to list of objects. Should only be called by GrGpuObject. * @param resource the resource to add. */ - void insertResource(GrResource* resource); + void insertObject(GrGpuObject* object); /** - * Remove resource from list of resources. Should only be called by - * GrResource. + * Remove object from list of objects. Should only be called by GrGpuObject. * @param resource the resource to remove. */ - void removeResource(GrResource* resource); + void removeObject(GrGpuObject* object); // GrDrawTarget overrides virtual void clear(const SkIRect* rect, @@ -345,7 +344,7 @@ protected: case kLineStrip_GrPrimitiveType: return kDrawLines_DrawType; default: - GrCrash("Unexpected primitive type"); + SkFAIL("Unexpected primitive type"); return kDrawTriangles_DrawType; } } @@ -503,7 +502,7 @@ private: enum { kPreallocGeomPoolStateStackCnt = 4, }; - typedef SkTInternalLList<GrResource> ResourceList; + typedef SkTInternalLList<GrGpuObject> ObjectList; SkSTArray<kPreallocGeomPoolStateStackCnt, GeometryPoolState, true> fGeomPoolStateStack; ResetTimestamp fResetTimestamp; uint32_t fResetBits; @@ -516,7 +515,7 @@ private: mutable GrIndexBuffer* fQuadIndexBuffer; // Used to abandon/release all resources created by this GrGpu. TODO: Move this // functionality to GrResourceCache. - ResourceList fResourceList; + ObjectList fObjectList; typedef GrDrawTarget INHERITED; }; |