OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 for (size_t i = 0; i < SK_ARRAY_COUNT(gParams); i++) { | 80 for (size_t i = 0; i < SK_ARRAY_COUNT(gParams); i++) { |
81 info.fOffset.set(gParams[i].fOffset, gParams[i].fOffset); | 81 info.fOffset.set(gParams[i].fOffset, gParams[i].fOffset); |
82 SkPaint* paint = fLooper->addLayer(info); | 82 SkPaint* paint = fLooper->addLayer(info); |
83 paint->setAntiAlias(true); | 83 paint->setAntiAlias(true); |
84 paint->setColor(gParams[i].fColor); | 84 paint->setColor(gParams[i].fColor); |
85 paint->setStyle(gParams[i].fStyle); | 85 paint->setStyle(gParams[i].fStyle); |
86 paint->setStrokeWidth(gParams[i].fWidth); | 86 paint->setStrokeWidth(gParams[i].fWidth); |
87 if (gParams[i].fBlur > 0) { | 87 if (gParams[i].fBlur > 0) { |
88 SkMaskFilter* mf = SkBlurMaskFilter::Create(SkIntToScalar(gParam
s[i].fBlur), | 88 SkMaskFilter* mf = SkBlurMaskFilter::Create(SkIntToScalar(gParam
s[i].fBlur), |
89 SkBlurMaskFilter::kN
ormal_BlurStyle); | 89 SkBlurMaskFilter::kN
ormal_BlurStyle, |
| 90 SkBlurMaskFilter::kN
one_BlurFlag); |
90 paint->setMaskFilter(mf)->unref(); | 91 paint->setMaskFilter(mf)->unref(); |
91 } | 92 } |
92 } | 93 } |
93 } | 94 } |
94 | 95 |
95 typedef GM INHERITED; | 96 typedef GM INHERITED; |
96 }; | 97 }; |
97 | 98 |
98 ////////////////////////////////////////////////////////////////////////////// | 99 ////////////////////////////////////////////////////////////////////////////// |
99 | 100 |
100 static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; } | 101 static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; } |
101 static skiagm::GMRegistry reg(MyFactory); | 102 static skiagm::GMRegistry reg(MyFactory); |
OLD | NEW |