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 #include "gm.h" | 8 #include "gm.h" |
9 | 9 |
10 #include "Resources.h" | 10 #include "Resources.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 const char* text = "This test requires a surface"; | 131 const char* text = "This test requires a surface"; |
132 size_t len = strlen(text); | 132 size_t len = strlen(text); |
133 SkPaint paint; | 133 SkPaint paint; |
134 canvas->drawText(text, len, 10, 100, paint); | 134 canvas->drawText(text, len, 10, 100, paint); |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 private: | 138 private: |
139 SkAutoTUnref<const SkTextBlob> fBlob; | 139 SkAutoTUnref<const SkTextBlob> fBlob; |
140 | 140 |
141 static const int kWidth = 2000; | 141 static constexpr int kWidth = 2000; |
142 static const int kHeight = 1600; | 142 static constexpr int kHeight = 1600; |
143 | 143 |
144 typedef GM INHERITED; | 144 typedef GM INHERITED; |
145 }; | 145 }; |
146 | 146 |
147 ////////////////////////////////////////////////////////////////////////////// | 147 ////////////////////////////////////////////////////////////////////////////// |
148 | 148 |
149 DEF_GM(return new TextBlobRandomFont;) | 149 DEF_GM(return new TextBlobRandomFont;) |
150 } | 150 } |
151 #endif | 151 #endif |
OLD | NEW |