Commit Graph

81469 Commits

Author SHA1 Message Date
Matthias Clasen
0f85a40a25 colorstate: Plug a leak and allocate less
We don't need to allocate the matrices, but we do neet to free
the name of cicp color states.
2024-08-14 11:00:10 -04:00
Matthias Clasen
16ad1e428f colorstate: Don't leak names
The cicp colorstates allocate their names, so they should free
them too.
2024-08-14 11:00:10 -04:00
Matthias Clasen
a6e0028899 Merge branch 'wip/otte/for-kwin' into 'main'
Fix various issues with Kwin git

See merge request GNOME/gtk!7612
2024-08-14 14:58:08 +00:00
Bruce Cowan
a1a4026867 Update British English translation 2024-08-14 10:27:24 +00:00
Benjamin Otte
aff1b88c92 wayland: Work where the primaries have no name
Set primaries without name if supported, when named primaries are not.
But prefer named primaries if available.

This is just an attempt at defensive coding.
2024-08-14 08:30:55 +02:00
Benjamin Otte
dc072f881c wayland: Accept primaries/primaries_named interchangably
If we get sent primaries with the values as named primaries, treat them
like named primaries.

Fixes colorstate support on Kwin, which never sends named primaries.
2024-08-14 08:30:55 +02:00
Benjamin Otte
824ccfc562 gpu: Add an assertion
If the wrong color states get passed, we need to figure that out, before
we run shaders with junk values doing god knows what.
2024-08-14 08:30:55 +02:00
Benjamin Otte
8c6e5ca131 subsurface: Fully covered backgrounds don't need to be drawn
If the texture covers all of the black background (like when watching a
1080p stream fullscreen on a 1080p monitor) we don't need a compositor
with single pixel support.

Fixes offloading in Kwin.
2024-08-14 08:30:55 +02:00
Benjamin Otte
a7b69ad9b5 subsurface: Don't create a bg_subsurface until we need it
There's a ton of error checking happening that we want to do.

Because it turns out it is not really useful to create a subsurface for
the single pixel buffer when we don't even support single pixel buffers.
2024-08-14 08:30:55 +02:00
Benjamin Otte
3cd25516ab gdk: Improve GDK_DEBUG=linear
Keep a linear and a non-linear rendering colorstate around. That way, we
don't "return self;" from cicp colorstates and then end up with a cicp
ccs.
2024-08-14 08:30:40 +02:00
Benjamin Otte
f3c8c5a9c0 Merge branch 'wip/otte/for-main' into 'main'
color: Handle negative values in all transfer functions

See merge request GNOME/gtk!7609
2024-08-13 23:52:32 +00:00
Matthias Clasen
6878200ccf Merge branch 'matthiasc/for-main' into 'main'
drawcontext: Fix up color state ownership

See merge request GNOME/gtk!7608
2024-08-13 21:42:46 +00:00
Matthias Clasen
e1fbd52c29 gdk: Handle negative values in all transfer function
Make sure that for all eotfs/oetfs, eotf(x) == -eotf(-x)

In particular, don't pass negative values to pow() and cause
undefined behavior.
2024-08-13 15:47:17 -04:00
Benjamin Otte
79c2df8392 color: Handle negative values in all transfer functions
Make sure that for all eotfs/oetfs, eotf(x) == -eotf(-x)

In particular, don't pass negative values to pow() and cause undefined
behavior.
2024-08-13 20:47:40 +02:00
Scrambled 777
0888402cea Update Hindi translation 2024-08-13 18:38:21 +00:00
Matthias Clasen
3dae3205e7 drawcontext: Fix up color state ownership
begin_frame_full does not return a reference, we assume that the
color state is staying alive for the duration of the frame anyway,
so end_frame simply sets priv->color_state to NULL.
2024-08-13 13:23:20 -04:00
Matthias Clasen
4858122d17 Merge branch 'matthiasc/for-main' into 'main'
icon helper: Fix an argument order mishap

See merge request GNOME/gtk!7606
2024-08-13 16:50:31 +00:00
Matthias Clasen
a19023277f icon helper: Fix an argument order mishap
It seems that for a long time, no compiler saw it fit to warn
about this, even though they argument types are not the same.
2024-08-13 10:36:12 -04:00
Emmanuele Bassi
72dc9e3bf1 Merge branch 'fix_popover_docs_typo' into 'main'
docs: Fix popover docs typo

See merge request GNOME/gtk!7605
2024-08-13 12:29:37 +00:00
Mikael Forsberg
5f814cc30a docs: Fix popover docs typo 2024-08-13 13:50:47 +02:00
Martin
23aafbf09f Update Slovenian translation 2024-08-13 05:55:59 +00:00
Matthias Clasen
761dc7cad0 Merge branch 'matthiasc/for-main' into 'main'
testsuite: build fix

See merge request GNOME/gtk!7603
2024-08-13 03:31:47 +00:00
Matthias Clasen
f62a873eef inspector: Show color state of surfaces
Put this information in the misc tab for surfaces.
2024-08-12 22:25:08 -04:00
Benjamin Otte
03c99ebc99 Merge branch 'wip/otte/for-matthiasc' into 'main'
vulkan: Round damage rectangles properly

See merge request GNOME/gtk!7602
2024-08-13 00:24:47 +00:00
Matthias Clasen
cb339f85b8 testsuite: build fix
The statically linked tests need to have -DGTK_COMPILATION=1
in their cflags.
2024-08-12 19:19:15 -04:00
Benjamin Otte
5d056eabf6 egl: Round damage rectangles properly
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should
end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2
rectangle.
2024-08-13 00:36:11 +02:00
Benjamin Otte
4e77667ab8 vulkan: Round damage rectangles properly
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should
end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2
rectangle.
2024-08-13 00:36:11 +02:00
Luca Bacci
b1995d0d77 Merge branch 'gtkshowwin32' into 'main'
Hook up file/URI launching to ShellExecute

See merge request GNOME/gtk!7556
2024-08-12 14:17:27 +00:00
Matthias Clasen
8ccfda4972 Merge branch 'docs-fix' into 'main'
docs: fix since annotation

See merge request GNOME/gtk!7600
2024-08-12 10:14:35 +00:00
Yosef Or Boczko
9a47c0f923 Update Hebrew translation 2024-08-12 09:58:40 +00:00
Sergey Bugaev
b33b679b13 Hook up gtk_show_uri_full () to gtk_show_uri_win32 ()
On Windows, always use gtk_show_uri_win32 () instead of going through
GAppInfo.  Hook up gtk_file_launcher_launch () to gtk_show_uri_win32 ()
as well, always extracting the file path (and not a URI) and propagating
the always-ask flag.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-08-12 11:18:23 +03:00
Sergey Bugaev
8d41ecff3e Add gtk_show_uri_win32 ()
This is a new internal utility to open/show/launch/execute URIs and
files on Windows, using Windows's native ShellExecuteEx () and
SHOpenWithDialog () APIs.

The advantages this has over using the win32 implementation of
g_app_info_launch_default_for_uri ():

* the implementation here is fairly simple;
* it doesn't involve trying to grok the registry for app / file	type
  registrations (at least not inside GLib/GTK side, the implementations
  of ShellExecuteEx/SHOpenWithDialog presumably do that internally);
* it doesn't require convoluted formatting / escaping of invocation
  command lines that GWin32AppInfo / gspawn-win32 has to do otherwise
  (again, presumably the Windows libraries implement this internally);
* it's certain to end up opening the file/URI the same way other apps
  in the system would;
* it can/will open the native system UI for picking an app in case there
  are multiple options (or when so requested programmatically with the
  always-ask flag), or if there is no app installed that can handle the
  URI scheme / file type;
* it lets us pass the parent window handle, much like the portal APIs;
  presumably Windows would use this for positioning the picking UI, or
  placing the launched app's window;
* presumably, this will properly elevate privileges with a User Access
  Control (UAC) prompt if the app being launched requires administrator
  access; this presumably is impossible with the wspawn* APIs that
  gspawn-win32 uses;
* this has a much better chance to work properly with the win32 app
  isolation (AppContainer) technology.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-08-12 11:18:17 +03:00
Jan Willem
85bcf9a366 docs: fix since annotation 2024-08-12 07:05:47 +00:00
Matthias Clasen
b27e3631f0 Merge branch 'matthiasc/for-main' into 'main'
colorstate: Avoid a memcpy

See merge request GNOME/gtk!7599
2024-08-11 22:00:03 +00:00
Matthias Clasen
4d5ba0631d colorstate: Avoid a memcpy
We don't need it here, and this call can happen with
values being in memory that is not amenable to fast memcpy.
2024-08-11 16:31:42 -04:00
Matthias Clasen
0f618ae29e Cosmetics 2024-08-11 16:31:35 -04:00
Matthias Clasen
13d415f2f6 Add a comment 2024-08-11 16:31:18 -04:00
Matthias Clasen
e7b14ae26e Post-release version bump 2024-08-11 15:52:33 -04:00
Matthias Clasen
07658347a9 4.15.5 2024-08-11 15:43:54 -04:00
Matthias Clasen
0436801a9c Merge branch 'matthiasc/for-main' into 'main'
docs: Mark the docs check as failing

See merge request GNOME/gtk!7598
2024-08-11 19:43:16 +00:00
Matthias Clasen
4da593a3de Merge branch 'printdialog_fix_sporadic_win32_build_failures' into 'main'
printdialog: fix sporadic win32 build failures

See merge request GNOME/gtk!7464
2024-08-11 19:35:32 +00:00
Matthias Clasen
f5194bbf83 gdk: Mark the docs check as failing
It complains about get_type functions, which really don't need
or want docs.
2024-08-11 15:03:13 -04:00
Matthias Clasen
15552e5478 docs: Mark the docs check as failing
Despite promises, and after fixing the configuration, the test still
complains about deprecated api not having docs. Not useful.
2024-08-11 15:01:59 -04:00
Matthias Clasen
d9616c1993 docs: Try to fix the docs check 2024-08-11 15:00:54 -04:00
Matthias Clasen
5dbce5ce9b docs: Add a missing bit 2024-08-11 14:47:59 -04:00
Matthias Clasen
1f47c36e49 docs: Fix a typo 2024-08-11 14:47:48 -04:00
Benjamin Otte
ed05890740 Merge branch 'wip/otte/for-main' into 'main'
gl: Interpolate gradient colors as premultiplied

See merge request GNOME/gtk!7597
2024-08-11 17:41:41 +00:00
Benjamin Otte
68d73dcce5 nodeparser: Handle disallowed values for radial gradients
Make sure the radii are strictly positive.

Also handle the case where start >= end.
We can't really underline that error, because we don't track the
locations of the start/end properties until we know that there's an
error.
So just underline the whole radial gradient declaration.

Test included
2024-08-11 19:07:40 +02:00
Benjamin Otte
9643a21827 gl: Interpolate gradient colors as premultiplied
Tests included
2024-08-11 19:07:40 +02:00
Matthias Clasen
07b64c2f0f Merge branch 'matthiasc/for-main' into 'main'
docs: Updates

See merge request GNOME/gtk!7596
2024-08-11 15:53:11 +00:00