mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 08:42:59 +00:00
[config] Add HB_OPTIMIZE_SIZE_VAL
This commit is contained in:
parent
726590ed5f
commit
1056590f00
3 changed files with 7 additions and 11 deletions
|
@ -186,6 +186,11 @@
|
|||
#define HB_OPTIMIZE_SIZE
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HB_OPTIMIZE_SIZE
|
||||
#define HB_OPTIMIZE_SIZE_VAL 1
|
||||
#else
|
||||
#define HB_OPTIMIZE_SIZE_VAL 0
|
||||
#endif
|
||||
|
||||
#ifdef HB_OPTIMIZE_SIZE
|
||||
#define HB_NO_OT_LAYOUT_LOOKUP_CACHE
|
||||
|
|
|
@ -368,14 +368,7 @@ struct gvar
|
|||
hb_memset (deltas.arrayZ, 0, deltas.get_size ());
|
||||
}
|
||||
|
||||
bool optimize_size =
|
||||
#ifdef HB_OPTIMIZE_SIZE
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
;
|
||||
if (optimize_size)
|
||||
if (HB_OPTIMIZE_SIZE_VAL)
|
||||
{
|
||||
for (unsigned int i = 0; i < num_deltas; i++)
|
||||
{
|
||||
|
|
|
@ -290,13 +290,11 @@ struct hb_vector_t
|
|||
copy_vector (const hb_vector_t &other)
|
||||
{
|
||||
length = other.length;
|
||||
#ifndef HB_OPTIMIZE_SIZE
|
||||
if (sizeof (T) >= sizeof (long long))
|
||||
if (!HB_OPTIMIZE_SIZE_VAL && sizeof (T) >= sizeof (long long))
|
||||
/* This runs faster because of alignment. */
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
arrayZ[i] = other.arrayZ[i];
|
||||
else
|
||||
#endif
|
||||
hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size);
|
||||
}
|
||||
template <typename T = Type,
|
||||
|
|
Loading…
Add table
Reference in a new issue