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

Unified Diff: src/effects/SkBlurMask.cpp

Issue 248613004: Fast path for blurred round rects -- blur a small 9patch rect on the CPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: merge fully with Mike's new reorg" Created 6 years, 8 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 | « src/effects/SkBlurMask.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMask.cpp
diff --git a/src/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp
index 9b05e2f330323132f3360c33200b7a9fd66e20d5..c04a6f89f8d46783f2f232ec58c94977552edc24 100644
--- a/src/effects/SkBlurMask.cpp
+++ b/src/effects/SkBlurMask.cpp
@@ -475,14 +475,16 @@ void SkMask_FreeImage(uint8_t* image) {
SkMask::FreeImage(image);
}
-bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurStyle style,
- SkBlurQuality quality, SkIPoint* margin) {
+bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src,
+ SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
+ SkIPoint* margin, bool force_quality) {
+
if (src.fFormat != SkMask::kA8_Format) {
return false;
}
// Force high quality off for small radii (performance)
- if (sigma <= SkIntToScalar(2)) {
+ if (!force_quality && sigma <= SkIntToScalar(2)) {
quality = kLow_SkBlurQuality;
}
« no previous file with comments | « src/effects/SkBlurMask.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698