Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: src/effects/SkBlurMask.h

Issue 248613004: Fast path for blurred round rects -- blur a small 9patch rect on the CPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: merge fully with Mike's new reorg" Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/blurroundrect.cpp ('k') | src/effects/SkBlurMask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMask.h
diff --git a/src/effects/SkBlurMask.h b/src/effects/SkBlurMask.h
index f5c9f1d05078b4a822bafca6fe53e8c99782f569..39adb96f9a077970895ae6176ecc4e7202e0e50a 100644
--- a/src/effects/SkBlurMask.h
+++ b/src/effects/SkBlurMask.h
@@ -23,9 +23,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, SkBlurStyle style, SkBlurQuality quality,
- SkIPoint* margin = NULL);
+ SkIPoint* margin = NULL, bool force_quality=false);
// the "ground truth" blur does a gaussian convolution; it's slow
// but useful for comparison purposes.
« no previous file with comments | « gm/blurroundrect.cpp ('k') | src/effects/SkBlurMask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698