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

Unified Diff: samplecode/SampleTextureDomain.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 | « samplecode/SampleTextAlpha.cpp ('k') | samplecode/SampleXfermodesBlur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleTextureDomain.cpp
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp
index 59d0822b44c60cca183eac0618b4e843f1a15ed2..e615235a578334fc039b56e84011fb357dc6bea3 100644
--- a/samplecode/SampleTextureDomain.cpp
+++ b/samplecode/SampleTextureDomain.cpp
@@ -77,12 +77,11 @@ protected:
// renders correctly
srcRect.setXYWH(1, 1, 3, 3);
dstRect.setXYWH(5, 405, 305, 305);
- SkMaskFilter* mf = SkBlurMaskFilter::Create(
+ paint.setMaskFilter(SkBlurMaskFilter::Make(
kNormal_SkBlurStyle,
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
SkBlurMaskFilter::kHighQuality_BlurFlag |
- SkBlurMaskFilter::kIgnoreTransform_BlurFlag);
- paint.setMaskFilter(mf)->unref();
+ SkBlurMaskFilter::kIgnoreTransform_BlurFlag));
canvas->drawImageRect(image, srcRect, dstRect, &paint);
// Blur and a rotation + nullptr src rect
@@ -90,10 +89,9 @@ protected:
// but it will test a code path in SkGpuDevice::drawBitmap
// that handles blurs with rects transformed to non-
// orthogonal rects. It also tests the nullptr src rect handling
- mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
- SkBlurMask::ConvertRadiusToSigma(5),
- SkBlurMaskFilter::kHighQuality_BlurFlag);
- paint.setMaskFilter(mf)->unref();
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
+ SkBlurMask::ConvertRadiusToSigma(5),
+ SkBlurMaskFilter::kHighQuality_BlurFlag));
dstRect.setXYWH(-150, -150, 300, 300);
canvas->translate(550, 550);
« no previous file with comments | « samplecode/SampleTextAlpha.cpp ('k') | samplecode/SampleXfermodesBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698