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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 17035007: Fix quickReject computation for blurs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: New version based on in-person reviews 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
« src/effects/SkBlurMaskFilter.cpp ('K') | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
===================================================================
--- src/gpu/SkGpuDevice.cpp (revision 9604)
+++ src/gpu/SkGpuDevice.cpp (working copy)
@@ -47,18 +47,6 @@
kXfermodeEffectIdx = 2,
};
-#define MAX_BLUR_SIGMA 4.0f
-// FIXME: This value comes from from SkBlurMaskFilter.cpp.
-// Should probably be put in a common header someplace.
-#define MAX_BLUR_RADIUS SkIntToScalar(128)
-// 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.
-#define BLUR_SIGMA_SCALE 0.6f
// This constant represents the screen alignment criterion in texels for
// requiring texture domain clamping to prevent color bleeding when drawing
// a sub region of a larger source image.
@@ -798,7 +786,7 @@
}
SkScalar radius = info.fIgnoreTransform ? info.fRadius
: context->getMatrix().mapRadius(info.fRadius);
- radius = SkMinScalar(radius, MAX_BLUR_RADIUS);
+ radius = SkMinScalar(radius, info.fMaxRadius);
if (radius <= 0) {
return false;
}
@@ -808,7 +796,7 @@
return false;
}
- float sigma = SkScalarToFloat(radius) * BLUR_SIGMA_SCALE;
+ float sigma = SkScalarToFloat(radius) * info.fSigmaFraction;
float sigma3 = sigma * 3.0f;
SkRect clipRect;
« src/effects/SkBlurMaskFilter.cpp ('K') | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698