Towards NV path rendering

Review URL: http://codereview.appspot.com/6302049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4219 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLPath.h b/src/gpu/gl/GrGLPath.h
new file mode 100644
index 0000000..f9febb4
--- /dev/null
+++ b/src/gpu/gl/GrGLPath.h
@@ -0,0 +1,43 @@
+
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrGLPath_DEFINED
+#define GrGLPath_DEFINED
+
+#include "../GrPath.h"
+#include "gl/GrGLFunctions.h"
+
+class GrGpuGL;
+class SkPath;
+
+/**
+ * Currently this represents a path built using GL_NV_path_rendering. If we
+ * support other GL path extensions then this would have to have a type enum
+ * and/or be subclassed.
+ */
+
+class GrGLPath : public GrPath {
+public:
+    GrGLPath(GrGpuGL* gpu, const SkPath& path);
+    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 sizeInBytes() const SK_OVERRIDE { return 100; }
+
+protected:
+    virtual void onRelease() SK_OVERRIDE;
+    virtual void onAbandon() SK_OVERRIDE;
+
+private:
+    GrGLuint fPathID;
+
+    typedef GrPath INHERITED;
+};
+
+#endif