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

Unified Diff: src/effects/SkBlurMask.h

Issue 21835004: Blur refactoring (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: hide constant Created 7 years, 4 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
Index: src/effects/SkBlurMask.h
===================================================================
--- src/effects/SkBlurMask.h (revision 10522)
+++ src/effects/SkBlurMask.h (working copy)
@@ -30,26 +30,36 @@
};
static bool BlurRect(SkMask *dst, const SkRect &src,
- SkScalar radius, Style style,
- SkIPoint *margin = NULL,
- SkMask::CreateMode createMode=SkMask::kComputeBoundsAndRenderImage_CreateMode);
- static bool Blur(SkMask* dst, const SkMask& src,
- SkScalar radius, Style style, Quality quality,
- SkIPoint* margin = NULL);
+ SkScalar sigma, Style style,
+ SkIPoint *margin /* = NULL */,
+ SkMask::CreateMode createMode /*=SkMask::kComputeBoundsAndRenderImage_CreateMode */,
+ bool unused);
+ static bool BoxBlur(SkMask* dst, const SkMask& src,
+ SkScalar sigma, Style style, Quality quality,
+ SkIPoint* margin /* = NULL */, bool unused);
// the "ground truth" blur does a gaussian convolution; it's slow
// but useful for comparison purposes.
+ static bool BlurGroundTruth(SkMask* dst, const SkMask& src,
+ SkScalar sigma, Style style,
+ SkIPoint* margin /* = NULL */, bool unused);
+ // DEPRECATED - radius-based
+ static bool BlurRect(SkMask *dst, const SkRect &src,
+ SkScalar radius, Style style,
+ SkIPoint *margin = NULL,
+ SkMask::CreateMode createMode =
+ SkMask::kComputeBoundsAndRenderImage_CreateMode);
+ // DEPRECATED - radius-based
+ static bool BoxBlur(SkMask* dst, const SkMask& src,
+ SkScalar radius, Style style, Quality quality,
+ SkIPoint* margin = NULL);
+ // DEPRECATED - radius-based
static bool BlurGroundTruth(SkMask* dst, const SkMask& src,
- SkScalar provided_radius, Style style,
- SkIPoint* margin = NULL);
+ SkScalar radius, Style style,
+ SkIPoint* margin = NULL);
- // scale factor for the blur radius to match the behavior of the all existing blur
- // code (both on the CPU and the GPU). This magic constant is 1/sqrt(3).
- // TODO: get rid of this fudge factor and move any required fudging up into
- // the calling library
- static const SkScalar kBlurRadiusFudgeFactor;
-
+ static SkScalar ConvertRadiusToSigma(SkScalar radius);
};
#endif

Powered by Google App Engine
This is Rietveld 408576698