[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/SkSVGFeLightSource.cpp b/modules/svg/src/SkSVGFeLightSource.cpp
new file mode 100644
index 0000000..f1f74af
--- /dev/null
+++ b/modules/svg/src/SkSVGFeLightSource.cpp
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2021 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "modules/svg/include/SkSVGAttributeParser.h"
+#include "modules/svg/include/SkSVGFeLightSource.h"
+#include "modules/svg/include/SkSVGValue.h"
+
+bool SkSVGFeDistantLight::parseAndSetAttribute(const char* n, const char* v) {
+    return INHERITED::parseAndSetAttribute(n, v) ||
+           this->setAzimuth(SkSVGAttributeParser::parse<SkSVGNumberType>("azimuth", n, v)) ||
+           this->setElevation(SkSVGAttributeParser::parse<SkSVGNumberType>("elevation", n, v));
+}
+
+bool SkSVGFePointLight::parseAndSetAttribute(const char* n, const char* v) {
+    return INHERITED::parseAndSetAttribute(n, v) ||
+           this->setX(SkSVGAttributeParser::parse<SkSVGNumberType>("x", n, v)) ||
+           this->setY(SkSVGAttributeParser::parse<SkSVGNumberType>("y", n, v)) ||
+           this->setZ(SkSVGAttributeParser::parse<SkSVGNumberType>("z", n, v));
+}
+
+bool SkSVGFeSpotLight::parseAndSetAttribute(const char* n, const char* v) {
+    return INHERITED::parseAndSetAttribute(n, v) ||
+           this->setX(SkSVGAttributeParser::parse<SkSVGNumberType>("x", n, v)) ||
+           this->setY(SkSVGAttributeParser::parse<SkSVGNumberType>("y", n, v)) ||
+           this->setZ(SkSVGAttributeParser::parse<SkSVGNumberType>("z", n, v)) ||
+           this->setPointsAtX(SkSVGAttributeParser::parse<SkSVGNumberType>("pointsAtX", n, v)) ||
+           this->setPointsAtY(SkSVGAttributeParser::parse<SkSVGNumberType>("pointsAtY", n, v)) ||
+           this->setPointsAtZ(SkSVGAttributeParser::parse<SkSVGNumberType>("pointsAtZ", n, v)) ||
+           this->setSpecularExponent(
+                   SkSVGAttributeParser::parse<SkSVGNumberType>("specularExponent", n, v)) ||
+           this->setLimitingConeAngle(
+                   SkSVGAttributeParser::parse<SkSVGNumberType>("limitingConeAngle", n, v));
+}