[svg] Initial mask plumbing
Introduce SkSVGMask and plumb related attributes.
Also consolidate the clip/mask/filter property types - they all support
the same values: <funciri>|none|inherit.
Bug: skia:10842
Change-Id: If45a75cccc19b84d6547237336fe5d562a85d594
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353436
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
diff --git a/modules/svg/src/SkSVGNode.cpp b/modules/svg/src/SkSVGNode.cpp
index 52d7eac..14b08ac 100644
--- a/modules/svg/src/SkSVGNode.cpp
+++ b/modules/svg/src/SkSVGNode.cpp
@@ -88,32 +88,33 @@
SkSVGAttributeParser::parseProperty<decltype(fPresentationAttributes.f##attrName)>( \
svgName, n, v))
- return PARSE_AND_SET( "clip-path" , ClipPath)
- || PARSE_AND_SET("clip-rule" , ClipRule)
- || PARSE_AND_SET("color" , Color)
- || PARSE_AND_SET("fill" , Fill)
- || PARSE_AND_SET("fill-opacity" , FillOpacity)
- || PARSE_AND_SET("fill-rule" , FillRule)
- || PARSE_AND_SET("filter" , Filter)
- || PARSE_AND_SET("flood-color" , FloodColor)
- || PARSE_AND_SET("flood-opacity" , FloodOpacity)
- || PARSE_AND_SET("font-family" , FontFamily)
- || PARSE_AND_SET("font-size" , FontSize)
- || PARSE_AND_SET("font-style" , FontStyle)
- || PARSE_AND_SET("font-weight" , FontWeight)
- || PARSE_AND_SET("opacity" , Opacity)
- || PARSE_AND_SET("stop-color" , StopColor)
- || PARSE_AND_SET("stop-opacity" , StopOpacity)
- || PARSE_AND_SET("stroke" , Stroke)
- || PARSE_AND_SET("stroke-dasharray" , StrokeDashArray)
- || PARSE_AND_SET("stroke-dashoffset", StrokeDashOffset)
- || PARSE_AND_SET("stroke-linecap" , StrokeLineCap)
- || PARSE_AND_SET("stroke-linejoin" , StrokeLineJoin)
- || PARSE_AND_SET("stroke-miterlimit", StrokeMiterLimit)
- || PARSE_AND_SET("stroke-opacity" , StrokeOpacity)
- || PARSE_AND_SET("stroke-width" , StrokeWidth)
- || PARSE_AND_SET("text-anchor" , TextAnchor)
- || PARSE_AND_SET("visibility" , Visibility);
+ return PARSE_AND_SET("clip-path" , ClipPath)
+ || PARSE_AND_SET("clip-rule" , ClipRule)
+ || PARSE_AND_SET("color" , Color)
+ || PARSE_AND_SET("fill" , Fill)
+ || PARSE_AND_SET("fill-opacity" , FillOpacity)
+ || PARSE_AND_SET("fill-rule" , FillRule)
+ || PARSE_AND_SET("filter" , Filter)
+ || PARSE_AND_SET("flood-color" , FloodColor)
+ || PARSE_AND_SET("flood-opacity" , FloodOpacity)
+ || PARSE_AND_SET("font-family" , FontFamily)
+ || PARSE_AND_SET("font-size" , FontSize)
+ || PARSE_AND_SET("font-style" , FontStyle)
+ || PARSE_AND_SET("font-weight" , FontWeight)
+ || PARSE_AND_SET("mask" , Mask)
+ || PARSE_AND_SET("opacity" , Opacity)
+ || PARSE_AND_SET("stop-color" , StopColor)
+ || PARSE_AND_SET("stop-opacity" , StopOpacity)
+ || PARSE_AND_SET("stroke" , Stroke)
+ || PARSE_AND_SET("stroke-dasharray" , StrokeDashArray)
+ || PARSE_AND_SET("stroke-dashoffset", StrokeDashOffset)
+ || PARSE_AND_SET("stroke-linecap" , StrokeLineCap)
+ || PARSE_AND_SET("stroke-linejoin" , StrokeLineJoin)
+ || PARSE_AND_SET("stroke-miterlimit", StrokeMiterLimit)
+ || PARSE_AND_SET("stroke-opacity" , StrokeOpacity)
+ || PARSE_AND_SET("stroke-width" , StrokeWidth)
+ || PARSE_AND_SET("text-anchor" , TextAnchor)
+ || PARSE_AND_SET("visibility" , Visibility);
#undef PARSE_AND_SET
}