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

Side by Side Diff: gm/mixedtextblobs.cpp

Issue 1202433002: Change large glyph check back to greater-than threshold. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | src/gpu/GrAtlasTextContext.cpp » ('j') | 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 2013 Google Inc. 2 * Copyright 2013 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 fEmojiText = "\xF0\x9F\x92\xB0" "\xF0\x9F\x8F\xA1" "\xF0\x9F\x8E\x85" // 💰🏡🎅 47 fEmojiText = "\xF0\x9F\x92\xB0" "\xF0\x9F\x8F\xA1" "\xF0\x9F\x8E\x85" // 💰🏡🎅
48 "\xF0\x9F\x8D\xAA" "\xF0\x9F\x8D\x95" "\xF0\x9F\x9A\x80"; / / 🍪🍕🚀 48 "\xF0\x9F\x8D\xAA" "\xF0\x9F\x8D\x95" "\xF0\x9F\x9A\x80"; / / 🍪🍕🚀
49 #endif 49 #endif
50 fReallyBigATypeface.reset(GetResourceAsTypeface("/fonts/ReallyBigA.ttf") ); 50 fReallyBigATypeface.reset(GetResourceAsTypeface("/fonts/ReallyBigA.ttf") );
51 51
52 SkTextBlobBuilder builder; 52 SkTextBlobBuilder builder;
53 53
54 // make textblob 54 // make textblob
55 // Text so large we draw as paths 55 // Text so large we draw as paths
56 SkPaint paint; 56 SkPaint paint;
57 paint.setTextSize(384); 57 paint.setTextSize(385);
58 const char* text = "O"; 58 const char* text = "O";
59 sk_tool_utils::set_portable_typeface(&paint); 59 sk_tool_utils::set_portable_typeface(&paint);
60 60
61 SkRect bounds; 61 SkRect bounds;
62 paint.measureText(text, strlen(text), &bounds); 62 paint.measureText(text, strlen(text), &bounds);
63 63
64 SkScalar yOffset = bounds.height(); 64 SkScalar yOffset = bounds.height();
65 sk_tool_utils::add_to_text_blob(&builder, text, paint, 10, yOffset); 65 sk_tool_utils::add_to_text_blob(&builder, text, paint, 10, yOffset);
66 SkScalar corruptedAx = bounds.width(); 66 SkScalar corruptedAx = bounds.width();
67 SkScalar corruptedAy = yOffset; 67 SkScalar corruptedAy = yOffset;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 static const int kWidth = 1250; 158 static const int kWidth = 1250;
159 static const int kHeight = 700; 159 static const int kHeight = 700;
160 160
161 typedef GM INHERITED; 161 typedef GM INHERITED;
162 }; 162 };
163 163
164 ////////////////////////////////////////////////////////////////////////////// 164 //////////////////////////////////////////////////////////////////////////////
165 165
166 DEF_GM( return SkNEW(MixedTextBlobsGM); ) 166 DEF_GM( return SkNEW(MixedTextBlobsGM); )
167 } 167 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698