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

Unified Diff: src/core/SkMaskFilter.cpp

Issue 471473002: Optimize CSS box-shadow performance (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: store SkMask and SkCachedData in cache Created 6 years, 2 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
Index: src/core/SkMaskFilter.cpp
diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp
index 86f303c56126fa6da892d0725d7cad1260dbdd7b..91c012ec640cc736c1b9e0d22636142285b02783 100644
--- a/src/core/SkMaskFilter.cpp
+++ b/src/core/SkMaskFilter.cpp
@@ -21,7 +21,7 @@
#endif
bool SkMaskFilter::filterMask(SkMask*, const SkMask&, const SkMatrix&,
- SkIPoint*) const {
+ SkIPoint*, SkCachedData**) const {
return false;
}
@@ -219,7 +219,7 @@ bool SkMaskFilter::filterRRect(const SkRRect& devRRect, const SkMatrix& matrix,
return false;
}
draw_nine(patch.fMask, patch.fOuterRect, patch.fCenter, true, clip, blitter);
- SkMask::FreeImage(patch.fMask.fImage);
+ patch.fData->unref();
return true;
}
@@ -244,7 +244,7 @@ bool SkMaskFilter::filterPath(const SkPath& devPath, const SkMatrix& matrix,
case kTrue_FilterReturn:
draw_nine(patch.fMask, patch.fOuterRect, patch.fCenter, 1 == rectCount, clip,
blitter);
- SkMask::FreeImage(patch.fMask.fImage);
+ patch.fData->unref();
return true;
case kUnimplemented_FilterReturn:
@@ -263,7 +263,7 @@ bool SkMaskFilter::filterPath(const SkPath& devPath, const SkMatrix& matrix,
}
SkAutoMaskFreeImage autoSrc(srcM.fImage);
- if (!this->filterMask(&dstM, srcM, matrix, NULL)) {
+ if (!this->filterMask(&dstM, srcM, matrix, NULL, NULL)) {
return false;
}
SkAutoMaskFreeImage autoDst(dstM.fImage);
@@ -342,7 +342,7 @@ void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const {
srcM.fFormat = SkMask::kA8_Format;
SkIPoint margin; // ignored
- if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) {
+ if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin, NULL)) {
dst->set(dstM.fBounds);
} else {
dst->set(srcM.fBounds);

Powered by Google App Engine
This is Rietveld 408576698