text: Fix issue with TextNode::set_text() called from non-App stage

Because TextEncoder is not pipeline-cycled, text_changed() should propagate text changes up to stage 0.

See #1070; this caused the frame rate meter to show 0.0 fps most of the frames.
This commit is contained in:
rdb 2020-12-21 16:52:16 +01:00
parent dfc5b47ec9
commit 8dd3301c43

View File

@ -341,7 +341,7 @@ void TextNode::
text_changed() {
// Copy the text to this class, since TextEncoder doesn't store it in a
// pipeline-cycled manner.
CDWriter cdata(_cycler);
CDWriter cdata(_cycler, true);
cdata->_text = TextEncoder::get_text();
cdata->_wtext = TextEncoder::get_wtext();
invalidate_with_measure(cdata);