Benjamin Otte
354fa6544a
texture: Remove gdk_texture_download_float()
...
The download API is not well thought out yet, so postpone it until
there's an actual usecase for it.
Remove testcases, too.
2021-11-30 14:12:10 +01:00
Benjamin Otte
0898023e6b
testsuite: Create GL renderers without surfaces
2021-10-20 21:49:32 +02:00
Benjamin Otte
a859471960
testsuite: Add workarounds for non-gl backends
...
read: Fix tests for broadway
2021-10-18 14:17:11 +02:00
Benjamin Otte
1e7fb52b21
Add memory formats used by libpng
...
Add unpremultiplied high-depth formats. They are used in the real world,
so let's support them.
2021-10-13 14:33:44 +02:00
Matthias Clasen
49a64da7ec
Merge branch 'ngl-is-the-new-gl' into 'master'
...
Rename ngl to gl
Closes #4318
See merge request GNOME/gtk!4037
2021-10-11 06:43:41 +00:00
Benjamin Otte
b4ab9f7b8c
testsuite: Add a test targeting GL upload code
...
Previously, all the tests used the icon upload path using
glTexSubImage2D().
This test uses the custom texture path using glTexImage2D().
2021-10-09 04:44:30 +02:00
Matthias Clasen
144f727d5a
Rename ngl to gl
...
We have only one gl renderer now, and it is
a bit odd for it not be called gl.
2021-10-07 13:05:53 -04:00
Benjamin Otte
2e555db9a4
testsuite: Fail more accurately
...
Don't run the full test and then return "something failed" - instead
just explode when you find the failure.
2021-10-06 22:50:07 +02:00
Benjamin Otte
9395b28542
testsuite: Actually run all memorytexture tests
...
Whoops
2021-09-26 09:41:55 +02:00
Matthias Clasen
63647cace0
testsuite: Run the clipboard test in isolation
...
We can't have other test pop up windows, and possibly
stealing focus and preventing us from getting data
offers. So, run the clipboard test in isolation.
2021-09-17 11:38:28 -04:00
Benjamin Otte
577bf104c0
testsuite: Add png and tiff methods
...
We encode the texture to a PNG or TIFF and then decode
it again, in various ways.
2021-09-17 00:25:22 +02:00
Matthias Clasen
95a0c93839
Add contentserializer tests for textures
2021-09-17 00:25:22 +02:00
Matthias Clasen
e30b4c61cb
Add tests for the jpeg loader
2021-09-17 00:25:22 +02:00
Matthias Clasen
945c2531ac
Add tests for the tiff loader
2021-09-17 00:25:22 +02:00
Matthias Clasen
d6ce65f81c
Add tests for the png loader
2021-09-17 00:25:22 +02:00
Benjamin Otte
64acaf99fb
testsuite: Fix race in texture-threads test
...
Threads are evil, yo.
2021-09-16 23:59:37 +02:00
Benjamin Otte
b6d3561f4a
testsuite: Be more verbose in texture-threads test
...
The test randomly fails on CI, so try to be more helpful in debugging
them.
2021-09-16 23:59:37 +02:00
Benjamin Otte
6785461c26
gltexture: Make sure downloading textures works in a different thread
...
This happens in the real world when using the inspector to look at a
node recording of a GStreamer video while the video is still playing.
GStreamer will use the GL context in a different thread while we are
busy trying to download it.
A test is included.
2021-09-13 01:40:03 +02:00
Benjamin Otte
416763bf2d
testsuite: Add tests for gdk_texture_download_float()
2021-09-12 05:54:37 +02:00
Benjamin Otte
9179ebb28e
testsuite: Add memory test support for OpenGL up/downloads
...
Use a GL renderer to upload textures (and then optionally download them
via release() again). This way, we can test that the GL renderer
properly uploads textures to the right formats (not losing information
for HDR for example) and downloads them again.
2021-09-12 05:54:37 +02:00
Benjamin Otte
bcc17b3033
testsuite: Add tests uploading the memorytextures
...
Use a GL renderer and render_texture() them.
2021-09-12 05:54:37 +02:00
Benjamin Otte
00439f9e5c
testsuite: Rework memorytexture test some more
...
Instead of predefined colors, generate them randomly.
2021-09-12 05:54:37 +02:00
Benjamin Otte
c9d748fc51
testsuite: Overhaul memorytexture test
...
Instead of hardcoding pixel values, allow construction of textures by
filling them with GdkRGBA values.
2021-09-12 05:54:37 +02:00
James Westman
0782c8a051
gdk_rgba_parse: Support HSL colors
2021-09-10 16:56:42 -05:00
Benjamin Otte
d760332f00
testsuite: Add contentformat tests
2021-07-27 04:28:04 +02:00
Matthias Clasen
47bb556327
testsuite: Avoid a compiler warning
...
This was showing up in ci on macos.
2021-06-17 09:37:45 -04:00
Matthias Clasen
04bac8ef2a
testsuite: Run some installed tests exclusively
...
My suspicion is that the clipboard (and some other)
installed test interferes with others, because the
clipboard is a shared resource.
2021-05-17 07:16:42 -04:00
Matthias Clasen
bafa23fa2c
Add debug spew to gdk tests
2021-05-05 15:41:46 -04:00
Chun-wei Fan
e56754d27c
clipboard-client.c: Include necessary headers for Windows
...
We need to include io.h and process.h for close() and exit(), as unistd.h may
not be universally available.
2021-05-04 12:12:50 +08:00
Matthias Clasen
4c6c0b9099
Add a test for custom serializers
2021-05-02 09:17:20 -04:00
Matthias Clasen
a5cab71c9b
Add tests for content serialization
...
Test that roundtripping various types of content
through a stream of a given mimetype works as
expected.
2021-05-02 00:01:57 -04:00
Timm Bäder
6b6246f7b4
clipboard tests: Add noreturn annotations where possible
...
Clang complains when they are missing.
2021-05-01 17:14:23 +02:00
Matthias Clasen
c1b614772c
Install the clipboard-client binary
...
It is needed for the installed test.
2021-04-30 09:59:58 -04:00
Matthias Clasen
5636384449
Skip clipboard tests when they don't work
...
On headless weston, we have no seat, so focusing
the window won't work, and thus claiming the clipboard
won't either. Skip the tests in that case.
2021-04-30 09:17:39 -04:00
Matthias Clasen
f72ca060b5
Run gdk tests with an unset D-Bus address
...
If the session bus address is unset, GLib will
helpfully try to autolaunch a bus, which will
fail and timeout. If we set an empty address,
it gives up early.
2021-04-30 08:10:48 -04:00
Matthias Clasen
6482954c6e
Fix the clipboard test under X11
...
We don't have a signal handler to worry about here.
2021-04-30 08:02:35 -04:00
Matthias Clasen
e1a0e4bfbe
Make clipboard tests run installed
...
Use dedicated data files, and install them.
As usual, to run the test binary by hand, you
will need to set G_TEST_SRCDIR.
2021-04-30 07:47:19 -04:00
Matthias Clasen
be42644091
Add more clipboard tests
...
This tests the simple cases of copying text,
files, colors or images between processes.
2021-04-30 06:48:52 -04:00
Matthias Clasen
f98353c20b
Force g_test_init to cooperate
...
Change all g_test_init calls in the testsuite
to avoid the macro, so they work regardless of
G_DISABLE_ASSERT.
2021-04-12 21:22:46 -04:00
Matthias Clasen
03db2690e2
testsuite: Reduce use of g_assert
...
Stop using g_assert() in the gdk tests.
2021-04-12 08:18:00 -04:00
Matthias Clasen
b8693cc4f4
tests: Make the pixbuf test use TAP
...
Otherwise, meson just considers this test skipped.
2021-03-27 21:03:43 -04:00
Matthias Clasen
dda69bd16d
tests: Plug memory leaks
...
This one was pointed out by asan.
2021-03-27 21:03:43 -04:00
Matthias Clasen
50d42093b5
Make testsuite fail if we lack pixbuf loaders
...
Add a test that requires that we have png and jpeg
loaders.
2021-03-25 21:23:11 -04:00
Matthias Clasen
131a61c51b
testsuite: Fix a leak
...
asan pointed out that the array tests leak.
2021-01-22 11:50:04 -05:00
Benjamin Otte
96e1b85c2c
gdkarray: Add a "stolen" boolean to splice()
...
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
2020-12-24 06:38:45 +01:00
Emmanuele Bassi
0af6630521
a11y: Consolidate accessibility environment variables
...
Use a single environment variable for everything:
- select the ATContext implementation
- select the test ATContext
- disable ATContext entirely
We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.
The documentation needs to be updated to include the environment
variable.
2020-11-09 16:21:49 +00:00
Matthias Clasen
13d1e497f7
testsuite: Improve GdkCursor coverage
2020-11-04 23:36:09 -05:00
Matthias Clasen
168b21c77e
testsuite: Improve coverage for GdkTexture
2020-11-01 21:23:35 -05:00
Matthias Clasen
2dcc641d5a
testsuite: Improve coverage for GdkDisplayManager
2020-11-01 21:23:35 -05:00
Matthias Clasen
c8432ae668
testsuite: Improve coverage for seats
2020-11-01 21:23:35 -05:00