[svg] Add light source classes and lighting-color pres attr
https://www.w3.org/TR/SVG11/filters.html#LightSourceDefinitions
The three classes represent light source elements that will eventually
be used for feSpecularLighting and feDiffuseLighting. Currently they are
unused.
Also added the (currently unused) lighting-color presentation attribute.
Bug: skia:10841
Change-Id: Ic7824671662b8cd88cf627affc54173d5e881b7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359557
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/modules/svg/src/SkSVGNode.cpp b/modules/svg/src/SkSVGNode.cpp
index fd2a4e3..ae3aef2 100644
--- a/modules/svg/src/SkSVGNode.cpp
+++ b/modules/svg/src/SkSVGNode.cpp
@@ -20,6 +20,7 @@
fPresentationAttributes.fStopOpacity.set(SkSVGNumberType(1.0f));
fPresentationAttributes.fFloodColor.set(SkSVGColor(SK_ColorBLACK));
fPresentationAttributes.fFloodOpacity.set(SkSVGNumberType(1.0f));
+ fPresentationAttributes.fLightingColor.set(SkSVGColor(SK_ColorWHITE));
}
SkSVGNode::~SkSVGNode() { }
@@ -103,6 +104,7 @@
|| PARSE_AND_SET("font-size" , FontSize)
|| PARSE_AND_SET("font-style" , FontStyle)
|| PARSE_AND_SET("font-weight" , FontWeight)
+ || PARSE_AND_SET("lighting-color" , LightingColor)
|| PARSE_AND_SET("mask" , Mask)
|| PARSE_AND_SET("opacity" , Opacity)
|| PARSE_AND_SET("stop-color" , StopColor)