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

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

Issue 10510004: Roll harfbuzz-ng 3b8fd9c48f4bde368bf2d465c148b9743a9216ee (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 | « third_party/harfbuzz-ng/src/hb-blob.h ('k') | third_party/harfbuzz-ng/src/hb-buffer.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 © 2009 Red Hat, Inc. 2 * Copyright © 2009 Red Hat, Inc.
3 * 3 *
4 * This is part of HarfBuzz, a text shaping library. 4 * This is part of HarfBuzz, a text shaping library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (blob->mode == HB_MEMORY_MODE_WRITABLE) 294 if (blob->mode == HB_MEMORY_MODE_WRITABLE)
295 return TRUE; 295 return TRUE;
296 296
297 if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE && _try_writable_i nplace (blob)) 297 if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE && _try_writable_i nplace (blob))
298 return TRUE; 298 return TRUE;
299 299
300 if (blob->mode == HB_MEMORY_MODE_WRITABLE) 300 if (blob->mode == HB_MEMORY_MODE_WRITABLE)
301 return TRUE; 301 return TRUE;
302 302
303 303
304 DEBUG_MSG_FUNC (BLOB, blob, "currect data is -> %p\n", blob->data); 304 DEBUG_MSG_FUNC (BLOB, blob, "current data is -> %p\n", blob->data);
305 305
306 char *new_data; 306 char *new_data;
307 307
308 new_data = (char *) malloc (blob->length); 308 new_data = (char *) malloc (blob->length);
309 if (unlikely (!new_data)) 309 if (unlikely (!new_data))
310 return FALSE; 310 return FALSE;
311 311
312 DEBUG_MSG_FUNC (BLOB, blob, "dupped successfully -> %p\n", blob->data); 312 DEBUG_MSG_FUNC (BLOB, blob, "dupped successfully -> %p\n", blob->data);
313 313
314 memcpy (new_data, blob->data, blob->length); 314 memcpy (new_data, blob->data, blob->length);
315 _hb_blob_destroy_user_data (blob); 315 _hb_blob_destroy_user_data (blob);
316 blob->mode = HB_MEMORY_MODE_WRITABLE; 316 blob->mode = HB_MEMORY_MODE_WRITABLE;
317 blob->data = new_data; 317 blob->data = new_data;
318 blob->user_data = new_data; 318 blob->user_data = new_data;
319 blob->destroy = free; 319 blob->destroy = free;
320 320
321 return TRUE; 321 return TRUE;
322 } 322 }
323 323
324 324
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-blob.h ('k') | third_party/harfbuzz-ng/src/hb-buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698