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

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 57823003: Add SK_PREFETCH and use in SkBlurImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: slimmer change 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
« include/core/SkPostConfig.h ('K') | « include/core/SkPostConfig.h ('k') | no next file » | 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 2b823bc98b2b915db6086b87256c3e2e21940d4a..0fa54b555cd78cfae0b800b699a155f503bd5cd0 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -144,6 +144,8 @@ static void boxBlurY(const SkBitmap& src, SkBitmap* dst, int kernelSize,
sumB += SkGetPackedB32(r);
}
sptr += srcStride;
+ // The next leading pixel seems to be too hard to predict. Hint the fetch.
+ SK_PREFETCH(sptr + (bottomOffset + 1) * srcStride);
dptr += dstStride;
}
}
« include/core/SkPostConfig.h ('K') | « include/core/SkPostConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698