From cd05b196099492da8f4badd3d47a906395fc0b79 Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Wed, 25 Apr 2018 21:43:03 -0400 Subject: [skottie] Add support for inverse mask paths TBR= Change-Id: I442033b2e82777c90ee497d8a5b2310af1d2e631 Reviewed-on: https://skia-review.googlesource.com/123840 Reviewed-by: Florin Malita Commit-Queue: Florin Malita --- experimental/skottie/Skottie.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'experimental/skottie') diff --git a/experimental/skottie/Skottie.cpp b/experimental/skottie/Skottie.cpp index 7486502f2e..194efe70c4 100644 --- a/experimental/skottie/Skottie.cpp +++ b/experimental/skottie/Skottie.cpp @@ -949,19 +949,16 @@ sk_sp AttachMask(const Json::Value& jmask, if (!m.isObject()) continue; - const auto inverted = ParseDefault(m["inv"], false); - // TODO - if (inverted) { - LogFail(m, "Unsupported inverse mask"); - continue; - } - auto mask_path = AttachPath(m["pt"], ctx); if (!mask_path) { LogFail(m, "Could not parse mask path"); continue; } + mask_path->setFillType(ParseDefault(m["inv"], false) + ? SkPath::kInverseWinding_FillType + : SkPath::kWinding_FillType); + SkString mode; if (!Parse(m["mode"], &mode) || mode.size() != 1 || -- cgit v1.2.3