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

Unified Diff: src/gpu/GrPathRendering.h

Issue 1957363002: Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
Patch Set: Fix issue where hairlines were going to MSAAPathRenderer Created 4 years, 7 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: src/gpu/GrPathRendering.h
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index 8ee3d7b3e24168e5640b6f9ee3055852a2f1a92e..8eea3218ac42091efa1c9828729a3a5cb0677612 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 {

Powered by Google App Engine
This is Rietveld 408576698