Commit Graph

76670 Commits

Author SHA1 Message Date
Benjamin Otte
c2fef6f6fd listitemmanager: All sections without widgets are unmatched
We were failing to mark sections when both the start and end of the
untracked area fell on a section boundary.

Fixes testsuite failure in
https://gitlab.gnome.org/GNOME/gtk/-/jobs/2878290
2023-06-10 20:25:20 +02:00
Benjamin Otte
f06cfa2967 testsuite: Print update after changes, not before
This way, we don't do an empty print at the start and don't miss a print
at the end.
2023-06-10 20:25:20 +02:00
Benjamin Otte
2cbee7cf86 testsuite: Check that removing listitem trackers works properly
We remove them at the end, so just to be sure, check again.

(Guess if I added this check because removing failed.)
2023-06-10 20:25:20 +02:00
Benjamin Otte
f5cdd6fa32 testsuite: Add another test to the listitemmanager
Ensure the itemmanager doesn't lose any widgets by ensuring that the
tiles with widgets do account for all children of the list widget.
2023-06-10 20:25:20 +02:00
Benjamin Otte
d8b4249ee9 Merge branch 'wip/otte/for-main' into 'main'
testsuite: Set GIO_USE_VFS=local everywhere

See merge request GNOME/gtk!6076
2023-06-09 00:47:26 +00:00
Matthias Clasen
da47d9cc3d Merge branch 'print-subdir' into 'main'
Move printing code to its own directory

See merge request GNOME/gtk!6067
2023-06-09 00:32:45 +00:00
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
Matthias Clasen
8497f97dec print: Reimplement collate preview
Redo this with widgets instead of cairo drawing.
The new private widget is called GtkPageThumbnail.
2023-06-08 19:51:28 -04:00
Matthias Clasen
f22788a3a8 print: Drop some private api use 2023-06-08 19:51:28 -04:00
Matthias Clasen
a30e0fad1f Move resources too 2023-06-08 19:51:28 -04: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
c019eb9eea print: Some more include cleanup 2023-06-07 15:35:12 -04:00
Matthias Clasen
216e415186 Update POTFILES.in
The moving the printing sources needs to
be reflected here.
2023-06-07 14:41:46 -04: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
5aa62b6273 Fix a compiler warning
Compilers these days are very picky about
their NULLs.
2023-06-07 07:41:30 -04:00
Matthias Clasen
41d03c68f8 Make introspection build 2023-06-07 07:41:16 -04:00
Matthias Clasen
30ff352960 print: Maintain compatibility
gtkunixprint.h is a public header, that needs
to keep being installed in the same location.
2023-06-07 07:16:26 -04:00
Matthias Clasen
2adc017048 print: Start sorting apart includes
Use gtk/gtk.h in the print sources, so that it
becomes apparent where we are using private apis.
2023-06-07 00:18:14 -04:00
Matthias Clasen
d1aae4bffa print: Move all the remaining sources
Move the unix- and Windows-specific print
sources to the gtk/print subdirectory.
2023-06-07 00:06:33 -04:00
Matthias Clasen
434a747d42 print: Move frontend sources
Move the cross-platform printing sources
to the gtk/print subdirectory.
2023-06-06 23:21:19 -04:00
Matthias Clasen
50cf1c08dd print: Install headers in a subdir
This is a first step towards isolating the printing
code within gtk.
2023-06-06 23:16:09 -04: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