Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: gm/typeface.cpp

Issue 2150483003: Disable aliased font test on iOS. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 SkISize onISize() override { 171 SkISize onISize() override {
172 return SkISize::Make(640, 680); 172 return SkISize::Make(640, 680);
173 } 173 }
174 174
175 void onDraw(SkCanvas* canvas) override { 175 void onDraw(SkCanvas* canvas) override {
176 struct AliasType { 176 struct AliasType {
177 bool antiAlias; 177 bool antiAlias;
178 bool subpixelAntitalias; 178 bool subpixelAntitalias;
179 bool inLayer; 179 bool inLayer;
180 } constexpr aliasTypes[] { 180 } constexpr aliasTypes[] {
181 #ifndef SK_BUILD_FOR_IOS
182 // This gm crashes on iOS when drawing an embedded bitmap when reque sting aliased rendering.
183 // The crash looks like
184 // libTrueTypeScaler.dylib`<redacted> + 80
185 // stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=.. .)
186 // -> 0x330b19d0 <+80>: strd r2, r3, [r5, #36]
187 // 0x330b19d4 <+84>: movs r3, #0x0
188 // 0x330b19d6 <+86>: add r2, sp, #0x28
189 // 0x330b19d8 <+88>: ldr r0, [r4, #0x4]
190 // Disable testing embedded bitmaps on iOS for now.
191 // See https://bug.skia.org/5530 .
181 { false, false, false }, // aliased 192 { false, false, false }, // aliased
193 #endif
182 { true, false, false }, // anti-aliased 194 { true, false, false }, // anti-aliased
183 { true, true , false }, // subpixel anti-aliased 195 { true, true , false }, // subpixel anti-aliased
184 { true, false, true }, // anti-aliased in layer (flat pixel geome try) 196 { true, false, true }, // anti-aliased in layer (flat pixel geome try)
185 { true, true , true }, // subpixel anti-aliased in layer (flat pi xel geometry) 197 { true, true , true }, // subpixel anti-aliased in layer (flat pi xel geometry)
186 }; 198 };
187 199
188 // The hintgasp.ttf is designed for the following sizes to be different. 200 // The hintgasp.ttf is designed for the following sizes to be different.
189 // GASP_DOGRAY 0x0002 0<=ppem<=10 201 // GASP_DOGRAY 0x0002 0<=ppem<=10
190 // GASP_SYMMETRIC_SMOOTHING 0x0008 0<=ppem<=10 202 // GASP_SYMMETRIC_SMOOTHING 0x0008 0<=ppem<=10
191 // GASP_GRIDFIT 0x0001 11<=ppem<=12 203 // GASP_GRIDFIT 0x0001 11<=ppem<=12
192 // GASP_SYMMETRIC_GRIDFIT 0x0004 11<=ppem<=12 204 // GASP_SYMMETRIC_GRIDFIT 0x0004 11<=ppem<=12
193 // GASP_DOGRAY|GASP_GRIDFIT 0x0003 13<=ppem<=14 205 // GASP_DOGRAY|GASP_GRIDFIT 0x0003 13<=ppem<=14
194 // GASP_SYMMETRIC_SMOOTHING|GASP_SYMMETRIC_GRIDFIT 0x000C 13<=ppem<=14 206 // GASP_SYMMETRIC_SMOOTHING|GASP_SYMMETRIC_GRIDFIT 0x000C 13<=ppem<=14
195 // (neither) 0x0000 15<=ppem 207 // (neither) 0x0000 15<=ppem
196 // Odd sizes have embedded bitmaps. 208 // Odd sizes have embedded bitmaps.
197 #ifdef SK_BUILD_FOR_IOS
198 // This gm crashes on iOS when drawing an embedded bitmap when requestin g aliased rendering.
199 // The crash looks like
200 // libTrueTypeScaler.dylib`<redacted> + 80
201 // stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=...)
202 // -> 0x330b19d0 <+80>: strd r2, r3, [r5, #36]
203 // 0x330b19d4 <+84>: movs r3, #0x0
204 // 0x330b19d6 <+86>: add r2, sp, #0x28
205 // 0x330b19d8 <+88>: ldr r0, [r4, #0x4]
206 // Disable testing embedded bitmaps on iOS for now.
207 // See https://bug.skia.org/5530 .
208 constexpr SkScalar textSizes[] = { 10, 12, 14, 16 };
209 #else
210 constexpr SkScalar textSizes[] = { 9, 10, 11, 12, 13, 14, 15, 16 }; 209 constexpr SkScalar textSizes[] = { 9, 10, 11, 12, 13, 14, 15, 16 };
211 #endif
212 210
213 constexpr SkPaint::Hinting hintingTypes[] = { SkPaint::kNo_Hinting, 211 constexpr SkPaint::Hinting hintingTypes[] = { SkPaint::kNo_Hinting,
214 SkPaint::kSlight_Hinting, 212 SkPaint::kSlight_Hinting,
215 SkPaint::kNormal_Hinting, 213 SkPaint::kNormal_Hinting,
216 SkPaint::kFull_Hinting }; 214 SkPaint::kFull_Hinting };
217 215
218 struct SubpixelType { 216 struct SubpixelType {
219 bool requested; 217 bool requested;
220 SkVector offset; 218 SkVector offset;
221 } constexpr subpixelTypes[] = { 219 } constexpr subpixelTypes[] = {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 277
280 private: 278 private:
281 typedef skiagm::GM INHERITED; 279 typedef skiagm::GM INHERITED;
282 }; 280 };
283 281
284 /////////////////////////////////////////////////////////////////////////////// 282 ///////////////////////////////////////////////////////////////////////////////
285 283
286 DEF_GM( return new TypefaceStylesGM(false); ) 284 DEF_GM( return new TypefaceStylesGM(false); )
287 DEF_GM( return new TypefaceStylesGM(true); ) 285 DEF_GM( return new TypefaceStylesGM(true); )
288 DEF_GM( return new TypefaceRenderingGM(); ) 286 DEF_GM( return new TypefaceRenderingGM(); )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698