| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |