gsk: Avoid copying GL texture in more cases
authorMatthias Clasen <mclasen@redhat.com>
Thu, 23 Mar 2023 12:47:54 +0000 (08:47 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 24 Mar 2023 03:17:54 +0000 (23:17 -0400)
commit22ea1af569f1028fa53eba76822d553ccfff82f6
tree78c275cea103239ba1a03d2561fb1325ce205648
parent7cb7e0ab3537f95d4751b296beeff97c56cefea4
gsk: Avoid copying GL texture in more cases

When the GL texture already has a mipmap, we don't
have to download and reupload it to generate one.

We differentiate the handling for texture scale nodes,
where we do want to force the mipmap creation even if
it requires us to reupload the GL texture, and plain
texture nodes, where we just take advantage of a
preexisting mipmap to allow trilinear filtering for
downscaling, or create one if we have to upload the
texture anyway.
gsk/gl/gskgldriver.c
gsk/gl/gskglrenderjob.c