Commit Graph

76652 Commits

Author SHA1 Message Date
Benjamin Otte
53bebd2ed1 testsuite: Set GIO_USE_VFS=local everywhere
And do so centrally, not randomly in individual tests.

(Hopefully) fixes spurious test failures in CI.

Related: #5867
2023-06-09 02:29:24 +02:00
Benjamin Otte
ca9f0abdd8 Merge branch 'wip/otte/for-main' into 'main'
testsuite: Make memorytexture tests random

See merge request GNOME/gtk!6075
2023-06-08 23:54:07 +00:00
Benjamin Otte
f033b6c2c6 testsuite: Don't always loop in memorytexture tests
When running the tests, only run the random (and potentially large) size
download test once instead of 10 times.

There's no real benefit in doing that, both because it's unlikely to
fail only in the 2nd or 9th run and because the sizes are picked
randomly.

This also speeds up the test massively as the download test was
dominating the runtime.
2023-06-09 01:12:32 +02:00
Benjamin Otte
45656ba426 testsuite: Make memorytexture tests random
Instead of picking a few numbers in advance and running them through the
test gauntlet every time, pick the random numbers at runtime.

This both increases the test coverage in that it ultimately tests more
combinations across many runs and it reduces the runtime of individual
runs because every tun only runs the download tests twice (with 1px and
the random size) instead of 5 times.

And that speedup benefits the CI, where the asan runs would cause this
test to timeout sometimes.
2023-06-09 01:12:32 +02:00
Benjamin Otte
83efe2b66c Merge branch 'wip/otte/for-vulkan' into 'main'
vulkan: Fancy gradients

See merge request GNOME/gtk!6073
2023-06-08 21:57:07 +00:00
Benjamin Otte
2883f4b7a2 vulkan: Antialiasing for linear gradients
Shaders are complicated now...
2023-06-08 22:16:18 +02:00
Benjamin Otte
0a0f0d9e7e testsuite: Add a test for repeating gradients
Make sure scaling the image also scales the color stop lookup.
2023-06-08 22:16:18 +02:00
Benjamin Otte
e3cc3f7841 vulkan: Make gradient shader use buffers
This allows putting any number of color stops into the buffer, so
fallbacks with too many stops are no longer necessary.
2023-06-08 21:53:06 +02:00
Benjamin Otte
d1135f9e3c vulkan: Add support for storage buffers
And add a default storage buffer that is used for per-frame temporary
data.

So far nothing is using this code, this is just infrastructure.
2023-06-08 21:53:06 +02:00
Benjamin Otte
2d89dfea29 vulkan: Switch GLSL version to 450
We need more modern features soon.
2023-06-08 21:53:06 +02:00
Benjamin Otte
89f20c2fb6 vulkan: Only update descriptor sets with contents
If one of the descriptor sets doesn't have any items, don't include it
in the sets passed to vkUpdateDescriptorSets().

This has no effect right now, because we either have both images and
samplers or neither, but it will become relevant once we also support
buffers.
2023-06-08 21:53:06 +02:00
Matthias Clasen
28fb91e85e Merge branch 'matthiasc/for-main' into 'main'
Fix a compiler warning

See merge request GNOME/gtk!6070
2023-06-07 15:11:29 +00:00
Matthias Clasen
7f3d4fa66e ci: Mark asan as must-pass
The asan test run seems to pass pretty
reliably now, so lets keep it that way.
2023-06-07 10:54:48 -04:00
Matthias Clasen
0505c8fac9 Fix a compiler warning
Compilers these days are very picky about
their NULLs.
2023-06-07 10:39:24 -04:00
Benjamin Otte
ccb7c9057a Merge branch 'wip/otte/for-main' into 'main'
gtk-demo: Remove random numbers

See merge request GNOME/gtk!6069
2023-06-07 14:21:32 +00:00
Benjamin Otte
ac6f18da12 gtk-demo: make the sidebar request proper width
- 25 chars sounds about right for the texts we use
- don't use min width so we allow shrinking the widget (large text or
  small mobile devices)
- ellipsize the text instead of clipping it.
2023-06-07 16:00:44 +02:00
Benjamin Otte
0d7069452b gtk-demo: Remove random numbers
There were 3 different random numbers set to determine the sidebar width
and all of them were wrong. Remove them.

Instead, propagate the natural width of the listitems.
2023-06-07 16:00:44 +02:00
Matthias Clasen
caaeaedf1f Merge branch 'matthiasc/for-main' into 'main'
Drop gtkunixprint-autocleanups.h

See merge request GNOME/gtk!6066
2023-06-07 03:14:17 +00:00
Matthias Clasen
19362522e0 print: Rename private headers
Rename private print-related headers to follow our
naming conventions:
gtkprintutils.h -> gtkprintutilsprivate.h
gtkprinteroption.h -> gtkprinteroptionprivate.h
gtkprinteroptionset.h => gtkprinteroptionsetprivate.h
gtkprinteroptionwidget.h -> gtkprinteroptionwidgetprivate.h
2023-06-06 22:32:18 -04:00
Matthias Clasen
50c3ea064b Drop gtkunixprint-autocleanups.h
Move these definitions where they belong
and git rid of an auxiliary header we don't
need anymore.
2023-06-06 22:18:12 -04:00
Matthias Clasen
84e345adac Merge branch 'matthiasc/for-main' into 'main'
ci: More asan test runs

See merge request GNOME/gtk!6064
2023-06-06 11:17:32 +00:00
Marco Trevisan
d2638f0955 Merge branch 'wip/otte/fix-glx' into 'main'
glx: Ignore all errors

See merge request GNOME/gtk!6065
2023-06-06 10:56:55 +00:00
Benjamin Otte
e580dcf18d glx: Fake an X request to make GLX hack work
Sometimes, GLX can decide to use the previous request serial when faking
XErrors via __glXSendError() (look through the Mesa sources to enjoy).
This can cause the error trap we just installed to not feel responsible
for the error. And that makes GDK decide to immediately abort the
application.
That is not what we or GLX want.

So we use a no-op X Request to bump the request number so that when GLX
does its shenanigans, it uses a serial that our error trap will catch.

Fixes a crash in mutter's CI which apparently manages to drive GLX
without an X server.
2023-06-06 05:20:34 +02:00
Benjamin Otte
14e44f36bf glx: Move error trap even further out
This way we only create one error trap for all attempts to create a
context instead of up to 3.
2023-06-06 05:20:34 +02:00
Benjamin Otte
1e60ad1430 glx: Ignore all errors
In error cases, glXCreateContextAttribsARB() will always return NULL so
it is enough to run the loop until the first non-NULL context is
returned.

And at that point, we can just look at the return value and ignore all
errors.
2023-06-06 05:20:34 +02:00
Matthias Clasen
2c67d9f7cf ci: Build less for asan
The asan build is all about running the tests
with asan, so lets not waste time building
demos and examples.
2023-06-05 22:05:16 -04:00
Matthias Clasen
4bcaeab4dc ci: More asan test runs 2023-06-05 21:47:36 -04:00
Matthias Clasen
97a4cc301a Merge branch 'matthiasc/for-main' into 'main'
Revert "ci: More verbose output from asan"

See merge request GNOME/gtk!6063
2023-06-06 01:37:47 +00:00
Matthias Clasen
baaa748248 ci: Disable headless tests under asan
Our use of LD_PRELOAD for these tests does not
sit right with asan, so just skip them in this
case.
2023-06-05 21:15:31 -04:00
Matthias Clasen
cf69fecc87 ci: Tweak asan options
Allow the allocator to return NULL, so our
g_try_malloc tests don't fail.
2023-06-05 21:09:51 -04:00
Matthias Clasen
29ad2c1247 ci: Turn off LeakSanitizer
When it is enabled, almost every report from asan is
"LeakSanitizer has encountered a fatal error."
So try without.
2023-06-05 20:56:53 -04:00
Matthias Clasen
1450789052 ci: Reenable asan builds
This is an attempts to catch sporadic ci failures.
2023-06-05 20:55:00 -04:00
Matthias Clasen
51f4ad55cf wayland: Free seat globals in dispose
This matches what we do for the display globals.
2023-06-05 20:50:09 -04:00
Matthias Clasen
94d65f6ef1 gdk: Dispose seats when a display is closed
We dispose the display itself. It does not make
sense to hold onto seat resources beyond that point.
2023-06-05 20:50:09 -04:00
Matthias Clasen
c3f446a95a wayland: Don't leak all globals 2023-06-05 20:50:09 -04:00
Matthias Clasen
ad8e5c3a39 wayland: Drop an unused field
Nobody is using the wl_input_device field.
2023-06-05 20:50:09 -04:00
Matthias Clasen
6b26a4f9be Revert "ci: More verbose output from asan"
This reverts commit 4f65c121b7.
2023-06-05 14:52:15 -04:00
Matthias Clasen
40f215ea46 Post-release version bump 2023-06-05 07:39:28 -04:00
Matthias Clasen
55dd5f4780 4.11.3 2023-06-05 07:26:41 -04:00
Matthias Clasen
1e878d3928 Merge branch 'search-entry-allocation' into 'main'
text: Make the placeholder non-intrusive

See merge request GNOME/gtk!6060
2023-06-05 10:17:46 +00:00
Benjamin Otte
66c57a8f4e Merge branch 'wip/otte/for-main' into 'main'
testsuite: Adapt color-matrix testcase

See merge request GNOME/gtk!6018
2023-06-05 04:07:27 +00:00
Benjamin Otte
ee22f8f52f stringsorter: Handle NULL strings
NULL is a valid string GValue, so we need to handle it.
The utf8 normalizing and collating functions do not, so we better catch
it early.
2023-06-05 05:33:07 +02:00
Benjamin Otte
9070c457d6 testsuite: Make clipped-repeat test work universally
Cover the rounded corners so that they cause no visible difference in
the end result.
2023-06-05 05:33:07 +02:00
Benjamin Otte
bba324ce30 rendernode: Scale repeat offscreens properly
Respect the matrix in use at time of encountering a repeat node so that
the offscreen uses roughly the same device pixel density as the target.

Fixes the handling of the clipped-repeat test.
2023-06-05 05:33:07 +02:00
Benjamin Otte
c322ab34c7 rendernode: Use cairo_set_device_offset()
Simplifies the code.
2023-06-05 05:33:07 +02:00
Benjamin Otte
8c5e046574 testsuite: Adapt color-matrix testcase
Make it use an alpha value that is well defined, ie 0.4 instead of 0.5.

0.4 * 255 = 102
0.5 * 255 = 127.5

This avoids rounding issues where some math may cause the resulting
alpha value to be 127, and some other math ends up with 128.
2023-06-05 05:33:07 +02:00
Benjamin Otte
8860a2a688 testsuite: fix memleak
Also use the actual diff command we found instead of searching for it
again.
2023-06-05 05:33:07 +02:00
Matthias Clasen
5ca40c3660 Merge branch 'matthiasc/for-main' into 'main'
gl: Free all tracked buffers

See merge request GNOME/gtk!6061
2023-06-05 03:03:01 +00:00
Matthias Clasen
a9f9fb2022 gl: Free all tracked buffers
This was overlooked when the number of tracked
buffers was bumped from 2 to 4 in 46e3454eb7.
2023-06-04 22:17:56 -04:00
Matthias Clasen
a8a49d270b searchentry: Improve size allocation
We want to always reserve space for the clear icon,
but let the text widget use that space when the icon
isn't shown. A plain box layout can't do that, so
do our own size allocation.
2023-06-04 21:50:35 -04:00