Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: gm/glyph_pos.cpp

Issue 867963004: remove unused GM flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guarded flags Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/giantbitmap.cpp ('k') | gm/glyph_pos_align.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkTypeface.h" 10 #include "SkTypeface.h"
11 11
12 /* This test tries to define the effect of using hairline strokes on text. 12 /* This test tries to define the effect of using hairline strokes on text.
13 * Provides non-hairline images for reference and consistency checks. 13 * Provides non-hairline images for reference and consistency checks.
14 * glyph_pos_(h/n)_(s/f/b) 14 * glyph_pos_(h/n)_(s/f/b)
15 * -> test hairline/non-hairline stroke/fill/stroke+fill. 15 * -> test hairline/non-hairline stroke/fill/stroke+fill.
16 */ 16 */
17 static const SkScalar kTextHeight = 14.0f; 17 static const SkScalar kTextHeight = 14.0f;
18 static const char kText[] = "Proportional Hamburgefons #% fi"; 18 static const char kText[] = "Proportional Hamburgefons #% fi";
19 19
20 namespace skiagm { 20 namespace skiagm {
21 21
22 class GlyphPosGM : public GM { 22 class GlyphPosGM : public GM {
23 public: 23 public:
24 GlyphPosGM(SkScalar strokeWidth, SkPaint::Style strokeStyle) 24 GlyphPosGM(SkScalar strokeWidth, SkPaint::Style strokeStyle)
25 : fStrokeWidth(strokeWidth) 25 : fStrokeWidth(strokeWidth)
26 , fStrokeStyle(strokeStyle) { 26 , fStrokeStyle(strokeStyle) {
27 } 27 }
28 28
29 protected: 29 protected:
30 uint32_t onGetFlags() const SK_OVERRIDE {
31 return kSkipTiled_Flag;
32 }
33 30
34 SkString onShortName() SK_OVERRIDE { 31 SkString onShortName() SK_OVERRIDE {
35 SkString str("glyph_pos"); 32 SkString str("glyph_pos");
36 if (fStrokeWidth == 0.0f) { 33 if (fStrokeWidth == 0.0f) {
37 str.append("_h"); // h == Hairline. 34 str.append("_h"); // h == Hairline.
38 } else { 35 } else {
39 str.append("_n"); // n == Normal. 36 str.append("_n"); // n == Normal.
40 } 37 }
41 if (fStrokeStyle == SkPaint::kStroke_Style) { 38 if (fStrokeStyle == SkPaint::kStroke_Style) {
42 str.append("_s"); 39 str.append("_s");
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 192
196 static GMRegistry reg1(GlyphPosHairlineStrokeAndFillFactory); 193 static GMRegistry reg1(GlyphPosHairlineStrokeAndFillFactory);
197 static GMRegistry reg2(GlyphPosStrokeAndFillFactory); 194 static GMRegistry reg2(GlyphPosStrokeAndFillFactory);
198 static GMRegistry reg3(GlyphPosHairlineStrokeFactory); 195 static GMRegistry reg3(GlyphPosHairlineStrokeFactory);
199 static GMRegistry reg4(GlyphPosStrokeFactory); 196 static GMRegistry reg4(GlyphPosStrokeFactory);
200 static GMRegistry reg5(GlyphPosHairlineFillFactory); 197 static GMRegistry reg5(GlyphPosHairlineFillFactory);
201 static GMRegistry reg6(GlyphPosFillFactory); 198 static GMRegistry reg6(GlyphPosFillFactory);
202 199
203 200
204 } 201 }
OLDNEW
« no previous file with comments | « gm/giantbitmap.cpp ('k') | gm/glyph_pos_align.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698