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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 320593003: repair math error introduced by windows build fix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 80fa9f8fe4afd4b1af0f95298c81a5812a0fed25..f5f0ff9f73027cc725eb78ad2f54ec2d2242c387 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -695,6 +695,9 @@ void GrGLRectBlurEffect::setData(const GrGLUniformManager& uman,
uman.set4f(fProxyRectUniform, rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
uman.set1f(fProfileSizeUniform, SkScalarCeilToScalar(6*rbe.getSigma()));
+
+ SkDebugf( "proxy rect set to %f %f %f %f\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
+ SkDebugf(" Profile size set to %f\n", SkScalarCeilToScalar(6*rbe.getSigma()));
}
bool GrRectBlurEffect::CreateBlurProfileTexture(GrContext *context, float sigma,
@@ -796,8 +799,8 @@ bool SkBlurMaskFilterImpl::directFilterMaskGPU(GrContext* context,
SkMatrix ctm = context->getMatrix();
SkScalar xformedSigma = this->computeXformedSigma(ctm);
- float pad=SkScalarCeilToScalar(6*xformedSigma)/2.0f;
- rect.outset(pad, pad);
+ int pad=SkScalarCeilToInt(6*xformedSigma)/2;
+ rect.outset(SkIntToScalar(pad), SkIntToScalar(pad));
SkAutoTUnref<GrEffectRef> effect(GrRectBlurEffect::Create(
context, rect, xformedSigma));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698