Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: src/gpu/GrGeometryBuffer.h

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGeometryBuffer.h
diff --git a/src/gpu/GrGeometryBuffer.h b/src/gpu/GrGeometryBuffer.h
index 3bb7118fafc9c5f3c277d4c53089e3ecd764c901..2a5aab7a23c456e7a7641ea55452c0475cffc51c 100644
--- a/src/gpu/GrGeometryBuffer.h
+++ b/src/gpu/GrGeometryBuffer.h
@@ -10,14 +10,14 @@
#ifndef GrGeometryBuffer_DEFINED
#define GrGeometryBuffer_DEFINED
-#include "GrResource.h"
+#include "GrGpuObject.h"
class GrGpu;
/**
* Parent class for vertex and index buffers
*/
-class GrGeometryBuffer : public GrResource {
+class GrGeometryBuffer : public GrGpuObject {
public:
SK_DECLARE_INST_COUNT(GrGeometryBuffer);
@@ -82,22 +82,22 @@ public:
*/
virtual bool updateData(const void* src, size_t srcSizeInBytes) = 0;
- // GrResource overrides
- virtual size_t sizeInBytes() const { return fSizeInBytes; }
+ // GrGpuObject overrides
+ virtual size_t gpuMemorySize() const { return fGpuMemorySize; }
protected:
- GrGeometryBuffer(GrGpu* gpu, bool isWrapped, size_t sizeInBytes, bool dynamic, bool cpuBacked)
+ GrGeometryBuffer(GrGpu* gpu, bool isWrapped, size_t gpuMemorySize, bool dynamic, bool cpuBacked)
: INHERITED(gpu, isWrapped)
- , fSizeInBytes(sizeInBytes)
+ , fGpuMemorySize(gpuMemorySize)
, fDynamic(dynamic)
, fCPUBacked(cpuBacked) {}
private:
- size_t fSizeInBytes;
+ size_t fGpuMemorySize;
bool fDynamic;
bool fCPUBacked;
- typedef GrResource INHERITED;
+ typedef GrGpuObject INHERITED;
};
#endif
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698