Commit Graph

81617 Commits

Author SHA1 Message Date
Matthias Clasen
c023762329 wip: Hack tone mapping into gtk4-image-tool
This is just for playing around, not intended to be merged.
2024-08-26 16:09:23 -04:00
Matthias Clasen
df450ad353 Implement gdk_color_map
This is a first attempt at tone mapping individual colors.

So far, this only adjusts luminosity.

The method used here is copied from kwin.
2024-08-26 16:09:23 -04:00
Matthias Clasen
a7e5dd819b gsk: Pass hdr metadata into the node processor
This gets it closer to where it is needed, eventually: the shaders.
2024-08-26 16:09:00 -04:00
Matthias Clasen
89507c7127 drawcontext: Provide hdr metadata
The HDR metadata is needed when rendering frames, so obtain it
from the surface in begin_frame and make it available on the draw
context. This matches what we already do for surface color states.

Currently, all platforms but Wayland just provide NULL for
HDR metadata.
2024-08-26 12:29:08 -04:00
Matthias Clasen
74ae0ff325 inspector: Show hdr metadata for textures 2024-08-26 12:29:08 -04:00
Matthias Clasen
fe9705b649 inspector: Show hdr metadata for surfaces
Put this information in the misc tab for surfaces.
2024-08-26 12:29:08 -04:00
Matthias Clasen
34ab95d59d image tool: Show hdr metadata 2024-08-26 12:29:08 -04:00
Matthias Clasen
4d66f4fc3a gstreamer: Set hdr metadata
Extract HDR metadata information from GskVideoMasteringDisplayInfo
and GskVideoContentLightLevel and attach it to the textures.
2024-08-26 12:29:08 -04:00
Matthias Clasen
5dafad61d5 wayland: Support hdr metadata
When we get information about the target color volume via the
xx-color-management-v4 protocol, attach it to surfaces.

When offloading, attach the HDR metadata of the texture to the
subsurface.
2024-08-26 12:29:08 -04:00
Matthias Clasen
04b98f224e surface: Add a hdr metadata field
Allow surfaces to carry HDR metadata for describing the
capabilities of the output it is presented on.

This information is important for gamut or tone mapping,
since the goal is to produce colors that can actually be
presented on the output.

When used in this way, the data is sometimes called the
'target color volume'.
2024-08-26 12:29:08 -04:00
Matthias Clasen
fd3ec138b6 png: Load and save hdr metadata
Handle HDR metadata that is contained in mDCv and cLLi chunks
in png data.
2024-08-26 12:29:08 -04:00
Matthias Clasen
0137297705 dmabuftexture: Add hdr-metadata
Allow associating HDR metadata when creating dmabuf textures.
2024-08-26 12:29:08 -04:00
Matthias Clasen
9a0d0486b6 gl texture: Add hdr metadata
Allow associating HDR metadata when creating GL textures.
2024-08-26 12:29:08 -04:00
Matthias Clasen
bdcff46e89 memorytexture: Support hdr metadata
Allow associating HDR metadata when creating memory textures.
2024-08-26 12:29:08 -04:00
Matthias Clasen
9f54ad3a55 Add GdkTexture::hdr-metadata
Allow textures to carry HDR metadata.

HDR metadata is optional since a) it isn't always available
and b) it isn't always relevant.

This information  can be used to improve the results when tone
or gamut mapping is applied to the texture content.
2024-08-26 12:29:08 -04:00
Matthias Clasen
4b766c5720 Add GdkHdrMetadata
This is just a data holder struct. It collects HDR metadata
according to SMPTE ST 20086 and CEA-861.3.
2024-08-26 12:29:08 -04:00
Scrambled 777
a231a2114a Update Hindi translation 2024-08-26 06:03:28 +00:00
Matthias Clasen
ab41a549f8 Merge branch 'app_menubar_a11y_label' into 'main'
applicationwindow: set menubar a11y label

See merge request GNOME/gtk!7640
2024-08-25 23:45:23 +00:00
Asier Sarasua Garmendia
83b387e782 Update Basque translation 2024-08-25 06:01:05 +00:00
Benjamin Otte
b41fe2e093 Merge branch 'wip/otte/slow-down' into 'main'
CI: Reduce max number of tests to 8/4

See merge request GNOME/gtk!7649
2024-08-25 03:50:54 +00:00
Benjamin Otte
93573218d4 CI: Reduce max number of tests to 8/4
CI is hitting various limits after we started out with 32. In
particular, the default runners hit 90s test timeouts.

And the asan runner runs into max threads limits, so reduce that one to
4 tests max.
2024-08-25 04:57:11 +02:00
Matthias Clasen
076968dc1e Merge branch 'ci-do-less-work' into 'main'
compare-render: Do less work for replay

See merge request GNOME/gtk!7647
2024-08-25 01:39:52 +00:00
Matthias Clasen
5e6cf622e3 compare-render: Do less work for replay
We don't need to render the node, we have a reference image.
2024-08-24 20:11:32 -04:00
Matthias Clasen
90c65e3611 Merge branch 'wip/otte/ci-fixes' into 'main'
CI improvements

See merge request GNOME/gtk!7639
2024-08-24 20:25:30 +00:00
Matthias Clasen
afe75aedc2 Merge branch 'dmabufize-experiment' into 'main'
tests: Use dmabufs in compare tests

See merge request GNOME/gtk!7642
2024-08-24 20:25:17 +00:00
Matthias Clasen
8b215a453c Merge branch 'settings_parse_enums' into 'main'
settings: allow parsing enums nicknames from settings.ini

See merge request GNOME/gtk!7641
2024-08-24 17:59:08 +00:00
Matthias Clasen
c3329123a3 Merge branch 'matthiasc/for-main' into 'main'
Add a since tag to GDK_TOPLEVEL_STATE_SUSPENDED

See merge request GNOME/gtk!7645
2024-08-24 17:33:23 +00:00
Matthias Clasen
107ef2017c tests: Use dmabufs in compare tests
Make the --replay mode of compare-render randomly turn textures it
finds into dmabuf textures, using /dev/udmabuf.
2024-08-24 13:10:25 -04:00
Matthias Clasen
acad180cee Add dmabuf tests that can run in ci
This is a test balloon tests that use /dev/udmabuf to produce
dmabufs that we can use in ci, even if we don't have a GPU.
Currently, the tests we can do are somewhat limited, since mesas
software renderers don't support dmabufs yet.
2024-08-24 13:10:25 -04:00
Benjamin Otte
504ca9c0c8 CI: run tests in a single dbus session
Instead of every test spawning their own dbus, make the tests share the
same server, just like they share their own compositor.

This should speed up things a bit and avoid weird interactions when
multiple dbus processes exist.
2024-08-24 18:36:23 +02:00
Benjamin Otte
2d9f28c0ff CI: Make asan a child of the default fedora build
Effects of that:

1. Keep artifacts
2. Produce a test report
3. Caching for ccache
2024-08-24 18:36:23 +02:00
Benjamin Otte
07b3e8785c CI: Limit maximum number of test processes to 32
There are spurious failures happening in CI runs and I blame those on
too many processes running at the same time overloading either the
compositor we're running against, or causing OOM situations or just
genereally slowing things down and hitting timeout limits.

The choice of 32 is rather arbitrary. I just picked a number that felt
good.
2024-08-24 18:36:23 +02:00
Benjamin Otte
68ef86ac4f wayland: Don't ask dbus about settings we don't care about
When running with default settings, we don't care what dbus thinks about
non-default settings.
2024-08-24 18:36:23 +02:00
Piotr Drąg
beb20fb1db Update POTFILES.in and POTFILES.skip 2024-08-24 14:58:15 +02:00
Juliano de Souza Camargo
3a965088a2 Update Brazilian Portuguese translation 2024-08-24 12:55:30 +00:00
Matthias Clasen
89118ee7ba Add a since tag to GDK_TOPLEVEL_STATE_SUSPENDED
We've changed the way we document additions in enums.
2024-08-24 08:38:19 -04:00
Arjan Molenaar
4b5d503cf0 Merge branch 'macos-control-click' into 'main'
macos: Add Ctrl+left-click mapping for context menus

Closes #6724

See merge request GNOME/gtk!7523
2024-08-24 11:42:35 +00:00
Sabri Ünal
aeac103fbc Update Turkish translation 2024-08-24 06:44:18 +00:00
Luming Zh
cd153e8a53 Update Chinese (China) translation 2024-08-24 04:05:37 +00:00
Benjamin Otte
5369b07eb0 Merge branch 'wip/otte/for-main' into 'main'
vulkan: Don't print errors on vkCreateInstance() failure

Closes #6947

See merge request GNOME/gtk!7643
2024-08-23 21:37:12 +00:00
Benjamin Otte
58f7b966d0 reftests: Make glarea-gl-only test XFAIL
With CI now using udmabufs, we run into bugs in Mesa. So we disable
some tests for now.

https://gitlab.freedesktop.org/mesa/mesa/-/issues/11773 is the bug
report for this one.
2024-08-23 22:53:13 +02:00
Benjamin Otte
4be1d754b7 vulkan: Don't spam stderr on failed Vulkan import
We write a debug message and then handle things using fallback.

Fixes error messages when trying to import incompatible dmabufs.
(in my case: llvmpipe dmabufs into radv)
2024-08-23 22:53:13 +02:00
g.willems
c1351fb659 settings: allow parsing enums nicknames from settings.ini
The value of `gtk-font-rendering` currently can't be specified
in "settings.ini", as the parser doesn't handle enums.
Allow reading values by enum nicknames.

Also cleanup obsolete references to rc files.
2024-08-23 21:09:37 +02:00
Benjamin Otte
d8926de40e vulkan: Don't print errors on vkCreateInstance() failure
We handle the error case right below with a proper GError, there's no
need to use the fallback error reporting.

Fixes #6947
2024-08-23 20:04:46 +02:00
Benjamin Otte
73c94cf1d6 gpu: Use the shared GL context when creating GL textures
The non-shared context's surface must survive the lifetime of the
GL texture, and when the renderer gets unrealized the surface goes away,
but we cannot guarantee that all GL textures have been destroyed by
then.

So better use a context we know will survive becuase it isn't bound to a
surface.

This is the same fix for NGL as f3ac0535f8
was for GL.
2024-08-23 20:04:46 +02:00
Benjamin Otte
c2a637f68a inspector: Add KHR version of swap_buffers_with_damage
Related: #6941
2024-08-23 19:01:05 +02:00
Benjamin Otte
6a986f03b6 gpu: Simplify the blur op a bit
I was looking through it and thought this looks better.

It's also 21 lineas of code less.
2024-08-23 19:01:05 +02:00
Ekaterine Papava
a52ae238ab Update Georgian translation 2024-08-23 09:55:42 +00:00
Yuri Chornoivan
8a0d688a61 Update Ukrainian translation 2024-08-23 04:43:09 +00:00
g.willems
3260b8f142 applicationwindow: set menubar a11y label
This fixes a warning from the inspector's accessibility checker.

Users only control the menu model, not the menubar widget,
so this can only be done in gtk.
2024-08-22 22:46:30 +02:00