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

Side by Side Diff: gm/largeglyphblur.cpp

Issue 1243493003: make glyph_pos imageblur* largeglyphblur portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused field Created 5 years, 5 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
« gm/imageblur.cpp ('K') | « gm/imageblurtiled.cpp ('k') | no next file » | 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 BD-style license that can be 4 * Use of this source code is governed by a BD-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 "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 SkISize onISize() override { 27 SkISize onISize() override {
28 return SkISize::Make(kWidth, kHeight); 28 return SkISize::Make(kWidth, kHeight);
29 } 29 }
30 30
31 void onDraw(SkCanvas* canvas) override { 31 void onDraw(SkCanvas* canvas) override {
32 const char text[] = "Hamburgefons"; 32 const char text[] = "Hamburgefons";
33 33
34 SkPaint paint; 34 SkPaint paint;
35 sk_tool_utils::set_portable_typeface(&paint); 35 sk_tool_utils::set_portable_typeface_always(&paint);
36 paint.setTextSize(256); 36 paint.setTextSize(256);
37 paint.setAntiAlias(true); 37 paint.setAntiAlias(true);
38 38
39 // setup up maskfilter 39 // setup up maskfilter
40 static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToS calar(40)); 40 static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToS calar(40));
41 41
42 SkPaint blurPaint(paint); 42 SkPaint blurPaint(paint);
43 SkAutoTUnref<SkMaskFilter> mf(SkBlurMaskFilter::Create(kNormal_SkBlurSty le, kSigma)); 43 SkAutoTUnref<SkMaskFilter> mf(SkBlurMaskFilter::Create(kNormal_SkBlurSty le, kSigma));
44 blurPaint.setMaskFilter(mf); 44 blurPaint.setMaskFilter(mf);
45 45
(...skipping 14 matching lines...) Expand all
60 static const int kWidth = 1920; 60 static const int kWidth = 1920;
61 static const int kHeight = 600; 61 static const int kHeight = 600;
62 62
63 typedef GM INHERITED; 63 typedef GM INHERITED;
64 }; 64 };
65 65
66 ////////////////////////////////////////////////////////////////////////////// 66 //////////////////////////////////////////////////////////////////////////////
67 67
68 DEF_GM( return SkNEW(LargeGlyphBlur); ) 68 DEF_GM( return SkNEW(LargeGlyphBlur); )
69 } 69 }
OLDNEW
« gm/imageblur.cpp ('K') | « gm/imageblurtiled.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698