mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 07:51:10 +01:00
[varc] Micro-optimize
This commit is contained in:
1 parent
d07d70aef1
commit
4e0845ab7b
2 files changed
+5
-5
No files matched your search
@@ -191,7 +191,7 @@ VarComponent::get_path_at (hb_font_t *font,
|
||||
{
|
||||
unsigned axisIndicesIndex;
|
||||
READ_UINT32VAR (axisIndicesIndex);
|
||||
axisIndices = (&VARC+VARC.axisIndicesList)[axisIndicesIndex];
|
||||
axisIndices = std::move((&VARC+VARC.axisIndicesList)[axisIndicesIndex]);
|
||||
axisValuesInt.resize (axisIndices.length);
|
||||
const HBUINT8 *p = (const HBUINT8 *) record.arrayZ;
|
||||
TupleValues::decompile (p, axisValuesInt, (const HBUINT8 *) end);
|
||||
|
||||
@@ -3139,21 +3139,21 @@ struct MultiVarData
|
||||
return;
|
||||
|
||||
hb_vector_t<int> values_vector = deltaSets[inner];
|
||||
hb_array_t<int> values = values_vector;
|
||||
int *values = values_vector.arrayZ;
|
||||
|
||||
unsigned regionCount = regionIndices.len;
|
||||
unsigned tupleLength = values.length / regionCount;
|
||||
unsigned tupleLength = values_vector.length / regionCount;
|
||||
unsigned count = hb_min (tupleLength, out.length);
|
||||
for (unsigned regionIndex = 0; regionIndex < regionCount; regionIndex++)
|
||||
{
|
||||
float scalar = regions.evaluate (regionIndices[regionIndex],
|
||||
float scalar = regions.evaluate (regionIndices.arrayZ[regionIndex],
|
||||
coords, coord_count,
|
||||
cache);
|
||||
if (scalar)
|
||||
{
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
{
|
||||
out[i] += values.arrayZ[i] * scalar;
|
||||
out[i] += values[i] * scalar;
|
||||
}
|
||||
}
|
||||
values += tupleLength;
|
||||
|
||||
Reference in new issue
Block a user