Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "Resources.h" | 9 #include "Resources.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 | 187 |
| 188 // The hintgasp.ttf is designed for the following sizes to be different. | 188 // The hintgasp.ttf is designed for the following sizes to be different. |
| 189 // GASP_DOGRAY 0x0002 0<=ppem<=10 | 189 // GASP_DOGRAY 0x0002 0<=ppem<=10 |
| 190 // GASP_SYMMETRIC_SMOOTHING 0x0008 0<=ppem<=10 | 190 // GASP_SYMMETRIC_SMOOTHING 0x0008 0<=ppem<=10 |
| 191 // GASP_GRIDFIT 0x0001 11<=ppem<=12 | 191 // GASP_GRIDFIT 0x0001 11<=ppem<=12 |
| 192 // GASP_SYMMETRIC_GRIDFIT 0x0004 11<=ppem<=12 | 192 // GASP_SYMMETRIC_GRIDFIT 0x0004 11<=ppem<=12 |
| 193 // GASP_DOGRAY|GASP_GRIDFIT 0x0003 13<=ppem<=14 | 193 // GASP_DOGRAY|GASP_GRIDFIT 0x0003 13<=ppem<=14 |
| 194 // GASP_SYMMETRIC_SMOOTHING|GASP_SYMMETRIC_GRIDFIT 0x000C 13<=ppem<=14 | 194 // GASP_SYMMETRIC_SMOOTHING|GASP_SYMMETRIC_GRIDFIT 0x000C 13<=ppem<=14 |
| 195 // (neither) 0x0000 15<=ppem | 195 // (neither) 0x0000 15<=ppem |
| 196 // Odd sizes have embedded bitmaps. | 196 // Odd sizes have embedded bitmaps. |
| 197 #ifdef SK_BUILD_FOR_IOS | |
|
mtklein
2016/07/13 17:11:17
Note why, maybe skbug link?
bungeman-skia
2016/07/13 17:30:32
Done.
| |
| 198 constexpr SkScalar textSizes[] = { 10, 12, 14, 16 }; | |
| 199 #else | |
| 197 constexpr SkScalar textSizes[] = { 9, 10, 11, 12, 13, 14, 15, 16 }; | 200 constexpr SkScalar textSizes[] = { 9, 10, 11, 12, 13, 14, 15, 16 }; |
| 201 #endif | |
| 198 | 202 |
| 199 constexpr SkPaint::Hinting hintingTypes[] = { SkPaint::kNo_Hinting, | 203 constexpr SkPaint::Hinting hintingTypes[] = { SkPaint::kNo_Hinting, |
| 200 SkPaint::kSlight_Hinting, | 204 SkPaint::kSlight_Hinting, |
| 201 SkPaint::kNormal_Hinting, | 205 SkPaint::kNormal_Hinting, |
| 202 SkPaint::kFull_Hinting }; | 206 SkPaint::kFull_Hinting }; |
| 203 | 207 |
| 204 struct SubpixelType { | 208 struct SubpixelType { |
| 205 bool requested; | 209 bool requested; |
| 206 SkVector offset; | 210 SkVector offset; |
| 207 } constexpr subpixelTypes[] = { | 211 } constexpr subpixelTypes[] = { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 | 269 |
| 266 private: | 270 private: |
| 267 typedef skiagm::GM INHERITED; | 271 typedef skiagm::GM INHERITED; |
| 268 }; | 272 }; |
| 269 | 273 |
| 270 /////////////////////////////////////////////////////////////////////////////// | 274 /////////////////////////////////////////////////////////////////////////////// |
| 271 | 275 |
| 272 DEF_GM( return new TypefaceStylesGM(false); ) | 276 DEF_GM( return new TypefaceStylesGM(false); ) |
| 273 DEF_GM( return new TypefaceStylesGM(true); ) | 277 DEF_GM( return new TypefaceStylesGM(true); ) |
| 274 DEF_GM( return new TypefaceRenderingGM(); ) | 278 DEF_GM( return new TypefaceRenderingGM(); ) |
| OLD | NEW |