diff options
-rw-r--r-- | experimental/svg/model/SkSVGRenderContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/experimental/svg/model/SkSVGRenderContext.cpp b/experimental/svg/model/SkSVGRenderContext.cpp index 46ed5a28c4..7e2e90e22c 100644 --- a/experimental/svg/model/SkSVGRenderContext.cpp +++ b/experimental/svg/model/SkSVGRenderContext.cpp @@ -267,7 +267,8 @@ void SkSVGRenderContext::applyPresentationAttributes(const SkSVGPresentationAttr // Uninherited attributes. Only apply to the current context. - if (auto* opacity = attrs.fOpacity.getMaybeNull()) { + auto* opacity = attrs.fOpacity.getMaybeNull(); + if (opacity && opacity->value() < 1) { SkPaint opacityPaint; opacityPaint.setAlpha(opacity_to_alpha(opacity->value())); // Balanced in the destructor, via restoreToCount(). |