Commit Graph

79809 Commits

Author SHA1 Message Date
Matthias Clasen
191f826075 wayland: Only set buffer scale if we can
We check this in some other places, so be consistent.
2024-03-19 22:22:53 -04:00
Matthias Clasen
5d52c43074 wayland: Check all required globals for subsurfaces
Before trying to use subsurfaces, make sure we have both
a subcompositor and a viewporter.
2024-03-19 22:22:53 -04:00
Matthias Clasen
f6a67aeb20 wayland: Check some required globals
This may be largely cosmetics, since these are core protocols that
are unlikely to ever be missing. But lets check anyway.
2024-03-19 17:28:25 -04:00
Jordi Mas
370e2f0940 Update Catalan translation 2024-03-19 21:37:20 +01:00
Alexandre Franke
2ec9fc26d3 Update French translation 2024-03-19 13:06:37 +00:00
Matthias Clasen
c2d898d462 Merge branch 'fix-macos-typo' into 'main'
quartz: Fix a crash

See merge request GNOME/gtk!7059
2024-03-19 03:11:58 +00:00
Matthias Clasen
7c04231255 Merge branch 'macos-remove-shadows' into 'main'
macos: Drop shadow related code from macos backend

See merge request GNOME/gtk!7048
2024-03-19 02:38:38 +00:00
Arjan Molenaar
08216dcee9 macos: Drop shadow related code from macos backend 2024-03-19 02:38:37 +00:00
Matthias Clasen
9817df12ff quartz: Fix a crash
This was an oversight in 816f8807a3.
2024-03-18 21:51:24 -04:00
Matthias Clasen
5b0e8eb574 Merge branch 'fix-macos-typo' into 'main'
macos: Fix a typo in the appmenu handling code

See merge request GNOME/gtk!7055
2024-03-19 01:49:08 +00:00
Matthias Clasen
cecde85faa Merge branch 'drag-cursor-tweak' into 'main'
dnd: Use the default cursor during motion

Closes #6337 and #6511

See merge request GNOME/gtk!7058
2024-03-19 01:46:35 +00:00
Matthias Clasen
aa95b4f341 dnd: Use the default cursor during motion
When no action is selected, use the default cursor, and only
switch to one of the action-indicating cursors when we are over
a drop target.

Fixes: #6337
Fixes: #6511
2024-03-18 21:17:55 -04:00
Matthias Clasen
816f8807a3 macos: Fix a typo in the appmenu handling code
We were using APP_DATA in one place, and APP_MENU in the other.
Just stop using object data for this.
2024-03-18 18:49:55 -04:00
Martin
26d3c407b3 Update Slovenian translation 2024-03-18 17:36:52 +00:00
Matthias Clasen
a973e8ea8d Merge branch 'gl-offload-fixes' into 'main'
gl: Handle offloads in offscreen context better

Closes #6551

See merge request GNOME/gtk!7053
2024-03-18 15:22:22 +00:00
Matthias Clasen
b007597c58 Merge branch 'macos-application-demo' into 'main'
Revert "macos: fix weird menubar rendering."

Closes #6524

See merge request GNOME/gtk!7052
2024-03-18 14:40:45 +00:00
Matthias Clasen
1e83a44c93 gl: Handle offloads in offscreen context better
Back out of offloading below if we are in an offscreen context,
since the hole will get lost in the offscreen.

Fixes: #6551
2024-03-18 08:41:31 -04:00
Matthias Clasen
e1406d2e95 Merge branch 'matthiasc/for-main' into 'main'
gsk: Avoid some allocations

See merge request GNOME/gtk!7047
2024-03-18 12:26:37 +00:00
Matthias Clasen
259ad83de9 macos: Fix up app menu support
We were forgetting to add the newly loaded app menu to the
combined menubar. Pointed out by Dominik Reichardt in #6524.

Fixes: #6524
2024-03-18 07:50:30 -04:00
Daniel Rusek
2fe467983c Update Czech translation 2024-03-18 11:30:47 +00:00
Matthias Clasen
b4f5432d5a gtk4-demo: Clean up the application demo
This partially reverts ca1c570c21.
2024-03-17 22:29:22 -04:00
Matthias Clasen
4fe4523c49 Revert "macos: fix weird menubar rendering."
This reverts commit 75868dfee4.
2024-03-17 22:29:22 -04:00
Matthias Clasen
ee4a56ed4a settings: Mention the macOS implementation 2024-03-17 21:44:02 -04:00
Matthias Clasen
2408e227aa Add another xfail for clipped compare tests
These just keep happening.
2024-03-17 21:30:36 -04:00
Matthias Clasen
144cd2d91c gsk: Avoid some allocations
We can use a static font options object and allocate it only once.
2024-03-17 21:30:36 -04:00
Matthias Clasen
6abd9def55 Merge branch 'macos-popover-focus' into 'main'
macos: Fix IMContext for popovers

See merge request GNOME/gtk!7041
2024-03-17 16:55:52 +00:00
Martin
f5685cc0ae Update Slovenian translation 2024-03-17 10:28:21 +00:00
Martin
54bd03573e Update Slovenian translation 2024-03-17 10:26:36 +00:00
Matthias Clasen
bc81b33990 Merge branch 'matthiasc/for-main' into 'main'
Forgotten file

See merge request GNOME/gtk!7046
2024-03-17 03:05:56 +00:00
Matthias Clasen
de764d61ef Forgotten file 2024-03-16 22:26:22 -04:00
Matthias Clasen
68fa9bcf2e Merge branch 'matthiasc/for-main' into 'main'
4.14.1

See merge request GNOME/gtk!7045
2024-03-17 02:11:30 +00:00
Matthias Clasen
2f124bc712 Post-release version bump 2024-03-16 22:10:26 -04:00
Matthias Clasen
c648bb7b19 NEWS: Updates 2024-03-16 20:52:15 -04:00
Matthias Clasen
90956b15d9 docs: Small tweaks 2024-03-16 20:52:15 -04:00
Benjamin Otte
195ebf6848 Merge branch 'wip/otte/gl-map-buffer' into 'main'
Add GLBuffer implementation w/ persistent mapping

See merge request GNOME/gtk!7042
2024-03-17 00:27:51 +00:00
Benjamin Otte
0615b48318 Merge branch 'wip/otte/VYycQTm2HrM' into 'main'
gpu: Sort passes correctly

Closes #6318

See merge request GNOME/gtk!7044
2024-03-16 23:08:05 +00:00
Benjamin Otte
aff34e8d1b gpu: Sort passes correctly
In a very particular situation, it could happen that our renderpass
reordering did not work out.
Consider this nesting of renderpasses (indentation indicates subpasses):

pass A
  subpass of A
pass B
  subpass of B

Out reordering code would reorder this as:

subpass of B
subpass of A
pass A
pass B

Which doesn't sound too bad, the subpasses happen before the passes
after all.

However, a subpass might be a pass that converts the image for a texture
stored in the texture cache and then updates the cached image.
If "subpass of A" is such a pass *and* if "subpass of B" then renders
with exactly this texture, then "subpass of B" will use the result of
"subpass of A" as a source.

The fix is to ensure that subpasses stay ordered, too.

The new order moves subpasses right before their parent pass, so the
order of the example now looks like:

subpass of A
pass A
subpass of B
pass B

The place where this would happen most common was when drawing thumbnail
images in Nautilus, the GTK filechooser or Fractal.
Those images are usually PNG files, which are straight alpha. They are then
drawn with a drop shadow, which requires an offscreen for drawing as
well as those images as premultipled sources, so lots of subpasses happen.
If there is then a redraw with a somewhat tricky subregion, then the
slicing of the region code could end up generating 2 passes that each draw
half of the thumbnail image - the first pass drawing the top half and the
second pass drawing the bottom half.
And due to the bug the bottom half would then be drawn from the
offscreen before the actual contents of the offscreen would be drawn,
leading to a corrupt bottom part of the image.

Test included.

Fixes: #6318
2024-03-16 23:44:59 +01:00
Matthias Clasen
c05bb504ff Merge branch 'accessible-leaks' into 'main'
Fix leaks of GtkAccessible and GtkATContext

See merge request GNOME/gtk!7031
2024-03-16 21:39:43 +00:00
Benjamin Otte
47307dc7c1 vulkan: Prefer cached buffer memory
We write the buffers in small chunks, and we even sometimes read it. So
prefer it when it's cached.

Speeds up the text benchmarks by a factor of 3x on my dedicated GPU.
2024-03-16 22:32:49 +01:00
Matthias Clasen
16ea91c1fe Merge branch 'macos-fullscreen-resize' into 'main'
macos: Cleanup fullscreen state

See merge request GNOME/gtk!7043
2024-03-16 21:27:29 +00:00
Benjamin Otte
96b800fa0c gl: Add buffer implementation using persistent mapping
If glBufferStorage() is available, we can replace our usage of
glBufferSubData() with persistently mapped storage via
glMappedBufferRange().

This has 1 disadvantage:

1. It's not supported everywhere, it requires GL 4.4 or
   GL_EXT_buffer_storage. But every GPU of the last 10 years should
   implement it. So we check for it and keep the old code.
   The old code can also be forced via GDK_GL_DISABLE=buffer-storage.

But it has 2 advantages:

1. It is what Vulkan does, so it unifies the two renderers' buffer
   handling.

2. It is a significant performance boost in use cases with large vertex
   buffers. Those are pretty rare, but do happen with lots of text at a
   small font size. An example would be a small font in a maximized VTE
   terminal or the overview in gnome-text-editor.

A custom benchmark tailored for this problem can be created with:

  tests/rendernode-create-tests 1000000 text.node

This creates a node file called "text.node" that draws 1 million text
nodes.
(Creating that test takes a minute or so. A smaller number may be useful
on less powerful hardware than my Intel Tigerlake laptop.)
The difference can then be compared via:

  tools/gtk4-rendernode-tool benchmark --runs=20 text.node
and
  GDK_GL_DISABLE=buffer-storage tools/gtk4-rendernode-tool benchmark --runs=20 text.node

For my laptop, the difference is:
before: 1.1s
after:  0.8s

Related: !7021
2024-03-16 20:55:26 +01:00
Benjamin Otte
e7a2baf78c gpu: Remove unused arguments
It's not just unused, it's also wrong.

We are reading from the buffer when reallocating the vertex buffer
and memcpy()ing the old into the new buffer - at that point we read from
it.
2024-03-16 19:46:37 +01:00
Matthias Clasen
438d86fcf5 gsk: Move the buffer upload counter
Move the sysprof counter for buffer uploads to the generic
code, so it works for both ngl and Vulkan. This partially
reverts commit ecf1b7c18a.
2024-03-16 19:39:16 +01:00
Arjan Molenaar
4fd848c9de macos: Retrieve NSEvents based on event properties
We cannot depend on the exact event, since some events (e.g. for popups)
are rewritten. Therefore we need to determine the NSEvent based on
heuristics. The usual suspects are event type, device and timestamp.

This allows us to fix IMContext for popups.
2024-03-16 17:25:38 +01:00
Matthias Clasen
a23a7d4149 Merge branch 'maze-demo' into 'main'
demos: Make the maze demo non-resizable

Closes #6549

See merge request GNOME/gtk!7040
2024-03-16 14:41:27 +00:00
Matthias Clasen
1cbdf88b0f Merge branch 'debug-cleanup' into 'main'
gsk: Fix a typo

See merge request GNOME/gtk!7039
2024-03-16 14:41:16 +00:00
Benjamin Otte
0a0feef57d Merge branch 'wip/otte/gdk-gl-disable' into 'main'
Rework GL feature handling

See merge request GNOME/gtk!7038
2024-03-16 14:25:11 +00:00
Matthias Clasen
2701a2bfdd demos: Make the maze demo non-resizable
It isn't playable if the entrance/exit don't reach the edge
of the window.

Fixes: #6549
2024-03-16 10:08:37 -04:00
Benjamin Otte
2aea75f426 testsuite: Run the plain test without any args
Never do nothing.
2024-03-16 14:53:22 +01:00
Matthias Clasen
b1fb7cd4ae gsk: Drop unused debug flags
The 'surface', 'sync' and 'opengl' flags are not used anywhere.
2024-03-16 09:44:57 -04:00