Blit the contents of the window texture to a separate mipmap texture, and (re)generate the mipmaps on each damage event.
The mipmap filter is the default linear filter, which results in soft images. Using a filter with a sharpening kernel, such as a cubic or a windowed sinc filter would produce better results, but this is still an improvement over not using a mipmap filter at all.
The scaling is gamma-correct when desktop GL is used.
Note that this patch only modifies the GLX path.
BUG: 390457