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

Side by Side Diff: gm/blurredclippedcircle.cpp

Issue 1825073002: Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove flag Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « bench/ImageFilterCollapse.cpp ('k') | gm/blurroundrect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 SkRect r = SkRect::MakeLTRB(4, 4, 292, 292); 61 SkRect r = SkRect::MakeLTRB(4, 4, 292, 292);
62 SkRRect rr = SkRRect::MakeOval(r); 62 SkRRect rr = SkRRect::MakeOval(r);
63 63
64 SkPaint paint; 64 SkPaint paint;
65 65
66 paint.setMaskFilter(SkBlurMaskFilter::Create( 66 paint.setMaskFilter(SkBlurMaskFilter::Create(
67 kNormal_SkBlurStyle, 67 kNormal_SkBlurStyle,
68 1.366025f, 68 1.366025f,
69 SkBlurMaskFilter::kHighQuality_BlurF lag))->unref(); 69 SkBlurMaskFilter::kHighQuality_BlurF lag))->unref();
70 paint.setColorFilter(SkColorFilter::CreateModeFilter( 70 paint.setColorFilter(SkColorFilter::MakeModeFilter(
71 SK_ColorRED, 71 SK_ColorRED,
72 SkXfermode::kSrcIn_Mode))->unref(); 72 SkXfermode::kSrcIn_Mode));
73 paint.setAntiAlias(true); 73 paint.setAntiAlias(true);
74 74
75 canvas->drawRRect(rr, paint); 75 canvas->drawRRect(rr, paint);
76 76
77 canvas->restore(); 77 canvas->restore();
78 canvas->restore(); 78 canvas->restore();
79 canvas->restore(); 79 canvas->restore();
80 } 80 }
81 81
82 private: 82 private:
83 static const int kWidth = 1164; 83 static const int kWidth = 1164;
84 static const int kHeight = 802; 84 static const int kHeight = 802;
85 85
86 typedef GM INHERITED; 86 typedef GM INHERITED;
87 }; 87 };
88 88
89 ////////////////////////////////////////////////////////////////////////////// 89 //////////////////////////////////////////////////////////////////////////////
90 90
91 DEF_GM(return new BlurredClippedCircleGM;) 91 DEF_GM(return new BlurredClippedCircleGM;)
92 } 92 }
OLDNEW
« no previous file with comments | « bench/ImageFilterCollapse.cpp ('k') | gm/blurroundrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698