OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SampleCode.h" | 8 #include "SampleCode.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
11 #include "SkView.h" | 11 #include "SkView.h" |
12 | 12 |
13 #include "SkBlurMaskFilter.h" | 13 #include "SkBlurMaskFilter.h" |
14 #include "SkColorMatrixFilter.h" | 14 #include "SkColorMatrixFilter.h" |
15 #include "SkDiscretePathEffect.h" | 15 #include "SkDiscretePathEffect.h" |
16 #include "SkGradientShader.h" | 16 #include "SkGradientShader.h" |
17 | 17 |
18 //#define COLOR 0xFFFF8844 | 18 //#define COLOR 0xFFFF8844 |
19 #define COLOR 0xFF888888 | 19 #define COLOR 0xFF888888 |
20 | 20 |
21 static void paint_proc0(SkPaint* paint) { | 21 static void paint_proc0(SkPaint*) { |
22 } | 22 } |
23 | 23 |
24 static void paint_proc1(SkPaint* paint) { | 24 static void paint_proc1(SkPaint* paint) { |
25 paint->setMaskFilter(SkBlurMaskFilter::Create(2, | 25 paint->setMaskFilter(SkBlurMaskFilter::Create(2, |
26 SkBlurMaskFilter::kNormal_BlurStyle))->unref(); | 26 SkBlurMaskFilter::kNormal_BlurStyle))->unref(); |
27 } | 27 } |
28 | 28 |
29 static void paint_proc2(SkPaint* paint) { | 29 static void paint_proc2(SkPaint* paint) { |
30 SkScalar dir[3] = { 1, 1, 1}; | 30 SkScalar dir[3] = { 1, 1, 1}; |
31 paint->setMaskFilter( | 31 paint->setMaskFilter( |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 | 110 |
111 private: | 111 private: |
112 typedef SampleView INHERITED; | 112 typedef SampleView INHERITED; |
113 }; | 113 }; |
114 | 114 |
115 /////////////////////////////////////////////////////////////////////////////// | 115 /////////////////////////////////////////////////////////////////////////////// |
116 | 116 |
117 static SkView* MyFactory() { return new EffectsView; } | 117 static SkView* MyFactory() { return new EffectsView; } |
118 static SkViewRegister reg(MyFactory); | 118 static SkViewRegister reg(MyFactory); |
OLD | NEW |