| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBlurDrawLooper.h" | 9 #include "SkBlurDrawLooper.h" |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 p.setAntiAlias(true); | 57 p.setAntiAlias(true); |
| 58 p.setAlpha(0x66); | 58 p.setAlpha(0x66); |
| 59 fPaints.push_back(p); | 59 fPaints.push_back(p); |
| 60 } | 60 } |
| 61 | 61 |
| 62 { | 62 { |
| 63 // AA with mask filter | 63 // AA with mask filter |
| 64 SkPaint p; | 64 SkPaint p; |
| 65 p.setColor(SK_ColorWHITE); | 65 p.setColor(SK_ColorWHITE); |
| 66 p.setAntiAlias(true); | 66 p.setAntiAlias(true); |
| 67 SkMaskFilter* mf = SkBlurMaskFilter::Create( | 67 p.setMaskFilter(SkBlurMaskFilter::Make( |
| 68 kNormal_SkBlurStyle, | 68 kNormal_SkBlurStyle, |
| 69 SkBlurMask::ConvertRadiusToSigma(SkIntToScala
r(5)), | 69 SkBlurMask::ConvertRadiusToSigma(SkIntToScala
r(5)), |
| 70 SkBlurMaskFilter::kHighQuality_BlurFlag); | 70 SkBlurMaskFilter::kHighQuality_BlurFlag)); |
| 71 p.setMaskFilter(mf)->unref(); | |
| 72 fPaints.push_back(p); | 71 fPaints.push_back(p); |
| 73 } | 72 } |
| 74 | 73 |
| 75 { | 74 { |
| 76 // AA with radial shader | 75 // AA with radial shader |
| 77 SkPaint p; | 76 SkPaint p; |
| 78 p.setColor(SK_ColorWHITE); | 77 p.setColor(SK_ColorWHITE); |
| 79 p.setAntiAlias(true); | 78 p.setAntiAlias(true); |
| 80 SkPoint center = SkPoint::Make(SkIntToScalar(-5), SkIntToScalar(30))
; | 79 SkPoint center = SkPoint::Make(SkIntToScalar(-5), SkIntToScalar(30))
; |
| 81 SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN }; | 80 SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN }; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 279 |
| 281 typedef GM INHERITED; | 280 typedef GM INHERITED; |
| 282 }; | 281 }; |
| 283 | 282 |
| 284 ////////////////////////////////////////////////////////////////////////////// | 283 ////////////////////////////////////////////////////////////////////////////// |
| 285 | 284 |
| 286 static GM* MyFactory(void*) { return new RectsGM; } | 285 static GM* MyFactory(void*) { return new RectsGM; } |
| 287 static GMRegistry reg(MyFactory); | 286 static GMRegistry reg(MyFactory); |
| 288 | 287 |
| 289 } | 288 } |
| OLD | NEW |