You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
[Complex Text Layouts] Performance optimizations.
This commit is contained in:
@@ -1240,10 +1240,13 @@ void TextEdit::_notification(int p_what) {
|
||||
|
||||
ofs_y += (row_height - text_height) / 2;
|
||||
|
||||
const Vector<TextServer::Glyph> glyphs = TS->shaped_text_get_glyphs(rid);
|
||||
const Vector<TextServer::Glyph> visual = TS->shaped_text_get_glyphs(rid);
|
||||
const TextServer::Glyph *glyphs = visual.ptr();
|
||||
int gl_size = visual.size();
|
||||
|
||||
ofs_y += ldata->get_line_ascent(line_wrap_index);
|
||||
float char_ofs = 0.f;
|
||||
for (int j = 0; j < glyphs.size(); j++) {
|
||||
for (int j = 0; j < gl_size; j++) {
|
||||
if (color_map.has(glyphs[j].start)) {
|
||||
current_color = color_map[glyphs[j].start].get("color");
|
||||
if (readonly && current_color.a > cache.font_color_readonly.a) {
|
||||
|
||||
Reference in New Issue
Block a user