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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 typedef GM INHERITED; | 93 typedef GM INHERITED; |
94 }; | 94 }; |
95 | 95 |
96 | 96 |
97 | 97 |
98 class GradTextGM : public GM { | 98 class GradTextGM : public GM { |
99 public: | 99 public: |
100 GradTextGM () {} | 100 GradTextGM () {} |
101 | 101 |
102 protected: | 102 protected: |
| 103 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 104 return kSkipTiled_Flag; |
| 105 } |
| 106 |
103 | 107 |
104 virtual SkString onShortName() { | 108 virtual SkString onShortName() { |
105 return SkString("gradtext"); | 109 return SkString("gradtext"); |
106 } | 110 } |
107 | 111 |
108 virtual SkISize onISize() { return make_isize(500, 480); } | 112 virtual SkISize onISize() { return make_isize(500, 480); } |
109 | 113 |
110 static void draw_text(SkCanvas* canvas, const SkPaint& paint) { | 114 static void draw_text(SkCanvas* canvas, const SkPaint& paint) { |
111 const char* text = "When in the course of human events"; | 115 const char* text = "When in the course of human events"; |
112 size_t len = strlen(text); | 116 size_t len = strlen(text); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 ////////////////////////////////////////////////////////////////////////////// | 161 ////////////////////////////////////////////////////////////////////////////// |
158 | 162 |
159 static GM* MyFactory(void*) { return new GradTextGM; } | 163 static GM* MyFactory(void*) { return new GradTextGM; } |
160 static GM* CMyFactory(void*) { return new ChromeGradTextGM1; } | 164 static GM* CMyFactory(void*) { return new ChromeGradTextGM1; } |
161 static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; } | 165 static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; } |
162 | 166 |
163 static GMRegistry reg(MyFactory); | 167 static GMRegistry reg(MyFactory); |
164 static GMRegistry Creg(CMyFactory); | 168 static GMRegistry Creg(CMyFactory); |
165 static GMRegistry Creg2(CMyFactory2); | 169 static GMRegistry Creg2(CMyFactory2); |
166 } | 170 } |
OLD | NEW |