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 "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 /////////////////////////////////////////////////////////////////////////////// | 85 /////////////////////////////////////////////////////////////////////////////// |
86 | 86 |
87 class ShaderTextGM : public GM { | 87 class ShaderTextGM : public GM { |
88 public: | 88 public: |
89 ShaderTextGM() { | 89 ShaderTextGM() { |
90 this->setBGColor(0xFFDDDDDD); | 90 this->setBGColor(0xFFDDDDDD); |
91 } | 91 } |
92 | 92 |
93 protected: | 93 protected: |
94 uint32_t onGetFlags() const SK_OVERRIDE { | |
95 return kSkipTiled_Flag; | |
96 } | |
97 | 94 |
98 SkString onShortName() SK_OVERRIDE { | 95 SkString onShortName() SK_OVERRIDE { |
99 return SkString("shadertext"); | 96 return SkString("shadertext"); |
100 } | 97 } |
101 | 98 |
102 SkISize onISize() SK_OVERRIDE { return SkISize::Make(1450, 500); } | 99 SkISize onISize() SK_OVERRIDE { return SkISize::Make(1450, 500); } |
103 | 100 |
104 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 101 void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
105 const char text[] = "Shaded Text"; | 102 const char text[] = "Shaded Text"; |
106 const int textLen = SK_ARRAY_COUNT(text) - 1; | 103 const int textLen = SK_ARRAY_COUNT(text) - 1; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 182 |
186 private: | 183 private: |
187 typedef GM INHERITED; | 184 typedef GM INHERITED; |
188 }; | 185 }; |
189 | 186 |
190 /////////////////////////////////////////////////////////////////////////////// | 187 /////////////////////////////////////////////////////////////////////////////// |
191 | 188 |
192 static GM* MyFactory(void*) { return new ShaderTextGM; } | 189 static GM* MyFactory(void*) { return new ShaderTextGM; } |
193 static GMRegistry reg(MyFactory); | 190 static GMRegistry reg(MyFactory); |
194 } | 191 } |
OLD | NEW |