Internally, OpenGL scene plugin stores each decoration in a texture
atlas to avoid unnecessary texture bind calls. This works great until
there is no need for the linear filter. If the texture atlas is scaled
and the linear filter is used, texture bleeding could happen.
{F5916192, layout=center, size=full}
Texture bleeding happens because linear filter samples texels that are
outside of a subtexture.
There are several ways to fix the texture bleeding:
* the first one is so known "half pixel correction". With half pixel
correction value of half a texel is added or subtracted so when linear
filter comes in it samples texels in desired region;
* another way to fix the texture bleeding are array texture.
Unfortunately, decoration pieces could have different size so array
textures wouldn't help;
* and the last one is to pad each subtexture.
It's very easy to implement half pixel correction. But because mapped
subtexture is smaller by 1px, the linear filter would always kick in and
"blur" fonts.
So, the only choice we have is to pad each subtexture. This diff, as its
name suggests, makes decoration renderer to pad each decoration piece by
1px:
{F5916193, layout=center, size=full}
//Decoration atlas for active Dolphin window.//
Yet, there are still some problems on X11. Because window pixmaps also
include window decorations, clamp to edge would not help. I.e. window
pixmaps bleed on X11.
{F5916195, layout=center, size=full}
//X11: Zoom effect.//
{F5916196, layout=center, size=full}
//Wayland: Zoom effect.//
CCBUG: 360549