| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 /* Tests text rendering with LCD and subpixel rendering turned on and off. | 10 /* Tests text rendering with LCD and subpixel rendering turned on and off. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 const int pointSize = 36; | 21 const int pointSize = 36; |
| 22 textHeight = SkIntToScalar(pointSize); | 22 textHeight = SkIntToScalar(pointSize); |
| 23 } | 23 } |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 | 26 |
| 27 SkString onShortName() { | 27 SkString onShortName() { |
| 28 return SkString("lcdtext"); | 28 return SkString("lcdtext"); |
| 29 } | 29 } |
| 30 | 30 |
| 31 SkISize onISize() { return make_isize(640, 480); } | 31 SkISize onISize() { return SkISize::Make(640, 480); } |
| 32 | 32 |
| 33 virtual void onDraw(SkCanvas* canvas) { | 33 virtual void onDraw(SkCanvas* canvas) { |
| 34 | 34 |
| 35 y = textHeight; | 35 y = textHeight; |
| 36 drawText(canvas, SkString("TEXT: SubpixelTrue LCDRenderTrue"), | 36 drawText(canvas, SkString("TEXT: SubpixelTrue LCDRenderTrue"), |
| 37 true, true); | 37 true, true); |
| 38 drawText(canvas, SkString("TEXT: SubpixelTrue LCDRenderFalse"), | 38 drawText(canvas, SkString("TEXT: SubpixelTrue LCDRenderFalse"), |
| 39 true, false); | 39 true, false); |
| 40 drawText(canvas, SkString("TEXT: SubpixelFalse LCDRenderTrue"), | 40 drawText(canvas, SkString("TEXT: SubpixelFalse LCDRenderTrue"), |
| 41 false, true); | 41 false, true); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 61 typedef GM INHERITED; | 61 typedef GM INHERITED; |
| 62 SkScalar y, textHeight; | 62 SkScalar y, textHeight; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 /////////////////////////////////////////////////////////////////////////////// | 65 /////////////////////////////////////////////////////////////////////////////// |
| 66 | 66 |
| 67 static GM* MyFactory(void*) { return new LcdTextGM; } | 67 static GM* MyFactory(void*) { return new LcdTextGM; } |
| 68 static GMRegistry reg(MyFactory); | 68 static GMRegistry reg(MyFactory); |
| 69 | 69 |
| 70 } | 70 } |
| OLD | NEW |