Commit Graph

81774 Commits

Author SHA1 Message Date
Benjamin Otte
ffe56fe6b3 memoryformat: Parallelize
Refactor code so that it uses g_parallel_task_run().
2024-09-06 15:47:34 -04:00
Benjamin Otte
d4ba57fcc3 gdk: Add gdk_parallel_task_run()
This is just the API. Users will come later.

I considered putting it into gdkmemoryformat.c because it's likely gonna
be the only user and this one function is so little code, but it didn't
fit at all.
So now it's a new file.
2024-09-06 15:47:34 -04:00
Benjamin Otte
a95c9ebc51 memoryformat: Split out a function
Allow querying the fast conversion functions outside of
gdk_memory_convert().
2024-09-06 15:47:34 -04:00
Benjamin Otte
9195c39756 build: Alphabetic order is hard 2024-09-06 15:47:34 -04:00
Juliano de Souza Camargo
866c83909c Update Brazilian Portuguese translation 2024-09-06 13:00:13 +00:00
Luca Bacci
4965b7b6fa Merge branch 'wgl-updates' into 'main'
WGL Updates

Closes #6975

See merge request GNOME/gtk!7692
2024-09-06 12:47:41 +00:00
Andika Triwidada
3a2b8f94ec Update Indonesian translation 2024-09-06 04:13:55 +00:00
Matthias Clasen
3a5933a519 Merge branch 'mcatanzaro/#6983' into 'main'
popover: fix critical on pop down

Closes #6983

See merge request GNOME/gtk!7691
2024-09-06 00:14:09 +00:00
Matthias Clasen
4c295dc49c popover: Avoid unnecessary work
If the popover isn't visible, no need to do any extra
'cascade' work. This also helps to avoid running into
trouble during finalization when the parents are already
gone.
2024-09-05 15:27:55 -04:00
Emin Tufan Çetin
03ebb41262 Update Turkish translation 2024-09-05 18:02:12 +00:00
Yaron Shahrabani
b0c3265561 Update Hebrew translation 2024-09-05 12:43:43 +00:00
Danial Behzadi
98943b28aa Update Persian translation 2024-09-05 12:16:59 +00:00
Vasil Pupkin
c354c5a63d Update Belarusian translation 2024-09-05 10:03:35 +00:00
Tim Sabsch
2f8cb9b2d0 Update German translation 2024-09-04 18:21:04 +00:00
Luca Bacci
7559a87e8a WGL: Detect MESA D3D12 driver and request GDI compatibility
This way we get a non-opaque framebuffer / render target

Fixes #6975

References:
  [1] https://gitlab.gnome.org/GNOME/gtk/-/issues/6975
  [2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/11828
2024-09-04 20:02:44 +02:00
Luca Bacci
b2394691cc Inspector: Fix append_wgl_extension_row()
wglGetExtensionsStringARB takes an HDC argument even though it
checks extensions for the current context. This was done for future
extensibility. From [1]:

>    Should this function take an hdc? It seems like a good idea. At
>    some point MS may want to incorporate this into OpenGL32. If they
>    do this and and they want to support more than one ICD, then an HDC
>    would be needed.

Currently the HDC argument is unused, but still wglGetExtensionsStringARB()
is required to check if HDC is valid:

>    If <hdc> does not indicate a valid device context then the function
>    fails and the error ERROR_DC_NOT_FOUND is generated. If the function
>    fails, the return value is NULL. To get extended error information,
>    call GetLastError.

So wglGetExtensionsStringARB fails if we pass NULL. Here we can pass any
valid HDC, like for example the screen DC returned by GetDC(NULL), but
probably using wglGetCurrentDC() makes most sense.

Reference:
  [1] - https://registry.khronos.org/OpenGL/extensions/ARB/WGL_ARB_extensions_string.txt
2024-09-04 20:02:29 +02:00
Yuri Chornoivan
5a94004b59 Update Ukrainian translation 2024-09-04 16:46:15 +00:00
Michael Catanzaro
3bd609d77c popover: fix critical on pop down
It's expected that there may be no parent widget to grab focus.

This fixes 2299c02639.

Fixes #6983
2024-09-04 11:25:50 -05:00
Luca Bacci
84d2961a91 Inspector: Sync WGL extensions with GdkWin32GLContextWGL
Replace WGL_EXT_pixel_format with WGL_ARB_pixel_format and drop
WGL_ARB_MULTISAMPLE (unused).
2024-09-04 17:10:39 +02:00
Luca Bacci
3a9f26113f WGL: Fix attribs_remove_last() 2024-09-04 17:07:01 +02:00
Luca Bacci
6a240c36ac WGL: Swap core / compat in debug output 2024-09-04 17:04:58 +02:00
Luca Bacci
aaf4261969 WGL: Include renderer string in debug output 2024-09-04 17:03:54 +02:00
Luca Bacci
5dceb7f7d2 WGL: Make context current to get debug info
Otherwise we get NULL from glGetString()
2024-09-04 17:02:20 +02:00
Martin
3372b1a84b Update Slovenian translation 2024-09-04 14:26:58 +00:00
Luming Zh
75a4eca13a Update Chinese (China) translation 2024-09-04 13:21:40 +00:00
Jordi Mas i Hernandez
13f0ab881e Update Catalan translation 2024-09-04 12:40:06 +00:00
Fran Dieguez
d4b45526b2 Update Galician translation 2024-09-04 06:34:09 +00:00
Fran Dieguez
c06e1f4848 Update Galician translation 2024-09-04 06:11:36 +00:00
Matthias Clasen
6a4a52d110 Merge branch 'Enokilis-main-patch-44493' into 'main'
Typo in gtk/gtkcssprovider.c

See merge request GNOME/gtk!7688
2024-09-03 21:07:50 +00:00
Matthias Clasen
ed6f5b8755 Merge branch 'stroke-autoptr' into 'main'
gsk: Add autoptr cleanup function for GskStroke

See merge request GNOME/gtk!7690
2024-09-03 17:15:10 +00:00
Philip Withnall
e87b4dca71
gsk: Add autoptr cleanup function for GskStroke
It appeared to be missing, while other GSK types already have cleanup
functions defined.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-03 16:50:10 +01:00
Benjamin Otte
567c8b5ab3 Merge branch 'wip/smcv/debug-gsk-scaling-test' into 'main'
gsk/scaling test: Improve debuggability on failure

See merge request GNOME/gtk!7680
2024-09-03 15:30:32 +00:00
Benjamin Otte
7aeca0512c Merge branch 'wip/smcv/bug6977' into 'main'
scaling test: Fix intermittent failure with alpha = 0

Closes #6977

See merge request GNOME/gtk!7684
2024-09-03 15:27:20 +00:00
Matthias Clasen
5567934fc9 Merge branch 'wip/smcv/misc-realize' into 'main'
testsuite: If gsk_renderer_realize() fails, say why

See merge request GNOME/gtk!7686
2024-09-03 11:11:11 +00:00
Daniel Mustieles
63bece1fe7 Update Spanish translation 2024-09-03 09:25:56 +00:00
Simon McVittie
ad3c285fc6 scaling test: Show the input and expected average after each failed test
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-03 10:19:16 +01:00
Simon McVittie
47c461b25b testsuite: Show pixel format of texture pixels that differ
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-03 10:05:32 +01:00
Simon McVittie
97f0aa7875 testsuite: Share memorytexture version of compare_textures()
Unlike the version in scaling.c, this one incorporates debugging code
to print the pixels that differ.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-03 10:05:32 +01:00
Simon McVittie
8e54460a48 testsuite: Extract common code from gdk/memorytexture and gsk/scaling
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-03 10:05:32 +01:00
Simon McVittie
4c4d260199 scaling test: Avoid dividing zero by zero
If all four of the random colours have alpha channel exactly 0.0,
then the computed premultiplied average will also be zero.
Normalize the expected colour to (0,0,0,0) rather than (NaN,NaN,NaN,0).

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6977
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-03 10:03:58 +01:00
Jürgen Benvenuti
b18c6b5781 Update German translation 2024-09-03 05:06:47 +00:00
Enokilis
d76e241558 Fixed typo that prevented theme update in the GTK4 demo. 2024-09-03 02:34:49 +00:00
Simon McVittie
13cbd9fcc7 testsuite: If gsk_renderer_realize() fails, say why
Showing the error message is usually more useful for debugging than
just saying that something failed.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-03 02:44:24 +01:00
Matthias Clasen
6e54589d9e Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Cosmetics

See merge request GNOME/gtk!7678
2024-09-02 22:16:01 +00:00
Fran Dieguez
c781c0ff24 Update Galician translation 2024-09-02 17:23:04 +00:00
Benjamin Otte
0277e26152 Merge branch 'wip/otte/for-main' into 'main'
gpu: Use right GL context when exporting texture

See merge request GNOME/gtk!7679
2024-09-01 23:08:49 +00:00
Benjamin Otte
563cce5530 gsk: Use gsk_rect_init_offset() everywhere
... and make it use a graphene_point_t as argument, because that's what
the callers want.
2024-09-02 00:22:37 +02:00
Benjamin Otte
b0e4be7fda rendernode: Colors should not influence depth decisions
Depth of a rendernode should be determined by the textures used and the
compositing colorstate requirements.
Colors influence the colorstate choice, so they indirectly influence the
depth, but they should not influence the depth directly.

Otherwise a single color in a border being rec2100-pq would make us
switch to 16bit float.

Also remove gdk_color_get_depth(), because it was only used here and
because again: Colors should not influence depth decisions.
2024-09-02 00:22:37 +02:00
Benjamin Otte
e29701a203 gl: Handle GDK_MEMORY_NONE depth
In rare circumstances a rendernode can be MEMORY_NONE and we don't want
to render it as a float texture then.
2024-09-02 00:22:37 +02:00
Benjamin Otte
6a1cd87480 gpu: Use builder for memory texture 2024-09-01 22:49:34 +02:00