Commit Graph

80055 Commits

Author SHA1 Message Date
Matthias Clasen
74a1c0916a Add a missing deprecation note
GdkVulkanContext is deprecated and only exposed in the api because
we need it as return type of the (deprecated)
gdk_surface_create_vulkan_context() API.
2024-04-18 12:49:18 -04:00
Matthias Clasen
ee67edbe3a Merge branch 'matthiasc/for-main' into 'main'
inspector: Clean up refcounting in the recorder

Closes #6634

See merge request GNOME/gtk!7149
2024-04-18 00:33:17 +00:00
Matthias Clasen
ec9cdb74ef gsk: Actually punch transparent holes
In a57f7e3935 I accidentally replaced { 0, 0, 0, 0 } with
GDK_RGBA_BLACK instead of GDK_RGBA_TRANSPARENT. Oops.

Fixes: #6634
2024-04-17 20:09:13 -04:00
Matthias Clasen
ad0f9144ec inspector: Avoid writing settings back needlessly
We were a bit careless and were writing some values back to the
GtkSettings on init, possibly with rounding errors. Avoid that.
2024-04-17 19:02:57 -04:00
Matthias Clasen
3e8215a971 inspector: Cosmetics
Use GDK_RGBA macros instead of parsing colors from names for every
subsurface.
2024-04-17 16:53:52 -04:00
Matthias Clasen
8df7487e2a inspector: Clean up refcounting in the recorder
We were getting things mixed up here, and it was leading to crashes
when clicking around between frames.
2024-04-17 16:49:38 -04:00
Matthias Clasen
633692b53e NEWS: Updates 2024-04-17 15:34:26 -04:00
Matthias Clasen
e0a5c65003 Merge branch 'black-background' into 'main'
Add GtkGraphicsOffload:black-background

See merge request GNOME/gtk!7147
2024-04-17 17:38:18 +00:00
Matthias Clasen
e4753791c0 video: Use the black-background property
Instead of hardcoding a black background in the theme, use the
new property to tell the GtkGraphicsOffload widget to draw one.
2024-04-17 12:52:35 -04:00
Matthias Clasen
a57f7e3935 graphicsoffload: Add a black-background property
This property allows explicit control over whether to draw
a black background behind offloaded content or not, instead
of relying on the theme background.
2024-04-17 12:52:03 -04:00
Matthias Clasen
8de5a94eb7 Merge branch 'fixwmhints' into 'main'
x11: Remove last_wmspec_check_time

Closes #6558

See merge request GNOME/gtk!7145
2024-04-17 15:31:26 +00:00
Matthias Clasen
88872d1986 Merge branch 'rgba-tweaks' into 'main'
Use our defines for color

See merge request GNOME/gtk!7144
2024-04-17 00:17:06 +00:00
oreo639
ab33b56ec9 x11: Remove last_wmspec_check_time
In fetch_net_wm_check_window(), before updating the wmspec_check_window, a
check is performed to verify a 15s difference between last_wmspec_check_time
and the current monotonic time.

The comment suggests that this check is done to ensure that it doesn't check
for a new check window repeatedly over and over again. While that was the case
origionally, currently the last_wmspec_check_time only gets updated when
wmspec_check_window is set, which is already checked earlier, making the time
check useless.

This check causes issues on cold boots where gtk4 applications are not able
to obtain the wmspec_check_window until 15 seconds after boot, making gtk
unable to check for extended wm_hints during that time.

Fixes: #6558
2024-04-16 12:35:00 -07:00
Matthias Clasen
c37e88d561 Merge branch 'fix-typo' into 'main'
docs: Fix typo

See merge request GNOME/gtk!7146
2024-04-16 10:32:18 +00:00
Jan Willem
2638700435 Docs: Fix typo 2024-04-16 08:47:25 +00:00
Matthias Clasen
0a5a720fe1 Use gdkrgbaprivate.h in more places
This gets inline functions used where it matters.
2024-04-15 22:57:01 -04:00
Matthias Clasen
0e5f7601e4 Add some inline rgba functions
These are trivial enough to inline everywhere.
2024-04-15 22:57:01 -04:00
Matthias Clasen
e583e823b5 Use our defines for color
We have GDK_RGBA_WHITE, GDK_RGBA_BLACK and GDK_RGBA_TRANSPARENT,
lets use it instead of open-coding it.
2024-04-15 22:57:01 -04:00
Matthias Clasen
a96358046f Merge branch 'matthiasc/for-main' into 'main'
Drop another unwanted file

See merge request GNOME/gtk!7143
2024-04-16 02:21:26 +00:00
Matthias Clasen
40f26ea09b Drop another unwanted file 2024-04-15 21:40:52 -04:00
Matthias Clasen
71a7f0771b Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main

See merge request GNOME/gtk!7142
2024-04-16 01:32:29 +00:00
Matthias Clasen
00739718ab Drop unwanted files 2024-04-15 20:50:27 -04:00
Matthias Clasen
19881c8c06 NEWS: Updates 2024-04-15 20:50:27 -04:00
Matthias Clasen
8b0aae8536 Merge branch 'matthiasc/single-pixel-buffer' into 'main'
wayland: Use single-pixel buffer optimization for offload

See merge request GNOME/gtk!7136
2024-04-16 00:20:07 +00:00
Matthias Clasen
fbe000734a wayland: Refuse offloading when we can't
If we have a subsurface with background, but no single-pixel
buffer support, refuse to offload.
2024-04-15 19:53:46 -04:00
Matthias Clasen
0c67b367ac subsurface: Tweak the attach implementation
Do the backend call before changing the stacking order in the
frontend. This is necessary so the backend can look at the current
stacking order to determine if it will change.
2024-04-15 19:53:46 -04:00
Matthias Clasen
f75b4aac1d wayland: Minimize work for subsurfaces
Only commit things that have changed. In the ideal scenario, only
the texture changes from frame to frame, and all the sizing related
setup and the background stay the same, causing the least amount
of work in the compositor.
2024-04-15 19:53:46 -04:00
Matthias Clasen
d563d158c0 subsurface: Add gdk_subsurface_get_sibling
This was just a missing getter. The backend implementation will
use this information to determine whether stacking changes.
2024-04-15 19:53:46 -04:00
Matthias Clasen
5c892fa4ea offload: Add more tests
Include background in offload tests.
2024-04-15 19:53:46 -04:00
Matthias Clasen
4aac64edf0 offload: Some renaming
Rename things to be more in line with the subsurface api.
2024-04-15 19:53:46 -04:00
Matthias Clasen
c97bbfdfb1 offload: Use subsurface bounds for diffing
When adding the whole subsurface to the diff, use the subsurface
bounds, which takes both the texture and the background into
account.
2024-04-15 19:53:46 -04:00
Matthias Clasen
a44598772d wayland: Use subsurface bounds for holes
When punching a hole into the opaque region, use the subsurface
bounds, which takes both the texture and the background into
account.
2024-04-15 19:53:46 -04:00
Matthias Clasen
933a0e5a98 subsurface: Some api revision and documentation
Rename things so they make more sense. The dest/source naming got
a bit unclear when we added background into the mix. Now we're going
for:

source_rect - the texture region to display
texture_rect - dimensions of the subsurface showing the texture
background_rect - dimensions of the background subsurface
bounds - union of texture_rect and background_rect

Also use this opportunity to add some api docs.
2024-04-15 19:53:46 -04:00
Matthias Clasen
e33e9c506d theme: Move the black background of the video
We need the black inside the subsurface node for the single-pixel
optimization to work, so put it there.
2024-04-15 19:53:46 -04:00
Matthias Clasen
0108a5f56d offload: Use subsurface background optimization
Detect a black color node below the texture node and pass that
information to the subsurface, to take advange of the single-pixel
buffer optimization.

To make this work, we need to stop using the bounds of the subsurface
node for sizing the offload, and instead use either the clip or
the texture node for that.
2024-04-15 19:53:46 -04:00
Matthias Clasen
c995473407 Add more subsurface tests
Add some more tests for the basic functioning of the subsurface API.
2024-04-15 19:53:46 -04:00
Matthias Clasen
3f9bdaa4c8 Add background to subsurfaces
Make it possible for subsurfaces to have a black background on a
secondary subsurface below the actual subsurface. Using a single-pixel
buffer for that background increases the changes that the compositor
will use direct scanout for the actual subsurface.

This changes the private subsurface API. All callers have been
updated to pass an empty background rect.
2024-04-15 19:53:46 -04:00
Robert Mader
a70998aa50 wayland: Support the single-pixel-buffer protocol
This just gets the manager object. It is not used yet.
2024-04-15 19:53:46 -04:00
Matthias Clasen
0fb1f44eec gdk: Add a debug flag to allow non-dmabuf offload
This is useful for debugging offloading without having to rely
on gstreamer giving us dmabufs. To use it, set

GDK_DEBUG=force-offload

in the environment.
2024-04-15 19:53:46 -04:00
Matthias Clasen
26cc96bb7f testsuite: Cosmetics
Correct a debug message.
2024-04-15 19:53:46 -04:00
Matthias Clasen
1c8b22cf05 subsurface: Cosmetics 2024-04-15 19:53:46 -04:00
Matthias Clasen
abbbd08931 Merge branch 'ebassi/docs-contributing' into 'main'
docs: Update contribution guide

See merge request GNOME/gtk!7141
2024-04-15 12:41:18 +00:00
Matthias Clasen
587cf28dd3 Merge branch 'rendernode-tool-pdf' into 'main'
rendernode-tool: add support for rendering to PDF

See merge request GNOME/gtk!7140
2024-04-15 10:58:36 +00:00
Emmanuele Bassi
53231a137c docs: Update contribution guide
- Fix link to the security policy
- Drop the confusing note about SSH access (with the old URL)
- Use modern idiomatic Meson subcommands for configuring and building
- Use `git switch` instead of `git checkout`
- Specify that you should always use merge requests, not patches
- Link to the handbook instead of the wiki
2024-04-15 11:56:13 +01:00
Christian Hergert
104a264d8b rendernode-tool: add support for rendering to PDF 2024-04-14 22:29:52 -07:00
Anders Jonsson
75fd582b97 Update Swedish translation
(cherry picked from commit f920f51300)
2024-04-14 11:22:05 +00:00
Matthias Clasen
89977412e9 Merge branch 'matthiasc/for-main' into 'main'
gsk: Fix a minor type mismatch

Closes #6628

See merge request GNOME/gtk!7138
2024-04-14 02:51:45 +00:00
Matthias Clasen
ce030b1b36 gsk: Fix a minor type mismatch
Use the same types in the declaration of gsk_standard_contour_init.

Fixes: #6628
2024-04-13 22:28:48 -04:00
Matthias Clasen
6c5dc8cd1f Merge branch 'matthiasc/for-main' into 'main'
wayland: Cosmetics

See merge request GNOME/gtk!7137
2024-04-13 21:56:27 +00:00
Matthias Clasen
fb4b38e5ea inspector: Fix a bunch of memory leaks
g_list_store_append is *not* transfer full. Oops.
2024-04-13 17:22:42 -04:00