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

Unified Diff: experimental/svg/model/SkSVGNode.h

Issue 2327233003: [SVGDom] Initial linear gradient support (Closed)
Patch Set: cleanup Created 4 years, 3 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: experimental/svg/model/SkSVGNode.h
diff --git a/experimental/svg/model/SkSVGNode.h b/experimental/svg/model/SkSVGNode.h
index c02fd3a21477702adeb1d246de35db1c730a011f..dcdb58958a94961d7f3fba1c52d9f05a452073fa 100644
--- a/experimental/svg/model/SkSVGNode.h
+++ b/experimental/svg/model/SkSVGNode.h
@@ -13,18 +13,22 @@
class SkCanvas;
class SkMatrix;
+class SkPaint;
class SkSVGRenderContext;
class SkSVGValue;
enum class SkSVGTag {
kCircle,
+ kDefs,
kEllipse,
kG,
kLine,
+ kLinearGradient,
kPath,
kPolygon,
kPolyline,
kRect,
+ kStop,
kSvg
};
@@ -37,6 +41,7 @@ public:
virtual void appendChild(sk_sp<SkSVGNode>) = 0;
void render(const SkSVGRenderContext&) const;
+ bool asPaint(const SkSVGRenderContext&, SkPaint*) const;
void setAttribute(SkSVGAttribute, const SkSVGValue&);
@@ -60,6 +65,8 @@ protected:
virtual void onRender(const SkSVGRenderContext&) const = 0;
+ virtual bool onAsPaint(const SkSVGRenderContext&, SkPaint*) const { return false; }
+
virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&);
private:

Powered by Google App Engine
This is Rietveld 408576698