Use our own loader to (de)serialiaze textures
to and from png and tiff.
We still fall back to gdk-pixbuf for handling all
the other image formats, and for pixbufs.
This is a companion to gdk_texture_save_to_png, using
the tiff format, which will let us avoid lossy conversion
of HDR data, since we can store floating point data.
Add support for the tiff format, which is flexible
enough to handle all our memory texture formats
without loss.
As a consequence, we are now linking against libtiff.
Using libpng instead of the lowest-common-denominator
gdk-pixbuf loader. This will allow us to load >8bit data,
and apply gamma and color correction in the future.
For now, this still just provides RGBA8 data.
As a consequence, we are now linking against libpng.
Color values must be divisible by 15 to be convertible into U8 and U16
values with the same result. 0x80 is not one of these values, so switch
it to 0x99.
We avoid an offscreen if we know the child node
can 'handle' the transform. Shadow nodes can if their
child node does - either the child node is a text node
in which case the shortcuts we take for shadow nodes
will work fine with the transform (we just render the
text node offset), or the child is not a text node,
in which case we render the shadow to an offscreen
anyway.
This change makes the label-shadows reftest pass with
the GL renderer, not by fixing the issue but by avoiding
it.
For shadow nodes, we try pretty hard to avoid
rendering shadows, and and we have a shortcut
that just renders text offset, but we can try
harder to do nothing - if the text is offset
by zero, we don't need to draw it at all.
Tests that overdrawing of content inside an opacity node happens before
the opacity is applied.
This is broken in the GL renderer and causes the opacity.ui reftest to
fail.
We need to use an offscreen whenever there is overlapping
children somewhere in the tree below, just checking the
direct child of the opacity node is not enough.
Fixes: #4261
This also switches the rendering code from using gsk_render_node_draw()
to gsk_renderer_render_texture().
Some tests are broken with the GL renderer, so this patch forces the
Cairo renderer until they get fixed.
The test used to test that GtkBox ordered it's children left-to-right in
CSS, no matter the text direction or pack-type.
But there is neither a pack-type anymore nor does GTK4 do that.
So that test has been broken for yers, it just didn't render anything
wrong.
GLES only allows downloading float if the texture matches specific
criteria and I'm too lazy to determine them, so always fall back.
And the custom stride fallback code isn't necessary, because falling
back does exactly that step already.