aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRendering.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-10 09:14:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-10 09:14:17 -0700
commit6663acff010ce752e4bf778da81fa97448c9db31 (patch)
treeba48f7716f7ef948d9faac90599b8a555c0f51d3 /src/gpu/GrPathRendering.h
parent44d427e048b2e290e086dc2c9f9227818388ef17 (diff)
Replace GrStrokeInfo with GrStyle.
A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r--src/gpu/GrPathRendering.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index 8ee3d7b3e2..8eea3218ac 100644
--- a/src/gpu/GrPathRendering.h
+++ b/src/gpu/GrPathRendering.h
@@ -17,7 +17,7 @@ class SkDescriptor;
class SkTypeface;
class GrPath;
class GrStencilSettings;
-class GrStrokeInfo;
+class GrStyle;
/**
* Abstract class wrapping HW path rendering API.
@@ -81,21 +81,23 @@ public:
* 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.
+ * @param SkPath the geometry.
+ * @param GrStyle the style applied to the path. Styles with non-dash path effects are not
+ * allowed.
+ * @return a new GPU path object.
*/
- virtual GrPath* createPath(const SkPath&, const GrStrokeInfo&) = 0;
+ virtual GrPath* createPath(const SkPath&, const GrStyle&) = 0;
/**
- * Creates a range of gpu paths with a common stroke. The caller owns a ref on the
+ * Creates a range of gpu paths with a common style. The caller owns a ref on the
* returned path range which must be balanced by a call to unref.
*
* @param PathGenerator class that generates SkPath objects for each path in the range.
- * @param GrStrokeInfo the common stroke applied to each path in the range.
+ * @param GrStyle the common style applied to each path in the range. Styles with non-dash
+ * path effects are not allowed.
* @return a new path range.
*/
- virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, const GrStrokeInfo&) = 0;
+ virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, const GrStyle&) = 0;
/**
* Creates a range of glyph paths, indexed by glyph id. The glyphs will have an
@@ -118,15 +120,15 @@ public:
* including with the stroke information baked directly into
* the outlines.
*
- * @param GrStrokeInfo Common stroke that the GPU will apply to every path. Note that
- * if the glyph outlines contain baked-in strokes from the font
- * descriptor, the GPU stroke will be applied on top of those
+ * @param GrStyle Common style that the GPU will apply to every path. Note that
+ * if the glyph outlines contain baked-in styles from the font
+ * descriptor, the GPU style will be applied on top of those
* outlines.
*
* @return a new path range populated with glyphs.
*/
GrPathRange* createGlyphs(const SkTypeface*, const SkScalerContextEffects&,
- const SkDescriptor*, const GrStrokeInfo&);
+ const SkDescriptor*, const GrStyle&);
/** None of these params are optional, pointers used just to avoid making copies. */
struct StencilPathArgs {