Commit Graph

82040 Commits

Author SHA1 Message Date
Fran Dieguez
e6ae136de0 Update Galician translation
(cherry picked from commit 8360bfc772)
2024-09-28 21:50:23 +00:00
Matthias Clasen
cbadb1ed8e Merge branch 'pointer-viewporter-again' into 'main'
wayland: Bring back the pointer viewporter

See merge request GNOME/gtk!7760
2024-09-28 16:13:06 +00:00
Matthias Clasen
103e98f570 Merge branch 'default-cursor-size' into 'main'
wayland: Use the same default cursor size as gsettings schema

Closes #7043

See merge request GNOME/gtk!7754
2024-09-28 14:32:48 +00:00
Matthias Clasen
3768c751c5 wayland: Improve our cursor size selection
When picking a cursor image size for a given size, look for sizes
that do better when scaled by the viewporter:
- exact size
- twice the size
- closest larger size
- closest size
2024-09-28 10:26:42 -04:00
Matthias Clasen
e42014573a wayland: Bring back the pointer viewporter
This was a thinko in 403da9a2d5. We have the cursor
image in device pixels, but we still need to apply the viewporter
to inform the compositor about the desired pointer size in
application pixels.
2024-09-28 10:01:04 -04:00
Ilya Fedin
a9f1ff471b wayland: Use the same default cursor size as gsettings schema
Fixes: #7043
2024-09-28 16:50:05 +04:00
Matthias Clasen
b2ae7a2448 Merge branch 'for-main' into 'main'
Cosmetics

See merge request GNOME/gtk!7751
2024-09-28 01:16:53 +00:00
Matthias Clasen
cb682c759d Cosmetics
No newlines in g_warning.
2024-09-27 20:54:46 -04:00
Matthias Clasen
523fca21e9 Merge branch 'wip/kabus/a11y-present-label' into 'main'
label: Don't set a11y label when role is presentation

See merge request GNOME/gtk!7750
2024-09-27 17:34:39 +00:00
Matthias Clasen
73ddde6eda Merge branch 'cursor-size-again' into 'main'
inspector: Tweak the cursor size control

See merge request GNOME/gtk!7749
2024-09-27 17:29:41 +00:00
Matthias Clasen
403da9a2d5 wayland: Redo cursor loading
Stop using a viewporter to scale cursors. Instead, just pass
the surface scale to the cursor loading code, and take the
buffer dimensions and hotspot that it returns, unchanged.

This avoids problems with cursor themes like Breeze, where
buffer dimensions are different from the nominal cursor size.

Make the cursor loading code take a floating point scale,
and return the closest sized cursor that it can find.
2024-09-27 12:37:25 -04:00
Khalid Abu Shawarib
fb6f211869 label: Don't set a11y label when role is presentation
This resolves issue with labels of model buttons being set to
presentation a11y role but still have a11y label.

See: b7e5a79468/gtk/gtkmodelbutton.c (L1539)
2024-09-27 19:15:41 +03:00
Matthias Clasen
c358606a46 inspector: Tweak the cursor size control
Useful for debugging our cursor loading code.
2024-09-27 12:11:31 -04:00
Matthias Clasen
b7e5a79468 Merge branch 'listbox_tab_behavior' into 'main'
listbox: Introduce tab-behavior property

See merge request GNOME/gtk!7739
2024-09-27 11:42:14 +00:00
Benjamin Otte
06bcb0ee47 Merge branch 'wip/otte/ngl-downloader' into 'main'
Use NGL renderer for dmabuf downloads

See merge request GNOME/gtk!7741
2024-09-26 20:58:01 +00:00
Matthias Clasen
58ce0a39dc dmabuf: Use the ngl downloader
It works, now and is faster than the old GL downloader.

Playing the Barbie trailer @ 4k with hardware decoding but the Cairo
renderer on a 4k screen:

downloader  windowed  fullscreen
GL          12fps     19fps
NGL         16fps     29fps
Vulkan      16fps     29fps
no dmabufs  12fps     19fps
2024-09-26 22:06:18 +02:00
Benjamin Otte
6d3c333208 gpu: Actually ensure a downloadable dmabuf
For some formats, we could not download the dmabuf directly - in
particular YUV formats.
For those, do a copy on the GPU into the correct format.

While we're at it, also check the desired format and colorstate and if
they don't match, do the conversion on the GPU instead of using
gdk_memory_convert().
Reserve the CPU conversion for situations where the GPU doesn't support
the final format - like for example G8A8 (or often also RGB16).
2024-09-26 22:06:18 +02:00
Benjamin Otte
62c3923e5a gpu: Handle all colorstates in cache
Make gsk_gpu_cache_cache_texture_image() API safer by accepting all
color states as input and just not caching the images for colorstates we
don't care about.
2024-09-26 22:06:18 +02:00
Benjamin Otte
3be8b1d927 gpu: Check if the image is cached in right colorstate
This is most likely not a very likely check, but just to be sure, check
if the image exists in the cache in the desired colorstate already.
2024-09-26 22:06:18 +02:00
Benjamin Otte
27a61e221f gpu: Shuffle function arguments
Instead of passing down the depth and extracting format/srgb from it at
the end, extract format/srgb in the nodeprocessor and pass it down.

This allows creating offscreens for weirder formats in the future.
2024-09-26 22:06:18 +02:00
Benjamin Otte
52df3481d6 gpu: Add a gsk_gpu_download_into_op()
... and use it for the dmabuf downloader

Splits the download op into 2 separate ops: One for downloading textures
and one for downloading into preallocated memory.

The download into memory is the fallback for the texture downloading op,
so they need to share code.

But keeping them separate ensures that the different codepaths for
dmabuf download and render_texture() don't get mixed up in weird ways
that potentially call into each other.

By passing the emory down into the op we can also avoid an extra memcpy
which can lead to quite large speedups for big textures.
2024-09-26 22:06:17 +02:00
Benjamin Otte
ccb993d87b gpu: Split out a function
I want to use it from elsewhere in future commits.
2024-09-26 22:06:17 +02:00
Benjamin Otte
5fdaa4a232 gl: Move function
We want to share the texture download function with the renderers, so
they can download textures without needing to wrap them in a
GdkGLTexture.

Move it into gdkglcontext.c for that purpose.
2024-09-26 22:06:17 +02:00
Benjamin Otte
8b166dff74 gltexture: Split out a function
No functional changes
2024-09-26 22:06:17 +02:00
Benjamin Otte
f6b3f321a4 dmabuf: Refactor GPU renderer
We don't want to ever try fallback uploads in the dmabuf path. So
refactor gdk_frame_upload_texture() to have a flag that turns that off.
2024-09-26 22:06:17 +02:00
Benjamin Otte
a314143a83 gpu: Pass color state to download op
Previously we were always implicitly using SRGB, which was correct more
or less by accident.
2024-09-26 22:06:17 +02:00
Benjamin Otte
6c7abf425a Merge branch 'wip/otte/for-main' into 'main'
testsuite: Remove leftover test.in files

See merge request GNOME/gtk!7744
2024-09-26 18:47:49 +00:00
Matthias Clasen
b11e45762b Merge branch 'cursor-update-now' into 'main'
wayland: Make cursor changes effective immediately

Closes #6909

See merge request GNOME/gtk!7745
2024-09-26 18:07:28 +00:00
Benjamin Otte
d041a681a5 Merge branch 'wip/otte/drop-gles2' into 'main'
Drop support for GLES 2 and GL < 3.3

See merge request GNOME/gtk!7743
2024-09-26 17:51:09 +00:00
Matthias Clasen
d22d2f77a6 wayland: Make cursor changes effective immediately
When the cursor theme changes, update the cursors of our surfaces.

Fixes: #6909
2024-09-26 12:53:38 -04:00
Benjamin Otte
7458461d06 gl: Remove unpack-subimage checks
GLES 3.0 supports it unconditionally.
2024-09-26 18:41:13 +02:00
Benjamin Otte
283615936b gl: Remove check for half-float vertex data
All supported versions require it after we dropped support for GLES 2.
2024-09-26 18:41:13 +02:00
Benjamin Otte
2274bca95b gl: Require support for GLsync
It's supported by GL >= 3.2 and GLES >= 3.0 and we require both now.
2024-09-26 18:41:13 +02:00
Benjamin Otte
f8b4deeac0 gdk: Drop support for GL < 3.3
The new renderers need features from GL 3.3 and GLSync is very required
these days, too.

Note that this is about GL proper, not GLES.
2024-09-26 18:41:13 +02:00
Benjamin Otte
afa503c2e0 gl: Remove GLES 2 specific parts of format checks 2024-09-26 18:41:13 +02:00
Benjamin Otte
105f5f1137 gpu: Remove check for GLES 2
GLES 2 is no longer supported.
2024-09-26 18:41:13 +02:00
Benjamin Otte
b83ad60a1f gdk: Drop support for GLES 2
We now require GLES 3.
2024-09-26 18:41:13 +02:00
Benjamin Otte
58b44ebc1c testsuite: Remove GLES 2 tests
We want to drop GLES 2 support.
2024-09-26 18:41:13 +02:00
Benjamin Otte
b598f21506 testsuite: Remove leftover test.in files
We stopped supporting installed tests in 3121f88265 but forgot to remove
these files.
2024-09-26 16:35:47 +00:00
Matthias Clasen
d3c166d511 Merge branch 'for-main' into 'main'
gtk-demo: Stop using g_time_zone_new

See merge request GNOME/gtk!7742
2024-09-26 15:35:06 +00:00
Matthias Clasen
76e93206f3 Stop using G_APPLICATION_FLAGS_NONE
It has been deprecated in favor of G_APPLICATION_DEFAULT_FLAGS.
2024-09-25 22:03:23 -04:00
Matthias Clasen
ecfe47af73 docs: Drop a note about old GLib
We require GLib 2.76 now.
2024-09-25 22:00:38 -04:00
Matthias Clasen
f20ca9067e gtk-demo: Stop using g_time_zone_new
It is deprecated in favor of g_time_zone_new_identifier.
2024-09-25 21:57:49 -04:00
Matthias Clasen
8f3cd4733c Merge branch 'for-main' into 'main'
Stop using g_memdup

See merge request GNOME/gtk!7740
2024-09-26 01:22:23 +00:00
Matthias Clasen
402ee9b39c Tweak the issue template
Ask for more relevant information.
2024-09-26 02:53:54 +02:00
Matthias Clasen
becbf4e1f9 Update the README slightly 2024-09-26 02:53:54 +02:00
Matthias Clasen
67407d5dcf tools: Minor cleanup
No need to register all types here.
2024-09-26 02:53:54 +02:00
Matthias Clasen
fcc0f243cf Stop using g_pattern_match_string
It has been deprecated in favor of g_pattern_spec_match_string.
2024-09-26 02:53:54 +02:00
Matthias Clasen
282dcfa9ac Apply review feedback, mostly formatting. 2024-09-25 11:21:52 +00:00
Matthias Clasen
8c04801f6a Stop using g_memdup
Its deprecated in favor of g_memdup2
2024-09-25 10:56:36 +02:00