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

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 137053003: Apply the CTM to filter parameters for 4 pixel-moving filters. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed 100-col issues Created 6 years, 11 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 | « gyp/gmslides.gypi ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurImageFilter.cpp
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 5efef0ba50169ccf723592eb9884b6162f154281..7f3f5320797c133f75cc025b9dc0ab81b1f2eb4d 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -165,10 +165,13 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
return false;
}
+ SkVector sigma, localSigma = SkVector::Make(fSigma.width(), fSigma.height());
+ ctm.mapVectors(&sigma, &localSigma, 1);
+
int kernelSizeX, kernelSizeX3, lowOffsetX, highOffsetX;
int kernelSizeY, kernelSizeY3, lowOffsetY, highOffsetY;
- getBox3Params(fSigma.width(), &kernelSizeX, &kernelSizeX3, &lowOffsetX, &highOffsetX);
- getBox3Params(fSigma.height(), &kernelSizeY, &kernelSizeY3, &lowOffsetY, &highOffsetY);
+ getBox3Params(sigma.x(), &kernelSizeX, &kernelSizeX3, &lowOffsetX, &highOffsetX);
+ getBox3Params(sigma.y(), &kernelSizeY, &kernelSizeY3, &lowOffsetY, &highOffsetY);
if (kernelSizeX < 0 || kernelSizeY < 0) {
return false;
@@ -235,13 +238,15 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
if (!this->applyCropRect(&rect, ctm)) {
return false;
}
+ SkVector sigma, localSigma = SkVector::Make(fSigma.width(), fSigma.height());
+ ctm.mapVectors(&sigma, &localSigma, 1);
SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(source->getContext(),
source,
false,
SkRect::Make(rect),
true,
- fSigma.width(),
- fSigma.height()));
+ sigma.x(),
+ sigma.y()));
offset->fX = rect.fLeft;
offset->fY = rect.fTop;
return SkImageFilterUtils::WrapTexture(tex, rect.width(), rect.height(), result);
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698