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

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 66413007: Implement a speedup for Y-only blurs by transposing. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix _none version of SkBoxBlurGetPlatformProcs. Created 7 years, 1 month 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 | src/opts/SkBlurImage_opts.h » ('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 852c0afad36549e82b765e2e55cf760072263c08..fa8ccc866e3f751c3f0697d320fedea2154d61b7 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -193,11 +193,12 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
SkPMColor* d = dst->getAddr32(0, 0);
int w = dstBounds.width(), h = dstBounds.height();
int sw = src.rowBytesAsPixels();
- SkBoxBlurProc boxBlurX, boxBlurY, boxBlurXY;
- if (!SkBoxBlurGetPlatformProcs(&boxBlurX, &boxBlurY, &boxBlurXY)) {
+ SkBoxBlurProc boxBlurX, boxBlurY, boxBlurXY, boxBlurYX;
+ if (!SkBoxBlurGetPlatformProcs(&boxBlurX, &boxBlurY, &boxBlurXY, &boxBlurYX)) {
boxBlurX = boxBlur<kX, kX>;
boxBlurY = boxBlur<kY, kY>;
boxBlurXY = boxBlur<kX, kY>;
+ boxBlurYX = boxBlur<kY, kX>;
}
if (kernelSizeX > 0 && kernelSizeY > 0) {
@@ -221,9 +222,9 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
boxBlurX(d, w, t, kernelSizeX, highOffsetX, lowOffsetX, w, h);
boxBlurX(t, w, d, kernelSizeX3, highOffsetX, highOffsetX, w, h);
} else if (kernelSizeY > 0) {
- boxBlurY(s, sw, d, kernelSizeY, lowOffsetY, highOffsetY, h, w);
- boxBlurY(d, w, t, kernelSizeY, highOffsetY, lowOffsetY, h, w);
- boxBlurY(t, w, d, kernelSizeY3, highOffsetY, highOffsetY, h, w);
+ boxBlurYX(s, sw, d, kernelSizeY, lowOffsetY, highOffsetY, h, w);
+ boxBlurX(d, h, t, kernelSizeY, highOffsetY, lowOffsetY, h, w);
+ boxBlurXY(t, h, d, kernelSizeY3, highOffsetY, highOffsetY, h, w);
}
offset->fX += srcBounds.fLeft;
offset->fY += srcBounds.fTop;
« no previous file with comments | « no previous file | src/opts/SkBlurImage_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698