Skip to content
Commit 489e6ded authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Optimize text rendering for long lines

QTextLayout::draw does not take into account QPainter's viewport, so it will try to render
lines outside visible bounds. This causes a significant slowdown when a very long line is
dynamically broken into multiple lines. To avoid this, an explicit text clip rect is set.

To avoid making assumptions on the world transform of the painter (it could be
sheared or rotated, after all), an explicit clip rect is used instead of guessing
whether the resulting line would end up outside the screen or not.
parent 7f872975
Pipeline #390337 failed with stage
in 17 minutes and 30 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment