Commit Graph

78164 Commits

Author SHA1 Message Date
Benjamin Otte
310ab7b531 Remove G_ENABLE_DEBUG around debug checks
It started out as busywork, but it does many separate things. If I could
start over, I'd take them apart into multiple commits:

1. Remove G_ENABLE_DEBUG around GDK_DEBUG_*() calls
   This is not needed at all, the calls themselves take care of it.

2. Remove G_ENABLE_DEBUG around profiling code
   This now enables profiling support in release builds.

3. Stop poking _gdk_debug_flags and use GDK_DEBUG_CHECK()
   This was old code that was never updated.

4. Make !G_ENABLE_DEBUG turn off GDK_DEBUG_CHECK()
   The code used to
     #define GDK_DEBUG_CHECK(...) false
     #define GDK_DEBUG(...)
   which would compile away all the code inside those macros. This
   means a lot of variable definitions and debug utility functions
   would suddenly no longer be used and cause compiler errors.
2023-11-05 11:16:23 +01:00
Benjamin Otte
d55801c8ba debug: Turn gdk_debug_message() into a function
1. MSVC can't deal with the nonstandard ##__VA_ARGS__

2. It allows setting a breakpoint on it.
2023-11-05 10:21:54 +01:00
Matthias Clasen
b1809bfd88 Merge branch 'matthiasc/for-main' into 'main'
print dialog: Improve local fallback

See merge request GNOME/gtk!6547
2023-11-04 23:20:53 +00:00
Matthias Clasen
deb8a35ea0 print dialog: Improve local fallback
We need to set embed-page-setup for the paper size and orientation
combos to work.
2023-11-05 01:00:39 +02:00
Jordi Mas i Hernandez
c5ce24c82c Update Catalan translation 2023-11-04 18:28:38 +00:00
Artur S0
54815e4771 Update Russian translation 2023-11-04 02:09:09 +00:00
Matthias Clasen
5a99790a87 Merge branch 'examples-gtk-widget-show' into 'main'
docs: Replace deprecated gtk_widget_show with gtk_widget_set_visible

See merge request GNOME/gtk!6538
2023-11-03 15:29:39 +00:00
Matthias Clasen
8aa7174bfb Merge branch 'faster-fps-overlay' into 'main'
inspector: Speed up the fps overlay

See merge request GNOME/gtk!6544
2023-11-01 22:44:44 +00:00
Benjamin Otte
9df5e3cbd6 inspector: Replace "no glyph" with space glyph
This makes right-aligning the text work again.
2023-11-01 21:57:56 +01:00
Benjamin Otte
8b5194c016 inspector: Use the right font for the fps overlay
Initialize the font only when we have a widget that provides it. That
way we don't pick a terrible default font, but the widget's preferred
one.
2023-11-01 21:32:55 +01:00
Matthias Clasen
9a63172cf5 Some minor fpsoverlay improvements
Avoid some allocations.
2023-11-01 14:45:57 -04:00
Matthias Clasen
3ade9ae184 inspector: Speed up the fps overlay
Do less work!
2023-11-01 14:00:42 -04:00
Benjamin Otte
76349ff6e5 Merge branch 'wip/otte/for-main' into 'main'
testsuite: Add render test for texture placement

See merge request GNOME/gtk!6543
2023-11-01 14:36:07 +00:00
Benjamin Otte
dd530b45e2 gstmediafile: Handle premultiplied alpha
1. Check GStreamer caps for premultiplied alpha and select
   GdkMemoryFormat accordingly

2. Set a GdkMemoryFormat for GL textures

Fixes the video in widget-factory being treated as premultiplied when it
isn't.
2023-11-01 08:01:27 +01:00
Benjamin Otte
00ce51472c testsuite: Add render test for texture placement
Make sure that texture nodes sample from the texture properly.
2023-11-01 08:01:27 +01:00
Matthias Clasen
b6bcbeae23 Merge branch 'matthiasc/for-main' into 'main'
inspector: Show more EGL extensions

See merge request GNOME/gtk!6542
2023-10-31 23:12:54 +00:00
Robert Ancell
cf86cc1184 docs: Use gtk_window_present instead of gtk_widget_set_visible 2023-11-01 10:54:33 +13:00
Matthias Clasen
b503b60a49 inspector: Show more EGL extensions
We care about these now.
2023-10-31 17:53:25 -04:00
Matthias Clasen
5850055b68 Merge branch 'progressbar_overflow_fix' into 'main'
GtkProgressBar: Fix: progress can overflow trough

See merge request GNOME/gtk!6445
2023-10-31 11:22:32 +00:00
Matthias Clasen
b224e66a9f Merge branch 'scale_overflow_fix' into 'main'
GtkScale: Fix: highlight can overflow trough

Closes #5751

See merge request GNOME/gtk!6444
2023-10-31 11:22:02 +00:00
Robert Ancell
8aef682079 docs: Replace deprecated gtk_widget_show with gtk_widget_set_visible 2023-10-31 13:27:26 +13:00
Benjamin Otte
fe4b7a5159 Merge branch 'wip/otte/for-main' into 'main'
rendernode-tool: Add --undecorated to show command

See merge request GNOME/gtk!6537
2023-10-31 00:23:18 +00:00
Benjamin Otte
7ba4ba05e1 gl: Fix padding in icon library
The previous code would not pad the left side with the left column of
pixels but with the top row.

Test attached.
2023-10-31 00:50:00 +01:00
Benjamin Otte
85e1088171 gsk: Fix texture-scale node Cairo drawing
The code was interpreting x/y coordinates wrong sometimes and causing
things to not be drawn at the correct offset.

Testcase included.
2023-10-31 00:36:27 +01:00
Benjamin Otte
c1ed034367 rendernode: Use an exisiting function instead of reimplementing it 2023-10-31 00:36:27 +01:00
Benjamin Otte
cc3e25b163 testsuite: Be more resistant against rounding errors
Make a test use numbers that are less likely to cause rounding
issues in GPUs (read: use powers of 2).
2023-10-31 00:36:27 +01:00
Benjamin Otte
bdb3e345c8 testsuite: Add test for scaling texture-scale node
Finally figured out a way to test that a texture-scale node using
NEAREST that is upscaled using a transform node doesn't use NEAREST but
LINEAR.
2023-10-31 00:36:27 +01:00
Benjamin Otte
a30e9dcfeb testsuite: Add a test for nearest vs linear scales 2023-10-31 00:36:27 +01:00
Benjamin Otte
76007c4d09 rendernode-tool: Add --undecorated to show command
This is to get exactly just the rendernode drawn when testing, and not
any extra drawing code.
2023-10-31 00:36:27 +01:00
Matthias Clasen
020ef51cb0 Merge branch 'matthiasc/for-main' into 'main'
Revert "glcontext: Better debug spew"

See merge request GNOME/gtk!6536
2023-10-29 19:04:26 +00:00
Matthias Clasen
1914adc344 dmabuf: Don't check for image storage
I was wrong about this extension, and it isn't even a GL extension
to begin with, so revert all this.
2023-10-29 14:45:20 -04:00
Matthias Clasen
6e236b9459 Revert "gl context: Check for more GL extensions"
This reverts commit b8b5835fc6.
2023-10-29 14:44:46 -04:00
Matthias Clasen
11715760f9 Revert "glcontext: Better debug spew"
This reverts commit 30e14f73fa.
2023-10-29 14:44:29 -04:00
Matthias Clasen
f19c08ffda Merge branch 'add-view-grid-symbolic-icon' into 'main'
icons: Add view-grid-symbolic

Closes #6184

See merge request GNOME/gtk!6534
2023-10-29 15:32:27 +00:00
Kleis Auke Wolthuizen
d0f76b6ab4 widget-factory: Remove insert-image icon
This icon is already present in the hicolor icon theme.
2023-10-28 20:25:53 +02:00
Kleis Auke Wolthuizen
4c7206343a widget-factory: Remove view-grid-symbolic icon
No longer needed as it's included in the hicolor icon theme now.
2023-10-28 20:25:53 +02:00
Kleis Auke Wolthuizen
dfae2cb3a5 icons: Add view-grid-symbolic
This showed up as missing icon in the file chooser when used with
the hicolor icon theme.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6184
2023-10-28 20:05:27 +02:00
Matthias Clasen
de74d38039 Merge branch 'improve-msvc-force-include' into 'main'
MSVC builds: Improve build process (was: MSVC builds: Always enable items from msvc_recommended_pragmas.h)

See merge request GNOME/gtk!6114
2023-10-27 22:11:06 +00:00
Matthias Clasen
fb20542fcc Merge branch 'fix_name_computation' into 'main'
a11y: When using rule 2.E for computing accessible name, use it only if appropriate

See merge request GNOME/gtk!6495
2023-10-27 17:32:14 +00:00
Lukáš Tyrychtr
a26e289d5c Adjust tests 2023-10-26 09:44:59 +02:00
Lukáš Tyrychtr
892d3b9530 a11y: When using rule 2.E for computing accessible name, use it only if appropriate
We were using it in all cases, so, we were using it to compute descriptions,
and also for non-embedded controls. That was overriding descriptions
set, for example, in Gnome settings, and was causing the value of spinboxes
to be read multiple times.
2023-10-26 09:40:30 +02:00
Chun-wei Fan
8477dcfeff builds: Require -Zc:preprocessor for Visual Studio debug builds
This flag is actually required for the debugging code to successfully build,
so check that it is really there for debug-enabled Visual Studio builds.
2023-10-26 10:40:17 +08:00
Chun-wei Fan
25835afd9c MSVC Builds: Don't enable -utf-8 explicitly
We already require a Meson release that enables -utf-8 by default, so we don't
really need to explicitly enable it here.
2023-10-26 10:40:17 +08:00
Matthias Clasen
06dda4e12b Merge branch 'memory-format-swizzle-check' into 'main'
gl: Check all swizzle values

See merge request GNOME/gtk!6524
2023-10-26 02:38:35 +00:00
Chun-wei Fan
26edfe6d18 build: Add msvc_recommended_pragmas.h
We really always want to force-include msvc_recommended_pragmas.h to check for
things at compile time so that we can avoid stuff like missing includes or
attempting to return a value in a function that is supposed to have a
void-return-type.

The current problem is that, as indicated in the Visual Studio CI job, that we
couldn't locate msvc_recommended_pragmas.h during the build if GLib is built
as a subproject, and/or when msvc_recommended_pragmas.h is not in the paths
indicated by %INCLUDE%, meaning that the aforementioned issues would not be
caught by CI, which will then break builds on Visual Studio for people when
msvc_recommended_pragmas.h is found during their builds.

It would also be nice to be quiet from the warnings that we can really
disregard anyways.

So, add a copy of msvc_recommended_pragmas.h from GLib and update the build
files to look for it in build-aux/msvc, so that it can always be used during
the build, especially by the CI.
2023-10-26 10:38:14 +08:00
Matthias Clasen
4a749aee6e Fix swizzle values for some memory formats
For opaque formats with 3 channels, we should use the default
GL_ALPHA, but for opaque formats with an ignored 4th channel,
we must use GL_ONE.
2023-10-25 21:39:52 -04:00
Matthias Clasen
99a8417142 Merge branch 'add-bn-hi-po-translated' into 'main'
translated bn.po and hi.po

See merge request GNOME/gtk!6530
2023-10-25 16:34:19 +00:00
Matthias Clasen
20e2075a10 Merge branch 'allow-implicit-modifiers' into 'main'
Allow implicit modifiers

See merge request GNOME/gtk!6529
2023-10-25 02:52:49 +00:00
Matthias Clasen
d8c649b57f Merge branch 'matthiasc/for-main' into 'main'
dmabuf: No mipmaps for dmabuf textures

See merge request GNOME/gtk!6531
2023-10-25 02:43:19 +00:00
Matthias Clasen
bb2b8bf2c3 dmabuf: Refine the handling of implicit modifiers
If all formats with a given fourcc are external, treat the
fourcc with implicit modifiers as external too, following a
sugestion by Benjamin Otte.
2023-10-24 22:33:45 -04:00