From 6574921253197338f879130ed99fb9ce483976de Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Fri, 1 Dec 2017 16:01:47 -0500 Subject: Revert "Revert "Fix rendering of drrects with small circular inner rrects."" This reverts commit ec727c981dd7ed83e98c7713c2828c6ab144937b. Change-Id: Id3164619016d58b2bcc0b8af606215653f553fce Reviewed-on: https://skia-review.googlesource.com/79422 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon --- src/gpu/effects/GrCircleEffect.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gpu/effects/GrCircleEffect.h') diff --git a/src/gpu/effects/GrCircleEffect.h b/src/gpu/effects/GrCircleEffect.h index bf6bd0e8e6..d721a78241 100644 --- a/src/gpu/effects/GrCircleEffect.h +++ b/src/gpu/effects/GrCircleEffect.h @@ -19,8 +19,14 @@ public: GrClipEdgeType edgeType() const { return fEdgeType; } SkPoint center() const { return fCenter; } float radius() const { return fRadius; } + static std::unique_ptr Make(GrClipEdgeType edgeType, SkPoint center, float radius) { + // A radius below half causes the implicit insetting done by this processor to become + // inverted. We could handle this case by making the processor code more complicated. + if (radius < .5f) { + return nullptr; + } return std::unique_ptr(new GrCircleEffect(edgeType, center, radius)); } GrCircleEffect(const GrCircleEffect& src); -- cgit v1.2.3