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

Unified Diff: gm/blurroundrect.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « gm/blurredclippedcircle.cpp ('k') | gm/blurs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/blurroundrect.cpp
diff --git a/gm/blurroundrect.cpp b/gm/blurroundrect.cpp
index 9135ba099f54733ac5f44f49420f4ad9e095ee76..5982d06be3a760c506c7f539855dac5d77cc32df 100644
--- a/gm/blurroundrect.cpp
+++ b/gm/blurroundrect.cpp
@@ -55,11 +55,10 @@ public:
info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0));
info.fPostTranslate = false;
SkPaint* paint = looperBuilder.addLayerOnTop(info);
- SkMaskFilter* maskFilter = SkBlurMaskFilter::Create(
+ paint->setMaskFilter(SkBlurMaskFilter::Make(
kNormal_SkBlurStyle,
SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf),
- SkBlurMaskFilter::kHighQuality_BlurFlag);
- paint->setMaskFilter(maskFilter)->unref();
+ SkBlurMaskFilter::kHighQuality_BlurFlag));
paint->setColorFilter(SkColorFilter::MakeModeFilter(
sk_tool_utils::color_to_565(SK_ColorLTGRAY),
SkXfermode::kSrcIn_Mode));
@@ -142,13 +141,11 @@ protected:
canvas->translate(0, (r.height() + SkIntToScalar(50)) * i);
for (size_t j = 0; j < SK_ARRAY_COUNT(cornerRadii); ++j) {
for (int k = 0; k <= 1; k++) {
- SkMaskFilter* filter = SkBlurMaskFilter::Create(
- kNormal_SkBlurStyle,
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(blurRadii[i])),
- SkBlurMaskFilter::kHighQuality_BlurFlag);
SkPaint paint;
paint.setColor(SK_ColorBLACK);
- paint.setMaskFilter(filter)->unref();
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(blurRadii[i])),
+ SkBlurMaskFilter::kHighQuality_BlurFlag));
bool useRadial = SkToBool(k);
if (useRadial) {
« no previous file with comments | « gm/blurredclippedcircle.cpp ('k') | gm/blurs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698