Chromium Code Reviews| Index: src/gpu/GrGpu.h |
| diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h |
| index 1ae2f5856bd4cfe8a521f9744991f26170c5793a..06f63872005fb9c0664707ccea4c09b07f36e81a 100644 |
| --- a/src/gpu/GrGpu.h |
| +++ b/src/gpu/GrGpu.h |
| @@ -21,6 +21,8 @@ class GrPathRenderer; |
| class GrPathRendererChain; |
| class GrStencilBuffer; |
| class GrVertexBufferAllocPool; |
| +class SkDescriptor; |
| +class SkTypeface; |
| class GrGpu : public GrDrawTarget { |
| public: |
| @@ -149,11 +151,33 @@ public: |
| GrPath* createPath(const SkPath& path, const SkStrokeRec& stroke); |
| /** |
| - * Creates a path range object that can be used to draw multiple paths via |
| - * drawPaths(). It is only legal to call this if the caps report support for |
| - * path rendering. |
| + * Creates a range of glyph paths, indexed by glyph id. The glyphs will have an |
|
bsalomon
2014/09/15 14:16:21
I'm wondering if the PR class should be accessible
Chris Dalton
2014/09/15 21:05:25
That could work, but I think createPath() ought to
|
| + * 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 caps report support for path rendering. |
| */ |
| - GrPathRange* createPathRange(size_t size, const SkStrokeRec&); |
| + GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, const SkStrokeRec&); |
| /** |
| * Returns an index buffer that can be used to render quads. |