Matthias Clasen
b734614aed
Merge branch 'matthiasc/for-main' into 'main'
...
testdmabuf: Be more dynamic
See merge request GNOME/gtk!6865
2024-02-09 04:50:39 +00:00
Matthias Clasen
d418b0984c
testdmabuf: Be more dynamic
...
Add shortcuts for triggering various changes:
- F11 toggles fullscreen
- Ctrl-O toggles an overlay
- Ctrl-F flips the texture
2024-02-08 23:28:57 -05:00
Benjamin Otte
9c87dd503a
testdmabuf: Vulkan requires listing of all dependencies
...
Shuts up the validation layer.
2024-02-09 04:28:32 +01:00
Matthias Clasen
da024cfc90
Make devicepixels center its image
...
Also, add a fullscreen toggle action.
2024-02-08 15:31:38 -05:00
Matthias Clasen
6c6577dd6b
Add a devicepixels test
...
This is a very simple test that tries out rendering
textures 1:1 to device pixels.
2024-02-08 14:52:59 -05:00
Matthias Clasen
6dfa6fe442
testdmabuf: Add a --fullscreen option
...
This may help in getting a scanout tranche.
2024-02-07 12:38:18 -05:00
Christian Hergert
1b0f2cfeb8
tests: require linux for dmabuf test
2024-02-02 12:59:13 -08:00
Benjamin Otte
70f0cde730
tests: Fix gio API usage
...
Related: glib!3261
2024-01-16 06:22:43 +01:00
Benjamin Otte
6bac377fa5
gdk: Don't include vulkan.h in public API anymore
2024-01-07 14:47:22 +01:00
Matthias Clasen
0d03e570b0
tests: Use #pragma once consistently
...
Its the current coding style.
2023-12-20 10:25:41 -05:00
Matthias Clasen
bd3afd1006
testdmabuf: Add a --unpremultiplied option
...
This lets us test handling of straight-alpha dmabufs.
2023-12-15 07:40:27 -05:00
Matthias Clasen
b7a1b1d7ee
Fix some static analysis warnings
2023-11-24 10:35:57 -05:00
Matthias Clasen
be0546bb39
testdmabuf: Support a separate-alpha format
...
This helps with verifying the support for these formats
in gdkdmabuf.c.
2023-11-16 20:54:16 -05:00
Benjamin Otte
de3f55fc5f
testdmabuf: Use Vulkan to create dmabufs
...
This is somewhat hacky, but good enough for testing.
And it's definitely better than needing to chmod files owned by root.
2023-11-17 00:22:27 +01:00
Matthias Clasen
3ab7b2d7ce
Merge branch 'va-fixes-reported-by-pvs' into 'main'
...
Fix issues spotted by PVS-Studio
See merge request GNOME/gtk!6558
2023-11-15 00:27:08 +00:00
Andrey Kutejko
540a83327f
Fix issues spotted by PVS-Studio
2023-11-14 08:56:40 +01:00
Matthias Clasen
d3a5aa5304
testdmabuf: Use GtkGraphicsOffload
2023-11-13 22:27:51 +01:00
Matthias Clasen
f0ec1660c1
Make testdmabuf fall back to memfd
...
If we can't open /dev/dma_heap/system, fall back to using memfd_create.
It does not let us make a 'proper' dmabuf, but it is good enough to
test our handling of linear buffers in various formats.
2023-10-22 22:18:30 -04:00
Benjamin Otte
e05764806a
build: Change where we get drm_fourcc.h from
...
The canonical source for userspace is libdrm, not kernel headers.
Fixes compilation on Arch Linux.
2023-10-22 20:40:20 +02:00
Matthias Clasen
e1cbc96b8c
testdmabuf: Add a --download-to option
...
The next option we add will tilt the balance
towards GOptionContext.
2023-10-21 17:26:53 -04:00
Benjamin Otte
58a0e4ffaa
testdmabuf: Add --disjoint and --undecorated
...
The code now by default puts all planes into the same fd - like
v4l does, too.
The old behavior of one fd per plane can be enabled via --disjoint.
Also, am --undecorated option has been added so that the window
isn't decorated and all that the renderer has to do is display the
dmabuf.
This is useful when debugging just the dmabuf rendering.
2023-10-21 17:02:05 +02:00
Benjamin Otte
7ab9056c11
testdmabuf: Fix NV12
...
The code was computing the wrong size.
2023-10-21 16:42:16 +02:00
Benjamin Otte
2d9fbb16bc
testdmabuf: Use the actual pixel
...
The previous code would subsample the luma channel, too. Don't do that.
2023-10-21 16:42:15 +02:00
Matthias Clasen
98e883f9b4
Make a test app with dma heaps
...
This uses the dma-heap kernel api to create a dma-buf
and use it for a GdkDmabufTexture. It supports a few
formats to test how well GL conversion of YUV works.
The YUV code is adapted from weston tests.
2023-10-20 19:53:33 -04:00
Matthias Clasen
fdcb1d92c5
Remove sysprof leftovers
...
This is a followup to 5dd0d39a6b
.
2023-09-22 17:33:09 -04:00
Jonas Ådahl
7f946eff01
gtk: Add suspended window state
...
This is implemented using a new xdg_toplevel `suspended` state, and is
meant for allowing applications to know when they can stop doing
unnecessary work and thus save power.
In the other backends, the `suspended` state is set at the same time as
`minimized` as it's the closest there is to traditional windowing
systems.
2023-07-30 11:40:09 +03:00
Benjamin Otte
ece4e59e99
tests: Reduce number of random fonts
...
We were clowing through all the Pango caches for no benefit.
It made the test generation stuck in fontconfig loops instead of
quickly generating tests.
So don't do that and limit the different fonts to some reasonable list
of options.
2023-07-16 13:16:43 +02:00
Matthias Clasen
495411e16d
testsections: A testbed for sections
...
Add a simple test client that lets us compare
and explore the section handling in listview
and gridview.
2023-05-27 21:30:14 -04:00
Benjamin Otte
8bcb918de5
tests: Remove some tests
...
They are failing to build because they use deprecated functions and
nobody thinks they're worth fixing.
2023-05-17 01:24:22 +02:00
Emmanuele Bassi
1ad4c04b2a
Replace deprecated CSS loading API
...
Use gtk_css_provider_load_from_string() when loading CSS from C
strings.
2023-05-16 16:59:05 -04:00
Matthias Clasen
37345670c8
Add testfilelauncher
...
This is a test to use GtkFileLauncher a bit
more intensively than usual.
2023-05-15 00:20:24 -04:00
Matthias Clasen
ff920d98ec
Use GTK_ALIGN_BASELINE_FILL
...
Replace GTK_ALIGN_BASELINE with its new name
everywhere.
2023-05-09 14:28:26 -04:00
Matthias Clasen
082ba6d7c8
Introduce GTK_ALIGN_BASELINE_FILL/CENTER
...
It turns out that the old behavior of GTK_ALIGN_BASELINE
was actually used in libadwaita, so bring it back, and
introduce a new GtkAlign value for the new behavior.
2023-05-07 21:26:09 -04:00
Matthias Clasen
14279785e6
tests: Stop using gtk_widget_get_allocated_width
2023-04-29 14:30:21 -04:00
Matthias Clasen
76698e5de8
testbaseline2: Don't set height-requests
...
Widget with height requests have their baselines
ignored. Oops.
2023-04-29 08:01:11 -04:00
Matthias Clasen
b201d66981
Stop using gtk_widget_get_allocated_baseline
...
Use gtk_widget_get_baseline instead.
2023-04-28 15:25:58 -04:00
Matthias Clasen
3766f1da8b
Add another baseline test client
2023-04-28 08:50:12 -04:00
Benjamin Otte
5af3c2b2ec
testcolumnview: Port to GtkColumnViewCell
2023-04-01 20:49:40 +02:00
Benjamin Otte
00cb4c66cf
testdatatable: Add a --pages option
...
That way, local scrolling is available and the scrolling isn't random.
Recycling should now involve reordering the recycled widgets instead of
just keeping their order because all of them got recycled.
2023-04-01 20:49:40 +02:00
Matthias Clasen
b23ac5c8da
Deprecate gtk_widget_translate_coordinates
...
Update all (non-deprecated) callers to use
gtk_widget_compute_point instead.
Fixes : #5697
2023-03-25 10:14:35 -04:00
Ivan Molodetskikh
8d96b12cc7
testdndresize: Add non-resizing redrawing GL surface
...
The GL Wayland drag surface code path has a bug where it does not reset
the hotspot, so if a GL-backed draw surface redraws without resizing or
resetting the hotspot, it moves away. The next commit will fix that, but
this commit adds a test for that.
2023-03-15 16:09:51 -07:00
Ivan Molodetskikh
cd5af8c0d9
tests: Add resizing drag icon test
...
The test can verify that dynamic drag icon resizing and hotspot
adjustment work as intended.
2023-03-14 19:31:49 -07:00
Matthias Clasen
61d53b6402
tests: Stop using g_slice
2023-03-14 14:56:42 -04:00
Matthias Clasen
6cb612ac15
gtk-demo: Fix build without sincos
...
We are getting into trouble here if
sincos isn't detected but still present
in headers. Avoid that.
Also fix the other copy of gtkgears.c.
2023-02-18 10:41:02 -05:00
Matthias Clasen
d8cb11ec4a
Deprecate GtkStatusbar
...
The design patterns using statusbar are no longer popular,
and it is pretty easy to make a statusbar yourself with boxes
and labels, if you need one. The only thing special about
GtkStatusbar was its window resize handle, but that has
been gone for a long time.
2023-02-02 08:39:24 +01:00
Matthias Clasen
9356dfc404
filedialog: Drop shortcut folders
...
The filechooser portal does not support this,
and we are defaulting to using the portal now.
Lets not offer a non-functional API.
2023-01-06 07:40:57 -05:00
Matthias Clasen
0ccf9ad8fc
testfiledialog: Be more lenient
...
Accept both open_multiple and open-multiple.
2023-01-06 07:12:36 -05:00
Matthias Clasen
b6f9e00a9e
Add a test for GtkFileDialog
2023-01-05 23:13:58 -05:00
Matthias Clasen
18e0eaa9d6
tests: Stop using gtk_widget_show/hide
2022-12-13 13:46:02 -05:00
Matthias Clasen
a9b387b37b
tests: Silence a compiler warning
2022-12-09 13:13:24 -05:00