[atomic-int] Rename get/set
This commit is contained in:
parent
afe6629b2f
commit
d3f2287e0b
|
@ -160,9 +160,9 @@ struct hb_atomic_int_t
|
||||||
constexpr hb_atomic_int_t (int v) : v (v) {}
|
constexpr hb_atomic_int_t (int v) : v (v) {}
|
||||||
|
|
||||||
void set_relaxed (int v_) { hb_atomic_int_impl_set_relaxed (&v, v_); }
|
void set_relaxed (int v_) { hb_atomic_int_impl_set_relaxed (&v, v_); }
|
||||||
void set (int v_) { hb_atomic_int_impl_set (&v, v_); }
|
void set_release (int v_) { hb_atomic_int_impl_set (&v, v_); }
|
||||||
int get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); }
|
int get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); }
|
||||||
int get () const { return hb_atomic_int_impl_get (&v); }
|
int get_acquire () const { return hb_atomic_int_impl_get (&v); }
|
||||||
int inc () { return hb_atomic_int_impl_add (&v, 1); }
|
int inc () { return hb_atomic_int_impl_add (&v, 1); }
|
||||||
int dec () { return hb_atomic_int_impl_add (&v, -1); }
|
int dec () { return hb_atomic_int_impl_add (&v, -1); }
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data,
|
||||||
hb_free (cache);
|
hb_free (cache);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
ot_font->cached_coords_serial.set (font->serial_coords);
|
ot_font->cached_coords_serial.set_release (font->serial_coords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
|
@ -197,10 +197,10 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Use cache. */
|
{ /* Use cache. */
|
||||||
if (ot_font->cached_coords_serial.get () != (int) font->serial_coords)
|
if (ot_font->cached_coords_serial.get_acquire () != (int) font->serial_coords)
|
||||||
{
|
{
|
||||||
ot_font->advance_cache->init ();
|
ot_font->advance_cache->init ();
|
||||||
ot_font->cached_coords_serial.set (font->serial_coords);
|
ot_font->cached_coords_serial.set_release (font->serial_coords);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
|
|
Loading…
Reference in New Issue