Fix potential crash when displaying multiscripted text
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 5 May 2011 14:49:06 +0000 (16:49 +0200)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Fri, 6 May 2011 07:56:25 +0000 (09:56 +0200)
commit27c5aabe9bd9d4881262312588ece7713de67ad4
tree3384723fdc30e3338598cc35c42a01900abb385d
parent55ff812974dd038a597cd968b66c07b6aeff74b2
Fix potential crash when displaying multiscripted text

Shaping has to be done in the current thread, otherwise the
font engines index for each glyph (referenced in the msb of the glyph
index) might not be valid yet, because the font engines list is
populated when shaping is done. So we need to make sure that the
render thread relayouts. Geometry changes will already cause a
relayout, which will in turn cause another relayout when the
paint node is updated. There doesn't seem to be any convenient
and safe way of avoiding this doubling of the layout step if we
want to have rendering in a different thread than the QML graph.

Reviewed-by: Gunnar
src/declarative/items/qsgtext.cpp
src/declarative/items/qsgtext_p_p.h