Add an "RGBA" format that just maps to the swizzled version of the
default format.
This way, BGR gets mapped to RGB + swizzling first before trying to map
it to the default format for the depth.
The benefit here is that this format has the same memory width, so
uploading/downloading code can treat it equivalent to the original
format and there's no conversion neccessary later.
While not required by the GListModel interface, they are a useful
convention which is already implemented by other GListModel public
implementation in GTK, particularly for use in expressions and
bindings.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/6261
Now that we have gdk_gl_context_get_memory_flags() and code can use that
function, make the code do that.
Remove support checks from gdk_memory_format_gl_format().
This is an initial naive port that doesn't try to make use of the finer-grained
flags yet.
Checks which features of a given memory format are supported by
the current GL implementation.
We check:
* usable: Can be used as a texture with NEAREST filter
* renderable: Can be used as a render target
* filterable: Can be used with GL_LINEAR
In normal GL, all formats are all of these things, but GLES is a lot
more picky.
So far nobody uses this.
This is the result of experimenting with corner cases when blurring.
The result is a test that tests when the child of a blur node is
clipped out but the blurred child is not, the blurred parts are still
visible.
This immediately broke the cairo renderer, so the fix is included.
If a subsurface is not below, it is visible no matter what the opaque
region is.
Also, we don't need to care about transparency in the subsurface if we
ignore it anyway. So this is a win-win.
We accept transparent subsurfaces for passthrough now, when they are
above the surface.
But we did not unset the opaque region to empty when the texture is
transprent.
These are 2x2 combinations that:
1. Use a texture child node vs a color child node
This should force an offscreen vs straight up use a texture.
2. Switch opacity and color-matrix
Either put the color matrix into the opacity node or put the opacity
into the color matrix.
This is worth testing because renderers often combine opacity into the
color matrix to avoid offscreens.
And they do that because applications often create faded out symbolic
images, which end up as a combination of these nodes.
The public gtk_application_inhibit() API allows a NULL reason argument,
and we have a fallback in place when going through the session manager
proxy; when using the inhibit D-Bus API directly, though, we're just
passing a potentially NULL value to g_variant_new_string(), which will
rightfully complain.
Add new accessible roles
GTK_ACCESSIBLE_ROLE_ARTICLE and
GTK_ACCESSIBLE_ROLE_COMMENT.
ARIA has corresponding roles as well [1] [2],
with the article role being the superclass role
of the comment role.
Acccording to the ARIA spec, the article role
has the document role as superclass role and
the name can be set by the author.
For the comment role, the name can be set by the
author or come from the content.
The ARIA spec for the comment contains this sentence [2]:
> If the author has not explicitly declared aria-level, aria-posinset, or
> aria-setsize for a comment element, user agents MUST automatically
> compute the missing values and expose them to assistive technologies.
However, these properties are not listed as "Required States and
Properties" in the following table for that role. Potentially
the above requirement only applies for the first of the two
possible described cases of how the relationship between comments
and the commented content can be set, so don't hard-require
these attributes in the a11y overlay's
`check_widget_accessibility_errors` either.
[1] https://w3c.github.io/aria/#article
[2] https://w3c.github.io/aria/#comment
We need to make sure that all our textures have the same memory
format, or we'll run into trouble in the upload code, at least
on GLES, which isn't as forgiving about format mismatches.
Related: #6238
Allow setting the modified flag, but skip propagating the history state update
as it will be done by gtk_text_history_end_irreversible_action().
Fixes#6236Closes#6236