aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/sksg/SkSGNode.h
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-04-25 21:43:03 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-26 02:35:10 +0000
commitcd05b196099492da8f4badd3d47a906395fc0b79 (patch)
treeb75c7b86c278d31f438ae2d3733f5c1bafd1cadb /experimental/sksg/SkSGNode.h
parent1366282bc2f2c9566e1ffa77bafb2ec4d8f190df (diff)
[skottie] Add support for inverse mask paths
TBR= Change-Id: I442033b2e82777c90ee497d8a5b2310af1d2e631 Reviewed-on: https://skia-review.googlesource.com/123840 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/sksg/SkSGNode.h')
-rw-r--r--experimental/sksg/SkSGNode.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/experimental/sksg/SkSGNode.h b/experimental/sksg/SkSGNode.h
index 6396e4d33e..17619de485 100644
--- a/experimental/sksg/SkSGNode.h
+++ b/experimental/sksg/SkSGNode.h
@@ -92,7 +92,15 @@ private:
if (attr_container == v) return; \
attr_container = v; \
this->invalidate(); \
- }
+ }
+
+#define SG_MAPPED_ATTRIBUTE(attr_name, attr_type, attr_container) \
+ attr_type get##attr_name() const { return attr_container.get##attr_name(); } \
+ void set##attr_name(const attr_type& v) { \
+ if (attr_container.get##attr_name() == v) return; \
+ attr_container.set##attr_name(v); \
+ this->invalidate(); \
+ }
} // namespace sksg