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 #include "gm.h" | 7 #include "gm.h" |
8 #include "SkTypeface.h" | 8 #include "SkTypeface.h" |
9 | 9 |
10 namespace skiagm { | 10 namespace skiagm { |
11 | 11 |
12 class FontScalerGM : public GM { | 12 class FontScalerGM : public GM { |
13 public: | 13 public: |
14 FontScalerGM() { | 14 FontScalerGM() { |
15 this->setBGColor(0xFFFFFFFF); | 15 this->setBGColor(0xFFFFFFFF); |
16 } | 16 } |
17 | 17 |
18 virtual ~FontScalerGM() { | 18 virtual ~FontScalerGM() { |
19 } | 19 } |
20 | 20 |
21 protected: | 21 protected: |
| 22 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 23 return kSkipTiled_Flag; |
| 24 } |
| 25 |
22 virtual SkString onShortName() { | 26 virtual SkString onShortName() { |
23 return SkString("fontscaler"); | 27 return SkString("fontscaler"); |
24 } | 28 } |
25 | 29 |
26 virtual SkISize onISize() { | 30 virtual SkISize onISize() { |
27 return make_isize(1450, 750); | 31 return make_isize(1450, 750); |
28 } | 32 } |
29 | 33 |
30 static void rotate_about(SkCanvas* canvas, | 34 static void rotate_about(SkCanvas* canvas, |
31 SkScalar degrees, | 35 SkScalar degrees, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 private: | 88 private: |
85 typedef GM INHERITED; | 89 typedef GM INHERITED; |
86 }; | 90 }; |
87 | 91 |
88 ////////////////////////////////////////////////////////////////////////////// | 92 ////////////////////////////////////////////////////////////////////////////// |
89 | 93 |
90 static GM* MyFactory(void*) { return new FontScalerGM; } | 94 static GM* MyFactory(void*) { return new FontScalerGM; } |
91 static GMRegistry reg(MyFactory); | 95 static GMRegistry reg(MyFactory); |
92 | 96 |
93 } | 97 } |
OLD | NEW |