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

Unified Diff: include/gpu/GrContext.h

Issue 26557003: Add a GPU paths to resource cache of the context (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: a Created 7 years, 2 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
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 7716f9ae7c71c1fcea09d88772adfd578e5ab262..4fc4cf7254e6907538b37c7165dfc5d0df494131 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -29,6 +29,7 @@ class GrIndexBuffer;
class GrIndexBufferAllocPool;
class GrInOrderDrawBuffer;
class GrOvalRenderer;
+class GrPath;
class GrPathRenderer;
class GrResourceEntry;
class GrResourceCache;
@@ -263,6 +264,17 @@ public:
*/
void setMaxTextureSizeOverride(int maxTextureSizeOverride);
+ // Other resources
+
+ /** Creates a new gpu path, based on the specified path and stroke and returns it.
+ * The caller owns a ref on the returned path which must be balanced by a call to unref.
+ *
+ * @param skPath the path geometry.
+ * @param stroke the path stroke.
+ * @return a new path or NULL if the operation is not supported by the backend.
+ */
+ GrPath* createPath(const SkPath& skPath, const SkStrokeRec& stroke);
bsalomon 2013/10/18 13:25:24 I'm wondering if there is any way to avoid this as
Kimmo Kinnunen 2013/10/21 13:40:48 Done.
+
///////////////////////////////////////////////////////////////////////////
// Render targets
@@ -868,6 +880,7 @@ private:
GrDrawState* fDrawState;
GrResourceCache* fTextureCache;
+ GrResourceCache* fPathCache; // TODO: merge this with fTextureCache.
GrFontCache* fFontCache;
GrPathRendererChain* fPathRendererChain;
« include/core/SkPath.h ('K') | « include/core/SkStrokeRec.h ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698