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

Side by Side Diff: gm/textblob.cpp

Issue 1620333002: Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « bench/nanobench.cpp ('k') | include/config/SkUserConfig.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 SkTDArray<SkScalar> pos; 163 SkTDArray<SkScalar> pos;
164 for (unsigned i = 0; i < count; ++i) { 164 for (unsigned i = 0; i < count; ++i) {
165 *pos.append() = offset.x() + i * advanceX; 165 *pos.append() = offset.x() + i * advanceX;
166 *pos.append() = offset.y() + i * (advanceY / count); 166 *pos.append() = offset.y() + i * (advanceY / count);
167 } 167 }
168 168
169 memcpy(buf.glyphs, fGlyphs.begin() + currentGlyph, count * s izeof(uint16_t)); 169 memcpy(buf.glyphs, fGlyphs.begin() + currentGlyph, count * s izeof(uint16_t));
170 memcpy(buf.pos, pos.begin(), count * sizeof(SkScalar) * 2); 170 memcpy(buf.pos, pos.begin(), count * sizeof(SkScalar) * 2);
171 } break; 171 } break;
172 default: 172 default:
173 SK_ABORT("unhandled pos value"); 173 SkFAIL("unhandled pos value");
174 } 174 }
175 175
176 currentGlyph += count; 176 currentGlyph += count;
177 } 177 }
178 } 178 }
179 179
180 return builder.build(); 180 return builder.build();
181 } 181 }
182 182
183 SkTDArray<uint16_t> fGlyphs; 183 SkTDArray<uint16_t> fGlyphs;
184 SkAutoTUnref<SkTypeface> fTypeface; 184 SkAutoTUnref<SkTypeface> fTypeface;
185 const char* fText; 185 const char* fText;
186 typedef skiagm::GM INHERITED; 186 typedef skiagm::GM INHERITED;
187 }; 187 };
188 188
189 DEF_GM(return new TextBlobGM("hamburgefons");) 189 DEF_GM(return new TextBlobGM("hamburgefons");)
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | include/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698