| 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 "SkTypeface.h" | 10 #include "SkTypeface.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } else { | 45 } else { |
| 46 str.append("_b"); // b == Both. | 46 str.append("_b"); // b == Both. |
| 47 } | 47 } |
| 48 return str; | 48 return str; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual SkISize onISize() { return SkISize::Make(800, 600); } | 51 virtual SkISize onISize() { return SkISize::Make(800, 600); } |
| 52 | 52 |
| 53 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 53 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 54 if (!fProp) { | 54 if (!fProp) { |
| 55 fProp.reset(SkTypeface::CreateFromName("Helvetica", SkTypeface::kNor
mal)); | 55 fProp.reset(sk_tool_utils::create_portable_typeface("Helvetica", SkT
ypeface::kNormal)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 // There's a black pixel at 40, 40 for reference. | 58 // There's a black pixel at 40, 40 for reference. |
| 59 canvas->drawPoint(40.0f, 40.0f, SK_ColorBLACK); | 59 canvas->drawPoint(40.0f, 40.0f, SK_ColorBLACK); |
| 60 | 60 |
| 61 // Two reference images. | 61 // Two reference images. |
| 62 canvas->translate(50.0f, 50.0f); | 62 canvas->translate(50.0f, 50.0f); |
| 63 drawTestCase(canvas, 1.0f); | 63 drawTestCase(canvas, 1.0f); |
| 64 | 64 |
| 65 canvas->translate(0.0f, 50.0f); | 65 canvas->translate(0.0f, 50.0f); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 static GMRegistry reg1(GlyphPosHairlineStrokeAndFillFactory); | 196 static GMRegistry reg1(GlyphPosHairlineStrokeAndFillFactory); |
| 197 static GMRegistry reg2(GlyphPosStrokeAndFillFactory); | 197 static GMRegistry reg2(GlyphPosStrokeAndFillFactory); |
| 198 static GMRegistry reg3(GlyphPosHairlineStrokeFactory); | 198 static GMRegistry reg3(GlyphPosHairlineStrokeFactory); |
| 199 static GMRegistry reg4(GlyphPosStrokeFactory); | 199 static GMRegistry reg4(GlyphPosStrokeFactory); |
| 200 static GMRegistry reg5(GlyphPosHairlineFillFactory); | 200 static GMRegistry reg5(GlyphPosHairlineFillFactory); |
| 201 static GMRegistry reg6(GlyphPosFillFactory); | 201 static GMRegistry reg6(GlyphPosFillFactory); |
| 202 | 202 |
| 203 | 203 |
| 204 } | 204 } |
| OLD | NEW |