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

Unified Diff: src/gpu/gl/GrGLPath.h

Issue 442603002: Calculate rough approximations for nvpr path sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « no previous file | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698