OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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" |
11 | 11 |
12 /** | 12 /** |
13 * This test exercises drawPosTextH and drawPosText with every text align. | 13 * This test exercises drawPosTextH and drawPosText with every text align. |
14 */ | 14 */ |
15 static const int kWidth = 480; | 15 static const int kWidth = 480; |
16 static const int kHeight = 600; | 16 static const int kHeight = 600; |
17 static const SkScalar kTextHeight = 64.0f; | 17 static const SkScalar kTextHeight = 64.0f; |
18 static const int kMaxStringLength = 12; | 18 static const int kMaxStringLength = 12; |
19 | 19 |
20 namespace skiagm { | 20 namespace skiagm { |
21 | 21 |
22 class GlyphPosAlignGM : public GM { | 22 class GlyphPosAlignGM : public GM { |
23 protected: | 23 protected: |
24 uint32_t onGetFlags() const SK_OVERRIDE { | |
25 return kSkipTiled_Flag; | |
26 } | |
27 | 24 |
28 SkString onShortName() SK_OVERRIDE { | 25 SkString onShortName() SK_OVERRIDE { |
29 return SkString("glyph_pos_align"); | 26 return SkString("glyph_pos_align"); |
30 } | 27 } |
31 | 28 |
32 SkISize onISize() SK_OVERRIDE { return SkISize::Make(kWidth, kHeight); } | 29 SkISize onISize() SK_OVERRIDE { return SkISize::Make(kWidth, kHeight); } |
33 | 30 |
34 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 31 void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
35 canvas->clear(SK_ColorBLACK); | 32 canvas->clear(SK_ColorBLACK); |
36 | 33 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 87 |
91 ////////////////////////////////////////////////////////////////////////////// | 88 ////////////////////////////////////////////////////////////////////////////// |
92 | 89 |
93 static GM* GlyphPosAlignFactory(void*) { | 90 static GM* GlyphPosAlignFactory(void*) { |
94 return new GlyphPosAlignGM(); | 91 return new GlyphPosAlignGM(); |
95 } | 92 } |
96 | 93 |
97 static GMRegistry reg(GlyphPosAlignFactory); | 94 static GMRegistry reg(GlyphPosAlignFactory); |
98 | 95 |
99 } | 96 } |
OLD | NEW |