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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 /////////////////////////////////////////////////////////////////////////////// | 107 /////////////////////////////////////////////////////////////////////////////// |
108 | 108 |
109 class ShaderTextGM : public GM { | 109 class ShaderTextGM : public GM { |
110 public: | 110 public: |
111 ShaderTextGM() { | 111 ShaderTextGM() { |
112 this->setBGColor(0xFFDDDDDD); | 112 this->setBGColor(0xFFDDDDDD); |
113 } | 113 } |
114 | 114 |
115 protected: | 115 protected: |
| 116 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 117 return kSkipTiled_Flag; |
| 118 } |
116 | 119 |
117 SkString onShortName() { | 120 SkString onShortName() { |
118 return SkString("shadertext"); | 121 return SkString("shadertext"); |
119 } | 122 } |
120 | 123 |
121 SkISize onISize() { return make_isize(1450, 500); } | 124 SkISize onISize() { return make_isize(1450, 500); } |
122 | 125 |
123 virtual void onDraw(SkCanvas* canvas) { | 126 virtual void onDraw(SkCanvas* canvas) { |
124 const char text[] = "Shaded Text"; | 127 const char text[] = "Shaded Text"; |
125 const int textLen = SK_ARRAY_COUNT(text) - 1; | 128 const int textLen = SK_ARRAY_COUNT(text) - 1; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 206 |
204 private: | 207 private: |
205 typedef GM INHERITED; | 208 typedef GM INHERITED; |
206 }; | 209 }; |
207 | 210 |
208 /////////////////////////////////////////////////////////////////////////////// | 211 /////////////////////////////////////////////////////////////////////////////// |
209 | 212 |
210 static GM* MyFactory(void*) { return new ShaderTextGM; } | 213 static GM* MyFactory(void*) { return new ShaderTextGM; } |
211 static GMRegistry reg(MyFactory); | 214 static GMRegistry reg(MyFactory); |
212 } | 215 } |
OLD | NEW |