This requires adding infrastructure to generate per-test data, so that
the random clip rect can be computed and reused for both test and
reference generation.
So add this infrastructure.
... and port the colorflip test.
This is so we can factor out generic parts of the code. This allows
making changes easier to those parts, like if we want to introduce
rules for what colorstates and memory depths to do diffs in.
We switched to using the Unicode (UTF-16) versions of the Windows API by
default, so we also obtain the display name in UTF-16 form as well.
This updates the implementation in the Windows backend so that we
properly acquire the names that we need in UTF-16, and then convert the
results to UTF-8, which is what we use in GTK/GLib.
When comparing textures, always pick the colorstate from the reference
texture. This allows us to define what color state we expect.
For now, there's no check that the color states are equal, because they
don't really have to be as long as the pixels are.
Always pick the color state from texture1 and download the data and
generate the diff in that color state.
That now means the order of the 2 arguments matters.
I first tried porting everything to float, but it turns out that that
makes a compare-render run (with all 1520 tests succeeding) 9s slower
so I decided to keep the existing U8 code.
A side benefit is that saving the diff to PNG will continue creating
U8 PNGs.
We use the renderer to create the reference for the rotate test by
applying the same rotate transform to the reference image instead of the
tested node.
This is somewhat suboptimal because they run very similar codepaths, but
this method works with high bit depth content and different colorstates
This concludes the port away from gdk-pixbuf and means that all rendered
content and reference images can now use high bit depth and colorstates.
We use the renderer to create the reference for the colorflip test by
applying the same colorflip matrix to the reference image instead of the
tested node.
This is somewhat suboptimal because they run very similar codepaths, but
this method works with high bit depth content and different colorstates
We use the renderer to create the reference for the clip test by
applying the same clip node to the reference image instead of the
tested node.
This is somewhat suboptimal because they run very similar codepaths, but
this method works with high bit depth content and different colorstates
We use the renderer to create the reference for the flip test by
applying the same transform node to the reference image instead of the
tested node.
This is somewhat suboptimal because they run very similar codepaths, but
this method works with high bit depth content and different colorstates
and the gdk-pixbuf method does not.
We use the renderer to create the reference for the repeat test by
applying the same repeat node to the reference image instead of the
tested node.
This is somewhat suboptimal because they run very similar codepaths, but
this method works with high bit depth content and different colorstates
and the gdk-pixbuf method does not.
After commit 447bc18c48 EGL on X11 broke.
But the handling of the GL context also was quite awkward because it was
unclear who was responsible for ensuring it got reset.
Change that by making gdk_gl_context_clear_current_if_surface() return
the context (with a reference because it might be the last reference) it
had unset, so that after changing EGL properties the code that caused
the clearing can re-make it current.
This moves the responsibility to the actual code that is dealing with
updating properties and frees the outer layers of code from that task.
And that means the X11 EGL code doesn't need to care and the code in the
Wayland backend that did care can be removed.
Related: !7662Fixes: #6964 on X11
This essentially reverts the changes from
c230546a2c but implies new semantics.
Namely, surface-attached contexts can now be bound to EGL_NO_SURFACE if
the windowing system isn't ready yet.
It is the task of the windowing system to make sure the context is
properly rebound when the contents become available.
We ensure this by checking in begin_frame() if we created the EGL window
and if we did, we make_current(). This works because creating the EGL
window creates the EGL surface and that does a clear_current(), so this
is always going to have the desired effect of re-making the current
context.
It is very convoluted though.
Fixes: #6964
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11784
Up-until now, when a group of check boxes was created, they were
still presented as checkboxes, even they semantically were radio buttons.
Note that this approach will not always work, because we're not recreating the
AT context, but it works for the usual pattern where the group is set during
object construction
The default implementation of unselect_all calls
set_selection, which SingleSelection does not have
an implementation for (it's unclear what it would
do with multiple selections). Add a straightforward
implementation for unselect_all.