|
|
@ -2601,6 +2601,8 @@ struct VarRegionAxis |
|
|
|
DEFINE_SIZE_STATIC (6); |
|
|
|
DEFINE_SIZE_STATIC (6); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define REGION_CACHE_ITEM_CACHE_INVALID 2.f |
|
|
|
|
|
|
|
|
|
|
|
struct VarRegionList |
|
|
|
struct VarRegionList |
|
|
|
{ |
|
|
|
{ |
|
|
|
using cache_t = float; |
|
|
|
using cache_t = float; |
|
|
@ -2616,7 +2618,7 @@ struct VarRegionList |
|
|
|
if (cache) |
|
|
|
if (cache) |
|
|
|
{ |
|
|
|
{ |
|
|
|
cached = &(cache[region_index]); |
|
|
|
cached = &(cache[region_index]); |
|
|
|
if (!std::isnan (*cached)) |
|
|
|
if (*cached != REGION_CACHE_ITEM_CACHE_INVALID) |
|
|
|
return *cached; |
|
|
|
return *cached; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2875,8 +2877,10 @@ struct VariationStore |
|
|
|
float *cache = (float *) hb_malloc (sizeof (float) * count); |
|
|
|
float *cache = (float *) hb_malloc (sizeof (float) * count); |
|
|
|
if (unlikely (!cache)) return nullptr; |
|
|
|
if (unlikely (!cache)) return nullptr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (unsigned i = 0; i < count; i++) |
|
|
|
for (unsigned i = 0; i < count; i++) |
|
|
|
cache[i] = NAN; |
|
|
|
cache[i] = REGION_CACHE_ITEM_CACHE_INVALID; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return cache; |
|
|
|
return cache; |
|
|
|
} |
|
|
|
} |
|
|
@ -3035,6 +3039,8 @@ struct VariationStore |
|
|
|
DEFINE_SIZE_ARRAY_SIZED (8, dataSets); |
|
|
|
DEFINE_SIZE_ARRAY_SIZED (8, dataSets); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef REGION_CACHE_ITEM_CACHE_INVALID |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Feature Variations |
|
|
|
* Feature Variations |
|
|
|
*/ |
|
|
|
*/ |
|
|
|