diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-18 10:17:55 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-19 09:34:44 +0300 |
commit | cfcdfc38e275d8766e69621a001422030e515173 (patch) | |
tree | 3071402a730d6459a3fad9b575c5fb0264f5a939 /modules/text_server_fb | |
parent | 5631b59e218f4883442382c097eed10ed76b3c8d (diff) |
[RTL] Add support for shaping in background thread.
Diffstat (limited to 'modules/text_server_fb')
-rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index c53ca7766a..498b58175e 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -853,6 +853,8 @@ _FORCE_INLINE_ void TextServerFallback::_font_clear_cache(FontDataFallback *p_fo } RID TextServerFallback::create_font() { + _THREAD_SAFE_METHOD_ + FontDataFallback *fd = memnew(FontDataFallback); return font_owner.make_rid(fd); @@ -2429,6 +2431,7 @@ void TextServerFallback::full_copy(ShapedTextDataFallback *p_shaped) { RID TextServerFallback::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) { _THREAD_SAFE_METHOD_ + ShapedTextDataFallback *sd = memnew(ShapedTextDataFallback); sd->direction = p_direction; sd->orientation = p_orientation; @@ -2807,6 +2810,8 @@ void TextServerFallback::_realign(ShapedTextDataFallback *p_sd) const { } RID TextServerFallback::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const { + _THREAD_SAFE_METHOD_ + const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped); ERR_FAIL_COND_V(!sd, RID()); |