Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 4172543b5eca25fccb8d77cab7935706b3d21950..5da8ae26d6eb4e8e2748391bf8530042349ae394 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -32,6 +32,7 @@ class GrInOrderDrawBuffer; |
class GrLayerCache; |
class GrOvalRenderer; |
class GrPath; |
+class GrPathRange; |
class GrPathRenderer; |
class GrResourceEntry; |
class GrResourceCache; |
@@ -44,7 +45,9 @@ class GrVertexBuffer; |
class GrVertexBufferAllocPool; |
class GrStrokeInfo; |
class GrSoftwarePathRenderer; |
+class SkDescriptor; |
class SkStrokeRec; |
+class SkTypeface; |
class SK_API GrContext : public SkRefCnt { |
public: |
@@ -1064,6 +1067,35 @@ private: |
*/ |
GrPath* createPath(const SkPath& skPath, const SkStrokeRec& stroke); |
+ /** |
+ * Creates a range of glyph paths, indexed by glyph id. The glyphs will have an |
bsalomon
2014/09/15 14:16:21
Does this have to go here or can it go in the text
Chris Dalton
2014/09/15 21:05:25
I put it here because I thought it ought to follow
|
+ * inverted y-direction in order to match the raw font path data. |
+ * |
+ * @param SkTypeface Typeface that defines the glyphs. |
+ * If null, the default typeface will be used. |
+ * |
+ * @param SkDescriptor Additional font configuration that specifies the font's size, |
+ * stroke, and other flags. This will generally come from an |
+ * SkGlyphCache. |
+ * |
+ * It is recommended to leave this value null when possible, in |
+ * which case the glyphs will be loaded directly from the font's |
+ * raw path data and sized at SkPaint::kCanonicalTextSizeForPaths. |
+ * This results in less memory usage and more efficient GPU paths. |
+ * |
+ * If non-null, the glyph paths will match the font descriptor, |
+ * including with the stroke information baked directly into |
+ * the outlines. |
+ * |
+ * @param SkStrokeRec Common stroke that the GPU will apply to every path. Note |
+ * that if the glyph outlines contain strokes from the font |
+ * descriptor, this stroke will be applied on top of those |
+ * outlines. |
+ * |
+ * It is only legal to call this if the gpu supports path rendering. |
+ */ |
+ GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, const SkStrokeRec&); |
+ |
typedef SkRefCnt INHERITED; |
}; |