Commit Graph

81897 Commits

Author SHA1 Message Date
Jordi Mas i Hernandez
3b43078b08 Update Catalan translation 2024-09-15 12:15:18 +00:00
Benjamin Otte
f2e75529cb Merge branch 'wip/otte/for-main' into 'main'
vulkan: Actually return the preferred memory format

See merge request GNOME/gtk!7713
2024-09-15 08:19:53 +00:00
Benjamin Otte
eed58b4051 gpu: Split out rect grid snapping function
We might want to use it outside of the nodeprocessor.

The function is now called gsk_rect_snap_to_grid().
2024-09-15 02:31:02 +02:00
Benjamin Otte
28a01ca954 gpu: Print some tex rects in verbose output
In the colorize and texture ops, print the tex rect. This is useful
because when adding new features with textures (like atlas usage), these
are the ops that I use for testing.
2024-09-15 02:31:02 +02:00
Benjamin Otte
efd5395ecf rendernode-tool: Download in the texture's format
When downloading textures, download the in the actual format of the
texture. We don't want to benchmark conversion, we want to benchmark
renderers.
2024-09-15 02:31:02 +02:00
Benjamin Otte
376dbe9def memoryformat: Move fast path into the threaded path
We don't want to get slower in the fast path.
2024-09-15 02:31:02 +02:00
Benjamin Otte
bba7979670 memoryformat: Add a fastpath for RGBA8 <=> BGRA8
Cairo is using BGRA8 but we want to use RGBA8 because it's the canonical
GL format.

So getting this fast sounds useful.
2024-09-15 02:31:02 +02:00
Benjamin Otte
01aafc6e65 memoryformat: Don't always convert to rec2100-linear and back
It turns out we lost the check to see if color states are equal when we
multithreaded things in !7657

Whoops.
2024-09-15 02:31:01 +02:00
Benjamin Otte
fa86bfcb55 gpu: Use existing frame in render_texture()
Instead of recreating frames from scratch every time, use an existing one.

This ensures that renderers don't need to recreate GPU resources every
time (like buffers and everything else that frames manage). It also
speeds up occasional render_texture() calls in default renderers.

This speeds up in particular the Vulkan renderer.
2024-09-15 02:31:01 +02:00
Benjamin Otte
c3d9f4a9ac gpu: Move a function
No functional changes.
2024-09-15 02:31:01 +02:00
Benjamin Otte
d11ac3585d gpu: Clean up the frame after we're done waiting for it
This is useful because cleaning up will do the final copies of texture
data.

It also means we use less memory, as we're going to release images that
were used in ops.
2024-09-15 02:31:01 +02:00
Benjamin Otte
8f78a0f809 gpu: Add an internal is_clean() check
If no ops are recorded, then we don't need to wait for any ops to
finish.

Also fix the initial fence creation on Vulkan - we no longer need to
create it fixed because of the random cleanup() call at startup does no
longer happen.
2024-09-15 02:30:59 +02:00
Benjamin Otte
3286d9f1b5 vulkan: Actually return the preferred memory format
We were just exiting the loop, but not remembering the index.

Speeds up various memory operations, sometimes by quite a lot.
2024-09-15 00:07:47 +02:00
Matthias Clasen
ee38c96ee3 Merge branch 'matthiasc/for-main' into 'main'
gsk: Add another profiler mark

See merge request GNOME/gtk!7712
2024-09-13 16:14:17 +00:00
Matthias Clasen
e5705bd141 gsk: Add another profiler mark
This lets us compare the cost of realizing the new renderers vs
the old GL renderer.
2024-09-13 11:02:52 -04:00
Matthias Clasen
753d74d676 Post-release version bump 2024-09-13 10:34:06 -04:00
Matthias Clasen
670b4aabac 4.16.1 2024-09-13 10:11:36 -04:00
Matthias Clasen
eba9316c12 Merge branch 'gtkcalendar-issue-6406' into 'main'
GtkCalendar: Avoid ending up with invalid dates

Closes #6406

See merge request GNOME/gtk!6851
2024-09-13 13:43:36 +00:00
Matthias Clasen
7f3835cc4f Merge branch 'phase-docs' into 'main'
docs: Fix typo and improve wording in drawing model docs

See merge request GNOME/gtk!7711
2024-09-12 16:21:51 +00:00
Matthias Clasen
be89fa7919 Merge branch 'docs-typo' into 'main'
gtklistitem: Fix a minor typo in the docs

See merge request GNOME/gtk!7681
2024-09-12 13:58:04 +00:00
Philip Withnall
20d6938a90
docs: Fix typo and improve wording in drawing model docs
There was a typo ‘phases happens’, but also some spurious whitespace and
slightly odd-sounding use of ‘we’ so I changed it to be phrased
passively.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 14:06:39 +01:00
Matthias Clasen
6f4f4d0123 Merge branch 'gbsneto/atspiroot-flatpak-portal-session-bus' into 'main'
a11y: Use session bus to check Flatpak portal

See merge request GNOME/gtk!7709
2024-09-12 10:24:27 +00:00
Arjan Molenaar
250322deb0 Merge branch 'amolenaar/dnd-icon-on-top' into 'main'
macos: Keep DnD windows always on top

Closes #6809 and #6818

See merge request GNOME/gtk!7706
2024-09-12 09:25:05 +00:00
Matthias Clasen
bdee95c32c Merge branch 'wip/otte/for-main' into 'main'
gpu: Don't crash when there's no ops

Closes #6992

See merge request GNOME/gtk!7710
2024-09-12 00:27:29 +00:00
Georges Basile Stavracas Neto
1ffd23dbab a11y: Use session bus to check Flatpak portal
The Flatpak portal (and so far all other portals) live in the session
bus, not in the a11y bus.

Use the session bus to get the Flatpak portal version. Avoid too many
synchronous D-Bus calls on startup by using g_once_init_* helpers.
2024-09-11 10:43:47 -03:00
Arjan Molenaar
e92bd4d9ce macOS: drag surfaces should ignore all events
This fixes the Dnd demo.
2024-09-11 14:59:03 +02:00
Georges Basile Stavracas Neto
24841a8d5b a11y: Correct return type of D-Bus call
org.freedesktop.DBus.Properties.Get() returns "(v)" which then
must be unpacked into an uint32 ("u") variant.
2024-09-11 08:53:38 -03:00
Matthias Clasen
c2dc459167 Merge branch 'label-docs-fix' into 'main'
gtkenums: Fix missing backtick in docs

See merge request GNOME/gtk!7683
2024-09-11 10:13:13 +00:00
Matthias Clasen
d87ce14869 Merge branch 'vulkan-294' into 'main'
vulkan: Add another two error codes

See merge request GNOME/gtk!7708
2024-09-11 10:12:40 +00:00
Benjamin Otte
e9735f0c35 gpu: Move GskGpuClip declaration into types header
Makes it possible to use it in multiple places.
2024-09-11 08:34:41 +02:00
Benjamin Otte
d320373262 gpu: Clarify a function
It does functionally the same now, but it makes it mroe clear how it
works.

As a bonus, it will now trigger for -Wswitch-enum, too.
2024-09-11 08:33:22 +02:00
Arjan Molenaar
a84fe6bde6 macos: Put DnD windows on status level
This will make sure the dragged window will stay visible.
2024-09-11 08:19:39 +02:00
Benjamin Otte
a8748598b6 gpu: verbose-print if shaders are inside merged ops
This is useful when trying to get more ops merged for performance
reasons.
2024-09-11 08:17:58 +02:00
Benjamin Otte
748acaf654 gpu: Use a better character for debug print
Instead of 🞨 which isn't supported in many places, use ⬚.

⬚ also fits better with □ and ▢ for describing clip regions.
2024-09-11 08:17:58 +02:00
Benjamin Otte
1ff9d1545d Revert "vulkan: Set VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT"
This reverts commit ffae0010c4.

The commit doesn't work with the nvidia driver and it's not necessary to
use it, so drop it for now.

Fixes #6992
2024-09-11 08:17:43 +02:00
Benjamin Otte
e35670a014 gpu: Don't crash when there's no ops
In the rare situation (read: I triggered it with obscure hacks) where no
ops are emitted, we could end up pointing into invalid memory and
crashing.

Don't do that.
2024-09-11 08:17:43 +02:00
Benjamin Otte
9690c87736 docs: Remove duplicated text 2024-09-11 08:17:43 +02:00
Philip Withnall
a60d96a9ac gtkenums: Fix missing backtick in docs
Fixes the formatting for `GtkAlign`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-11 00:35:47 +00:00
Matthias Clasen
0a9b501743 Merge branch 'plug-leak' into 'main'
filechooser: Plug a leak

See merge request GNOME/gtk!7705
2024-09-11 00:09:05 +00:00
Emmanuel Gil Peyrot
6dd55e381d vulkan: Fix error string
This one got added in 66ba1f76ba but didn’t end
the sentence with a dot, and didn’t have its enum name between parentheses so
that people can debug more easily which error code got generated.
2024-09-10 22:46:29 +00:00
Emmanuel Gil Peyrot
abd8d40bf9 vulkan: Add another two error codes
Those two come from the VK_KHR_pipeline_binary extension and have been added in
Vulkan 1.3.294.
2024-09-10 22:45:41 +00:00
Matthias Clasen
348e938698 Merge branch 'matthiasc/for-main' into 'main'
print dialog: Fix initial selection

Closes #6996

See merge request GNOME/gtk!7704
2024-09-10 18:35:08 +00:00
Sergey Bugaev
4e0a909ca9 directorylist: Fix criticals if monitoring fails
g_file_monitor_directory () can fail.  We're ignoring the actual error
by passing NULL for the error argument, but we shouldn't be trying to
connect to a signal on the NULL value that gets returned on error.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-09-10 18:38:56 +03:00
Sergey Bugaev
8964f6f0cc filechooser: Plug a leak
gtk_file_chooser_get_current_folder () is transfer full, while
g_list_store_append () is transfer none.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-09-10 18:29:45 +03:00
Matthias Clasen
b807b84e16 print dialog: Fix initial selection
This broke with recent fixes to GtkSingleSelection.

Fixes: #6996
2024-09-10 10:59:36 -04:00
Matthias Clasen
97a2c3a656 Merge branch 'wip/smcv/issue6995' into 'main'
gdkgltexture: Avoid use-after-free when switching GdkGLContext

Closes #6995

See merge request GNOME/gtk!7703
2024-09-10 11:23:30 +00:00
Bruce Cowan
5925c4c51f Update British English translation 2024-09-10 10:15:31 +00:00
Simon McVittie
0fa2ae48d4 gdkgltexture: Avoid use-after-free when switching GdkGLContext
`thread_current_context` might be holding the last reference to
`previous`, in which case `gdk_gl_context_make_current` on the new
context will free `previous`, leaving it a dangling pointer.
Avoid this by making sure to hold a reference.

Fixes: 41cd0c6f "gl: Fix initial EGL context creation on X11"
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6995
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-10 00:11:18 +01:00
Matthias Clasen
43303bf7e5 Merge branch 'matthiasc/for-main' into 'main'
Revert "css: Simplify theme loading"

Closes #6991

See merge request GNOME/gtk!7702
2024-09-09 12:35:57 +00:00
Anders Jonsson
f26f491d58 Update Swedish translation 2024-09-09 11:22:40 +00:00