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 "gm.h" | 8 #include "gm.h" |
9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkBlurDrawLooper.h" | 10 #include "SkBlurDrawLooper.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 SkRect fRect; | 29 SkRect fRect; |
30 | 30 |
31 ShadowsGM() { | 31 ShadowsGM() { |
32 this->setBGColor(0xFFDDDDDD); | 32 this->setBGColor(0xFFDDDDDD); |
33 fCirclePath.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScala
r(10) ); | 33 fCirclePath.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScala
r(10) ); |
34 fRect.set(SkIntToScalar(10), SkIntToScalar(10), | 34 fRect.set(SkIntToScalar(10), SkIntToScalar(10), |
35 SkIntToScalar(30), SkIntToScalar(30)); | 35 SkIntToScalar(30), SkIntToScalar(30)); |
36 } | 36 } |
37 | 37 |
38 protected: | 38 protected: |
39 virtual uint32_t onGetFlags() const SK_OVERRIDE { | |
40 return kSkipTiled_Flag; | |
41 } | |
42 | |
43 virtual SkString onShortName() { | 39 virtual SkString onShortName() { |
44 return SkString("shadows"); | 40 return SkString("shadows"); |
45 } | 41 } |
46 | 42 |
47 virtual SkISize onISize() { | 43 virtual SkISize onISize() { |
48 return SkISize::Make(200, 120); | 44 return SkISize::Make(200, 120); |
49 } | 45 } |
50 | 46 |
51 virtual void onDraw(SkCanvas* canvas) { | 47 virtual void onDraw(SkCanvas* canvas) { |
52 SkBlurDrawLooper* shadowLoopers[5]; | 48 SkBlurDrawLooper* shadowLoopers[5]; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 private: | 118 private: |
123 typedef GM INHERITED; | 119 typedef GM INHERITED; |
124 }; | 120 }; |
125 | 121 |
126 /////////////////////////////////////////////////////////////////////////////// | 122 /////////////////////////////////////////////////////////////////////////////// |
127 | 123 |
128 static GM* MyFactory(void*) { return new ShadowsGM; } | 124 static GM* MyFactory(void*) { return new ShadowsGM; } |
129 static GMRegistry reg(MyFactory); | 125 static GMRegistry reg(MyFactory); |
130 | 126 |
131 } | 127 } |
OLD | NEW |