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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 708073002: Use size of SkRect as the key for blur mask cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix fractional rects Created 6 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 | « src/core/SkMaskCache.cpp ('k') | 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 1612e3db965098a530df74340c55a824917b3b2b..be818ff1f763ca218518f1ebb41252c6bb1a8edd 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -552,7 +552,7 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
}
const SkScalar sigma = this->computeXformedSigma(matrix);
- if (!find_cached_rects(&patch->fMask, sigma, fBlurStyle, this->getQuality(), rects, count)) {
+ if (!find_cached_rects(&patch->fMask, sigma, fBlurStyle, this->getQuality(), smallR, count)) {
if (count > 1 || !c_analyticBlurNinepatch) {
if (!draw_rects_into_mask(smallR, count, &srcM)) {
return kFalse_FilterReturn;
@@ -569,7 +569,7 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
return kFalse_FilterReturn;
}
}
- add_cached_rects(patch->fMask, sigma, fBlurStyle, this->getQuality(), rects, count);
+ add_cached_rects(patch->fMask, sigma, fBlurStyle, this->getQuality(), smallR, count);
}
patch->fMask.fBounds.offsetTo(0, 0);
patch->fOuterRect = dstM.fBounds;
« no previous file with comments | « src/core/SkMaskCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698