Index: src/gpu/gl/GrGLPath.h |
diff --git a/src/gpu/gl/GrGLPath.h b/src/gpu/gl/GrGLPath.h |
index 935a2e24ad090b641d54211f52b6b27cd644de25..7ce93c61e184cbc96247253003c1dfb2c0cb4c9f 100644 |
--- a/src/gpu/gl/GrGLPath.h |
+++ b/src/gpu/gl/GrGLPath.h |
@@ -22,17 +22,20 @@ class GrGpuGL; |
class GrGLPath : public GrPath { |
public: |
- static void InitPathObject(GrGpuGL*, |
- GrGLuint pathID, |
- const SkPath&, |
- const SkStrokeRec&); |
+ /** |
+ * Initialize a GL path object with a given path and stroke. |
+ * |
+ * @return the approximate GPU memory size of the path object in bytes. |
+ */ |
+ static size_t InitPathObject(GrGpuGL*, |
+ GrGLuint pathID, |
+ const SkPath&, |
+ const SkStrokeRec&); |
GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke); |
virtual ~GrGLPath(); |
GrGLuint pathID() const { return fPathID; } |
- // TODO: Figure out how to get an approximate size of the path in Gpu |
- // memory. |
- virtual size_t gpuMemorySize() const SK_OVERRIDE { return 100; } |
+ virtual size_t gpuMemorySize() const SK_OVERRIDE { return fGpuMemorySize; } |
protected: |
virtual void onRelease() SK_OVERRIDE; |
@@ -40,6 +43,7 @@ protected: |
private: |
GrGLuint fPathID; |
+ size_t fGpuMemorySize; |
typedef GrPath INHERITED; |
}; |