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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-graphite2.cc

Issue 475363002: Roll HarfBuzz to 0.9.35 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows build fix attempt Created 6 years, 4 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 | « third_party/harfbuzz-ng/src/hb-ft.cc ('k') | third_party/harfbuzz-ng/src/hb-mutex-private.hh » ('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 © 2011 Martin Hosken 2 * Copyright © 2011 Martin Hosken
3 * Copyright © 2011 SIL International 3 * Copyright © 2011 SIL International
4 * Copyright © 2011,2012 Google, Inc. 4 * Copyright © 2011,2012 Google, Inc.
5 * 5 *
6 * This is part of HarfBuzz, a text shaping library. 6 * This is part of HarfBuzz, a text shaping library.
7 * 7 *
8 * Permission is hereby granted, without written agreement and without 8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this 9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the 10 * software and its documentation for any purpose, provided that the
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 if (unlikely (!glyph_count)) { 267 if (unlikely (!glyph_count)) {
268 if (feats) gr_featureval_destroy (feats); 268 if (feats) gr_featureval_destroy (feats);
269 gr_seg_destroy (seg); 269 gr_seg_destroy (seg);
270 return false; 270 return false;
271 } 271 }
272 272
273 scratch = buffer->get_scratch_buffer (&scratch_size); 273 scratch = buffer->get_scratch_buffer (&scratch_size);
274 while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scra tch)) + 274 while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scra tch)) +
275 DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size) 275 DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size)
276 { 276 {
277 buffer->ensure (buffer->allocated * 2); 277 if (unlikely (!buffer->ensure (buffer->allocated * 2)))
278 if (unlikely (buffer->in_error)) { 278 {
279 if (feats) gr_featureval_destroy (feats); 279 if (feats) gr_featureval_destroy (feats);
280 gr_seg_destroy (seg); 280 gr_seg_destroy (seg);
281 return false; 281 return false;
282 } 282 }
283 scratch = buffer->get_scratch_buffer (&scratch_size); 283 scratch = buffer->get_scratch_buffer (&scratch_size);
284 } 284 }
285 285
286 #define ALLOCATE_ARRAY(Type, name, len) \ 286 #define ALLOCATE_ARRAY(Type, name, len) \
287 Type *name = (Type *) scratch; \ 287 Type *name = (Type *) scratch; \
288 { \ 288 { \
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx; 367 pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx;
368 368
369 if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) 369 if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
370 hb_buffer_reverse_clusters (buffer); 370 hb_buffer_reverse_clusters (buffer);
371 371
372 if (feats) gr_featureval_destroy (feats); 372 if (feats) gr_featureval_destroy (feats);
373 gr_seg_destroy (seg); 373 gr_seg_destroy (seg);
374 374
375 return true; 375 return true;
376 } 376 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ft.cc ('k') | third_party/harfbuzz-ng/src/hb-mutex-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698