aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkBlurMask.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkBlurMask.h')
-rw-r--r--src/effects/SkBlurMask.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/effects/SkBlurMask.h b/src/effects/SkBlurMask.h
index eb67d4c9f8..d4cd3d1ea3 100644
--- a/src/effects/SkBlurMask.h
+++ b/src/effects/SkBlurMask.h
@@ -40,9 +40,16 @@ public:
SkIPoint *margin = NULL,
SkMask::CreateMode createMode =
SkMask::kComputeBoundsAndRenderImage_CreateMode);
+
+ // forceQuality will prevent BoxBlur from falling back to the low quality approach when sigma
+ // is very small -- this can be used predict the margin bump ahead of time without completely
+ // replicating the internal logic. This permits not only simpler caching of blurred results,
+ // but also being able to predict precisely at what pixels the blurred profile of e.g. a
+ // rectangle will lie.
+
static bool BoxBlur(SkMask* dst, const SkMask& src,
SkScalar sigma, Style style, Quality quality,
- SkIPoint* margin = NULL);
+ SkIPoint* margin = NULL, bool forceQuality = false);
// the "ground truth" blur does a gaussian convolution; it's slow
// but useful for comparison purposes.