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

Side by Side Diff: gm/textblobmixedsizes.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 unified diff | Download patch
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gm/texteffects.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 9
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if (!fUseDFT) { 128 if (!fUseDFT) {
129 paint.setColor(sk_tool_utils::color_to_565(SK_ColorWHITE)); 129 paint.setColor(sk_tool_utils::color_to_565(SK_ColorWHITE));
130 } 130 }
131 paint.setAntiAlias(false); 131 paint.setAntiAlias(false);
132 132
133 static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToS calar(8)); 133 static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToS calar(8));
134 134
135 // setup blur paint 135 // setup blur paint
136 SkPaint blurPaint(paint); 136 SkPaint blurPaint(paint);
137 blurPaint.setColor(sk_tool_utils::color_to_565(SK_ColorBLACK)); 137 blurPaint.setColor(sk_tool_utils::color_to_565(SK_ColorBLACK));
138 SkAutoTUnref<SkMaskFilter> mf(SkBlurMaskFilter::Create(kNormal_SkBlurSty le, kSigma)); 138 blurPaint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, kSig ma));
139 blurPaint.setMaskFilter(mf); 139
140
141 for (int i = 0; i < 4; i++) { 140 for (int i = 0; i < 4; i++) {
142 canvas->save(); 141 canvas->save();
143 switch (i % 2) { 142 switch (i % 2) {
144 case 0: 143 case 0:
145 canvas->rotate(random.nextF() * 45.f); 144 canvas->rotate(random.nextF() * 45.f);
146 break; 145 break;
147 case 1: 146 case 1:
148 canvas->rotate(-random.nextF() * 45.f); 147 canvas->rotate(-random.nextF() * 45.f);
149 break; 148 break;
150 } 149 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 typedef GM INHERITED; 185 typedef GM INHERITED;
187 }; 186 };
188 187
189 ////////////////////////////////////////////////////////////////////////////// 188 //////////////////////////////////////////////////////////////////////////////
190 189
191 DEF_GM( return new TextBlobMixedSizes(false); ) 190 DEF_GM( return new TextBlobMixedSizes(false); )
192 #if SK_SUPPORT_GPU 191 #if SK_SUPPORT_GPU
193 DEF_GM( return new TextBlobMixedSizes(true); ) 192 DEF_GM( return new TextBlobMixedSizes(true); )
194 #endif 193 #endif
195 } 194 }
OLDNEW
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gm/texteffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698