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

Unified Diff: include/effects/SkBlurMaskFilter.h

Issue 17035007: Fix quickReject computation for blurs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up more Created 7 years, 6 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: include/effects/SkBlurMaskFilter.h
===================================================================
--- include/effects/SkBlurMaskFilter.h (revision 9604)
+++ include/effects/SkBlurMaskFilter.h (working copy)
@@ -54,6 +54,22 @@
SkScalar blurRadius);
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
+
+ // This constant approximates the scaling done in the software path's
+ // "high quality" mode, in SkBlurMask::Blur() (1 / sqrt(3)).
+ // IMHO, it actually should be 1: we blur "less" than we should do
+ // according to the CSS and canvas specs, simply because Safari does the same.
+ // Firefox used to do the same too, until 4.0 where they fixed it. So at some
+ // point we should probably get rid of these scaling constants and rebaseline
+ // all the blur tests.
+ static const SkScalar kBLUR_SIGMA_SCALE;
+
+ // 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;
+
private:
SkBlurMaskFilter(); // can't be instantiated
};
« no previous file with comments | « gyp/gpu.gyp ('k') | src/effects/SkBlurMask.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698