mirror of
https://github.com/godotengine/godot
synced 2024-09-05 19:59:37 +00:00
[TextServer] Remove excessive Dictionary checks.
This commit is contained in:
parent
fa3428ff25
commit
31a8a9b2e1
|
@ -2383,11 +2383,9 @@ void TextServerAdvanced::_font_set_variation_coordinates(const RID &p_font_rid,
|
|||
ERR_FAIL_COND(!fd);
|
||||
|
||||
MutexLock lock(fd->mutex);
|
||||
if (fd->variation_coordinates != p_variation_coordinates) {
|
||||
_font_clear_cache(fd);
|
||||
fd->variation_coordinates = p_variation_coordinates;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary TextServerAdvanced::_font_get_variation_coordinates(const RID &p_font_rid) const {
|
||||
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
|
||||
|
|
|
@ -1376,11 +1376,9 @@ void TextServerFallback::_font_set_variation_coordinates(const RID &p_font_rid,
|
|||
ERR_FAIL_COND(!fd);
|
||||
|
||||
MutexLock lock(fd->mutex);
|
||||
if (fd->variation_coordinates != p_variation_coordinates) {
|
||||
_font_clear_cache(fd);
|
||||
fd->variation_coordinates = p_variation_coordinates;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary TextServerFallback::_font_get_variation_coordinates(const RID &p_font_rid) const {
|
||||
FontFallback *fd = font_owner.get_or_null(p_font_rid);
|
||||
|
|
|
@ -2833,11 +2833,9 @@ Ref<Font> FontVariation::_get_base_font_or_default() const {
|
|||
}
|
||||
|
||||
void FontVariation::set_variation_opentype(const Dictionary &p_coords) {
|
||||
if (variation.opentype != p_coords) {
|
||||
variation.opentype = p_coords;
|
||||
_invalidate_rids();
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary FontVariation::get_variation_opentype() const {
|
||||
return variation.opentype;
|
||||
|
@ -2877,11 +2875,9 @@ int FontVariation::get_variation_face_index() const {
|
|||
}
|
||||
|
||||
void FontVariation::set_opentype_features(const Dictionary &p_features) {
|
||||
if (opentype_features != p_features) {
|
||||
opentype_features = p_features;
|
||||
_invalidate_rids();
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary FontVariation::get_opentype_features() const {
|
||||
return opentype_features;
|
||||
|
|
Loading…
Reference in a new issue