| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 8 |
| 9 /* | 9 /* |
| 10 * Tests overlapping LCD text | 10 * Tests overlapping LCD text |
| 11 */ | 11 */ |
| 12 | 12 |
| 13 #include "gm.h" | 13 #include "gm.h" |
| 14 #include "SkCanvas.h" | 14 #include "SkCanvas.h" |
| 15 #include "SkSurface.h" | 15 #include "SkSurface.h" |
| 16 #include "SkTextBlob.h" | 16 #include "SkTextBlob.h" |
| 17 | 17 |
| 18 namespace skiagm { | 18 namespace skiagm { |
| 19 | 19 |
| 20 static const int kWidth = 750; | 20 constexpr int kWidth = 750; |
| 21 static const int kHeight = 750; | 21 constexpr int kHeight = 750; |
| 22 | 22 |
| 23 class LcdOverlapGM : public skiagm::GM { | 23 class LcdOverlapGM : public skiagm::GM { |
| 24 public: | 24 public: |
| 25 LcdOverlapGM() { | 25 LcdOverlapGM() { |
| 26 const int kPointSize = 25; | 26 const int kPointSize = 25; |
| 27 fTextHeight = SkIntToScalar(kPointSize); | 27 fTextHeight = SkIntToScalar(kPointSize); |
| 28 } | 28 } |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 SkString onShortName() override { | 31 SkString onShortName() override { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 private: | 91 private: |
| 92 SkScalar fTextHeight; | 92 SkScalar fTextHeight; |
| 93 SkAutoTUnref<const SkTextBlob> fBlob; | 93 SkAutoTUnref<const SkTextBlob> fBlob; |
| 94 typedef skiagm::GM INHERITED; | 94 typedef skiagm::GM INHERITED; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 ////////////////////////////////////////////////////////////////////////////// | 97 ////////////////////////////////////////////////////////////////////////////// |
| 98 | 98 |
| 99 DEF_GM( return new LcdOverlapGM; ) | 99 DEF_GM( return new LcdOverlapGM; ) |
| 100 } | 100 } |
| OLD | NEW |