Commit Graph

82004 Commits

Author SHA1 Message Date
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
Matthias Clasen
a9b46e8409 Revert "css: Simplify theme loading"
This reverts commit c033de9b83.

This change unintentionally broke use of relative paths in Adwaita.

Fixes: #6991
2024-09-09 06:51:34 -04:00
Daniel Mustieles
b27e67999b Update Spanish translation 2024-09-09 09:26:15 +00:00
Balázs Úr
3177fd14f9 Update Hungarian translation 2024-09-09 06:26:41 +00:00
Benjamin Otte
9ba41ed6e8 Merge branch 'wip/otte/blur-and-blit' into 'main'
Fix blur for opaque textures

Closes #6980

See merge request GNOME/gtk!7697
2024-09-09 04:46:43 +00:00
Matthias Clasen
70f2e2e09c Merge branch 'matthiasc/for-main' into 'main'
docs: Sync docs for GDK_VULKAN_DISABLE

See merge request GNOME/gtk!7700
2024-09-09 03:53:50 +00:00
Benjamin Otte
56fc8f0077 gpu: Blur opaque textures correctly
Opaque textures don't clamp to transparent but instead to black.
We didn't consider this, so we were blurring their edges into blackness
not into transparency.

Fix this by adding the GSK_GPU_AS_IMAGE_SAMPLED_OUT_OF_BOUNDS flag
and respecting it in the implementation that uses it.

Test included.

Fixes #6980
2024-09-09 05:10:51 +02:00
Benjamin Otte
85abff343e ngl: Images are not blittable if they have a swizzle
Swizzling is not respected for blitting.
See commit 058252e895 for the same change in Vulkan.
Apparently that never made it to ngl.

The next commit will have a test for this.
2024-09-09 04:18:13 +02:00
Benjamin Otte
6cefdfeddd testsuite: Fix udmabuf creation
We were using the wrong format and color state when downloading the
data.

Tests not included in this commit, but a few commits later.
2024-09-09 04:18:13 +02:00
Matthias Clasen
75fa51ef6d Cosmetics
Fix a typo
2024-09-08 19:35:53 -04:00
Matthias Clasen
4181b4b142 docs: Sync docs for GDK_VULKAN_DISABLE
Add swapchain-maintenance, and remove some no longer used values.
2024-09-08 19:35:00 -04:00
Benjamin Otte
7b55d2cf1a Merge branch 'wip/otte/for-main' into 'main'
vulkan: Enable VK_EXT_swapchain_maintenance1 if available

See merge request GNOME/gtk!7696
2024-09-08 23:25:36 +00:00
Benjamin Otte
03230181ce gpu: Add GskGpuAsImageFlags
I've had a need for flags for the get_as_image() call but so far have
been able to work around it. But now it seems I might finally need it.

This just introduces the flags but doesn't add any.

Related: #6980
2024-09-09 01:25:03 +02:00
Benjamin Otte
5e4f692e63 tiff: Store RGBx images as 4 channels
Set the alpha channel to "undefined" in this case.

Gimp doesn't seem to like this when opening the image and insists to
doing something with it, that's a bit of a bummer.

But it allows GTK to load RGBx textures.
2024-09-09 01:25:03 +02:00
Matthias Clasen
e9a046c439 Merge branch 'dead-hamza' into 'main'
imcontextsimple: Handle dead_hamza

See merge request GNOME/gtk!7699
2024-09-08 22:58:11 +00:00
Mohamed Akram
182de7c957 imcontextsimple: Handle dead_hamza 2024-09-09 00:02:29 +04:00
Aurimas Černius
6c939819a3 Update Lithuanian translation 2024-09-08 19:12:24 +00:00
Matthias Clasen
6288be286f Merge branch 'matthiasc/for-main' into 'main'
gsk: Small optimization

See merge request GNOME/gtk!7698
2024-09-08 17:29:27 +00:00
Matthias Clasen
76a13596aa gpu: Reduce per-glyph overhead
Pull the shader clip computation out of the loop in the common
case that the entire node is contained in the clip.
2024-09-08 12:57:31 -04:00
Matthias Clasen
c18cd6050b gpu: Use gsk_gpu_colorize_op2
This reduces the cost of these calls significantly, and this is
the inner loop of the node processor.
2024-09-08 12:43:02 -04:00
Matthias Clasen
60f5d4c93e gpu: Add a variant of gsk_gpu_colorize_op
This variant takes the color_states, instead of computing it
anew from the ccs and the color state of the color. This will
be used to pull this work out of the loop in add_glyph_node.
2024-09-08 12:41:48 -04:00
Matthias Clasen
03840151ac gsk: Drop an unused variable
We're not using last_image for anything.
2024-09-08 11:48:43 -04:00
Matthias Clasen
2e44f3e2ff gsk: Get the text node color once
We don't need to do this in the loop.
2024-09-08 11:48:43 -04:00
Matthias Clasen
4f9fd5cf1d Add gsk_text_node_get_font_hint_style
Getting the hint style is one of the more expensive calls we do
when adding glyph nodes, so cache this information in the node.
2024-09-08 11:48:43 -04:00
Matthias Clasen
59f334622b rendernode: Inline gsk_render_node_get_node_type
This is the most-called function on render nodes.
2024-09-08 11:48:43 -04:00
Matthias Clasen
c505a08e46 gsk: Small optimization
Avoid calling gsk_container_node_get_child in a loop.
2024-09-08 11:48:43 -04:00
Benjamin Otte
ffae0010c4 vulkan: Set VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT
It seems Mesa doesn't support that yet, but having it doesn't hurt.

And it allows drivers to allocate less memory for the swapchains,
because we don't need all the 4 images we request in minImageCount.
But drivers tend to take that minimum image count as gospel, so we need
to use a higher number to not cause lag in corner cases.
2024-09-08 16:22:49 +02:00
Benjamin Otte
6c72a223f5 vulkan: Enable VK_EXT_swapchain_maintenance1 if available
This just adds the plumbing, usage will happen later.

For testing, GDK_VULKAN_DISABLE=swapchain-maintenance will turn it off.
2024-09-08 16:22:49 +02:00
Benjamin Otte
5a027594c3 vulkan: Add gdk_vulkan_context_has_feature()
A siimplification that will come in handy in the future.
2024-09-08 16:22:49 +02:00
Ask Hjorth Larsen
ebc3600f78 Update Danish translation 2024-09-08 14:15:54 +00:00
Arjan Molenaar
ae0cf9ff54 Merge branch 'amolenaar/focus-im-popups' into 'main'
macos: Fix popup window and keyboard input

Closes #6950 and #5049

See merge request GNOME/gtk!7653
2024-09-08 12:54:24 +00:00
Andi Chandler
08bf8b7464 Update British English translation 2024-09-08 12:26:07 +00:00
Hugo Carvalho
0201abca5e Update Portuguese translation 2024-09-08 10:38:11 +00:00
Asier Sarasua Garmendia
d87b566c59 Update Basque translation 2024-09-08 08:03:53 +00:00
Ekaterine Papava
572b4140f9 Update Georgian translation 2024-09-08 03:58:29 +00:00
Matthias Clasen
6241471f3e Merge branch 'matthiasc/for-main' into 'main'
gpu: Print blur colors

See merge request GNOME/gtk!7695
2024-09-07 18:46:10 +00:00
Matthias Clasen
1ae9cdb4c9 gpu: Print blur colors
Relevant information when debugging shadows.
2024-09-07 12:34:04 -04:00
Daniel Rusek
c1e1b54034 Update Czech translation 2024-09-07 15:52:31 +00:00
Matthias Clasen
f654cb7d3b Merge branch 'docs-remove-gtk-attribute' into 'main'
docs: Remove custom org.gtk.Method and org.gtk.Property annotations

See merge request GNOME/gtk!7335
2024-09-07 14:39:19 +00:00
Alexander Shopov
85beb4fa20 Update Bulgarian translation 2024-09-07 12:50:50 +00:00
twlvnn kraftwerk
a0e81996eb Update Bulgarian translation
(cherry picked from commit 090fcfe503)
2024-09-07 12:13:48 +00:00
Maximiliano Sandoval
ec477ef71d
docs: Document property annotations in README.md 2024-09-07 09:51:33 +02:00
Maximiliano Sandoval
3afc760644
docs: Manually remove property annotations
We remove the annotations that did not match the regex of the previous commits.
2024-09-07 09:51:33 +02:00
Maximiliano Sandoval
ba32140671
docs: Remove all org.gtk.Method annotations
Removed via regex and grep.
2024-09-07 09:51:32 +02:00
Maximiliano Sandoval
91d36dd410
docs: Remove all org.gtk.Property annotations
Removed via regex and grep.

The following were intentionally not removed:

- GtkImage:file: (attributes org.gtk.Property.set=gtk_image_set_from_file)
- GtkImage:resource: (attributes org.gtk.Property.set=gtk_image_set_from_resource)

As they have no getter and (setter PROP) without a (getter PROP) crash
gobject-introspection. This is fixed by
ad3118eb51.
2024-09-07 09:51:32 +02:00
Maximiliano Sandoval
4fd1e32752
docs: Use correct property gir annotations
The annotations should only be set when the name of the setter or getter
for a property "GtkClassName:prop-name" is not gtk_class_name_g(s)et_property_name.
2024-09-07 09:51:26 +02:00