Skip to content

feat: add scaling setting for twitch gifs - #7315

Merged
pajlada merged 3 commits into
Chatterino:masterfrom
3r01:feat-twitch-gif-scaling
Oct 25, 2026
Merged

pajlada merged 3 commits into
Chatterino:masterfrom
3r01:feat-twitch-gif-scaling

Conversation

@3r01

@3r01 3r01 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Twitch gifs are currently displayed at a fixed size, which is somewhat smaller than on twitch web chat. This PR adds a Twitch GIF size setting, which has an option to match twitch web chat's sizing (1.4x (Twitch)).

Scaled twitch gifs now use smooth scaling because they look blocky without it. I did some profiling and this is not a performance concern. While spamming 10 gif messages per second, the average paint time without smooth scaling was 34 microseconds, and with smooth scaling it was 79 microseconds. It is over twice as long but still nowhere near the magnitude that we need to worry about, and the test was a deliberately extreme case.

I did also test smooth scaling for animated emotes, and I think it would be safe to use, but it is outside of the scope of this PR. In the same scenario at 12 animated emotes per message the paint time increased from 47 microseconds to 110 microseconds.

Comment thread src/messages/MessageElement.cpp
@pajlada
pajlada enabled auto-merge (squash) October 25, 2026 11:32
@pajlada
pajlada merged commit e7f23f4 into Chatterino:master Oct 25, 2026
18 checks passed
@3r01
3r01 deleted the feat-twitch-gif-scaling branch October 25, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants