Matthias Clasen
cd4dbd67a2
testsuite: Skip known-broken tests
...
The tiff pixbuf tests fail because of known
issues with the pixbuf tiff loader. Skip them.
Fixes : #4615
2022-10-18 23:22:47 -04:00
Matthias Clasen
5a6eab05e9
testsuite: Fix tiff pixbuf tests
...
This test wasn't actually testing what it claims,
since that functionality is broken in gdk-pixbuf.
Test it anyway.
2022-10-18 23:21:28 -04:00
Benjamin Otte
7872b41f16
testsuite: clear_current() when done
...
That way we ensure that the GL context(s) get disposed, which they
previously weren't due to them still being the current context.
This also implicitly adds testing of gLContext destruction, which
previously wasn't ever done by any test.
2022-01-06 19:22:47 +01:00
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
9395b28542
testsuite: Actually run all memorytexture tests
...
Whoops
2021-09-26 09:41:55 +02: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
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
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
Alexander Larsson
8e59cdabac
Add GDK_MEMORY_R8G8B8A8_PREMULTIPLIED
...
This is the default OpenGL format, and in fact the only pixel format
that GLES supports uploading as. Actually, the premultiplied part is
really just about how we use the textures, but all textures in GTK
are premultiplied.
2020-09-25 09:31:43 +02:00
Benjamin Otte
d7266b25ba
Replace "gint" with "int"
2020-07-25 00:47:36 +02:00
Matthias Clasen
779c71b66d
testsuite: Fix some memory leaks reported by asan
2020-07-08 15:09:13 -04:00
Matthias Clasen
8e73d007f5
testsuite: Fix an asan error
...
asan complains that some of the memorytexture tests
read past limits. Avoid that.
2020-07-08 15:09:08 -04:00
Benjamin Otte
6f6b07aaae
testsuite: Stop using g_test_bug()
...
The calls used old bugzilla URLs and nobody cared about that.
So apparently they are very unused.
There's also a potential conflict between gitlab and bugzilla URLs and
what base bug to use there.
The old usages have been converted to comments.
2019-05-12 17:28:18 +02:00
Benjamin Otte
d54ca3c74f
gdk: Add GDK_MEMORY_DEFAULT
...
This is the default memory format.
I added it because it is way better than including a private header and
using GDK_MEMORY_CAIRO_FORMAT_ARGB32.
2018-03-18 05:57:07 +01:00
Benjamin Otte
e5813b3ae7
texture: Export gdk_memory_texture_new() and GdkMemoryFormat
...
Also add tests for all these newfangled formats.
2018-03-12 17:21:45 +01:00