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

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

Issue 2327233003: [SVGDom] Initial linear gradient support (Closed)
Patch Set: review 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
« no previous file with comments | « experimental/svg/model/SkSVGNode.h ('k') | experimental/svg/model/SkSVGRenderContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/svg/model/SkSVGNode.cpp
diff --git a/experimental/svg/model/SkSVGNode.cpp b/experimental/svg/model/SkSVGNode.cpp
index 5a73ace548cfd71b1d2879bca7538a2e94616e6f..012c7d22779bff7db48bb26fe90c6c0d7a24dce6 100644
--- a/experimental/svg/model/SkSVGNode.cpp
+++ b/experimental/svg/model/SkSVGNode.cpp
@@ -24,6 +24,12 @@ void SkSVGNode::render(const SkSVGRenderContext& ctx) const {
}
}
+bool SkSVGNode::asPaint(const SkSVGRenderContext& ctx, SkPaint* paint) const {
+ SkSVGRenderContext localContext(ctx);
+
+ return this->onPrepareToRender(&localContext) && this->onAsPaint(localContext, paint);
+}
+
bool SkSVGNode::onPrepareToRender(SkSVGRenderContext* ctx) const {
ctx->applyPresentationAttributes(fPresentationAttributes);
return true;
« no previous file with comments | « experimental/svg/model/SkSVGNode.h ('k') | experimental/svg/model/SkSVGRenderContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698