mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-31 01:25:50 +00:00
Slightly optimized repaint of text in messages when it is out of clip.
This commit is contained in:
@@ -1860,7 +1860,6 @@ void Message::paintText(
|
||||
const auto stm = context.messageStyle();
|
||||
p.setPen(stm->historyTextFg);
|
||||
p.setFont(st::msgFont);
|
||||
prepareCustomEmojiPaint(p, context, text());
|
||||
if (const auto botTop = Get<FakeBotAboutTop>()) {
|
||||
botTop->text.drawLeftElided(
|
||||
p,
|
||||
@@ -1870,6 +1869,10 @@ void Message::paintText(
|
||||
width());
|
||||
trect.setY(trect.y() + botTop->height);
|
||||
}
|
||||
if (!context.clip.intersects(trect)) {
|
||||
return;
|
||||
}
|
||||
prepareCustomEmojiPaint(p, context, text());
|
||||
auto highlightRequest = context.computeHighlightCache();
|
||||
text().draw(p, {
|
||||
.position = trect.topLeft(),
|
||||
|
||||
Reference in New Issue
Block a user