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

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

Issue 1723043002: Roll HarfBuzz to 1.2.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include upstream ebd7431f824 Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright © 1998-2004 David Turner and Werner Lemberg 2 * Copyright © 1998-2004 David Turner and Werner Lemberg
3 * Copyright © 2004,2007,2009,2010 Red Hat, Inc. 3 * Copyright © 2004,2007,2009,2010 Red Hat, Inc.
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 bool 401 bool
402 hb_buffer_t::move_to (unsigned int i) 402 hb_buffer_t::move_to (unsigned int i)
403 { 403 {
404 if (!have_output) 404 if (!have_output)
405 { 405 {
406 assert (i <= len); 406 assert (i <= len);
407 idx = i; 407 idx = i;
408 return true; 408 return true;
409 } 409 }
410 if (unlikely (in_error))
411 return false;
410 412
411 assert (i <= out_len + (len - idx)); 413 assert (i <= out_len + (len - idx));
412 414
413 if (out_len < i) 415 if (out_len < i)
414 { 416 {
415 unsigned int count = i - out_len; 417 unsigned int count = i - out_len;
416 if (unlikely (!make_room_for (count, count))) return false; 418 if (unlikely (!make_room_for (count, count))) return false;
417 419
418 memmove (out_info + out_len, info + idx, count * sizeof (out_info[0])); 420 memmove (out_info + out_len, info + idx, count * sizeof (out_info[0]));
419 idx += count; 421 idx += count;
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 } 1869 }
1868 } 1870 }
1869 1871
1870 bool 1872 bool
1871 hb_buffer_t::message_impl (hb_font_t *font, const char *fmt, va_list ap) 1873 hb_buffer_t::message_impl (hb_font_t *font, const char *fmt, va_list ap)
1872 { 1874 {
1873 char buf[100]; 1875 char buf[100];
1874 vsnprintf (buf, sizeof (buf), fmt, ap); 1876 vsnprintf (buf, sizeof (buf), fmt, ap);
1875 return (bool) this->message_func (this, font, buf, this->message_data); 1877 return (bool) this->message_func (this, font, buf, this->message_data);
1876 } 1878 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-blob.cc ('k') | third_party/harfbuzz-ng/src/hb-buffer-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698