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
5b82cf1145
rendernodeparser: Use gdk_texture_save_to_png_bytes
...
Avoid cairo, and use our own api for saving png data.
Update affected test output.
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
83ea623775
reftests: Use the default (aka NGL) renderer
...
All tests pass with the renderer now, so we can remove useof the
fallback.
2021-09-16 23:59:37 +02:00
Benjamin Otte
345faa7250
reftests: XFAIL border-half-pixel test
...
the GL renderer can't deal with non-integers
2021-09-16 23:59:37 +02:00
Benjamin Otte
08df891070
reftests: Use colors without rounding errors
...
Color values must be divisible by 15 to be convertible into U8 and U16
values with the same result. 0x80 is not one of these values, so switch
it to 0x99.
2021-09-16 23:59:37 +02:00
Benjamin Otte
62954a0338
ngl Fix bottom-right border render failure
...
The wrong index was used for offsetting the bottom border rect.
Test included.
2021-09-16 23:59:37 +02:00
Benjamin Otte
7cf5e5546b
testsuite: Switch color from khaki to yellow
...
llvmpipe doesn't loike compositing semitransparent khaki onto solid
khaki without rounding errors.
2021-09-16 23:59:37 +02:00
Benjamin Otte
58f66ebd07
reftests: Make image-compare use textures
...
All image comparisons are done on textures now.
2021-09-16 23:59:37 +02:00
Benjamin Otte
47330598fb
reftests: Use 0.6 instead of 0.5 for alpha
...
See previous commit about rounding
2021-09-16 23:59:37 +02:00
Benjamin Otte
90ed7b92b2
reftests: Use 0.6 alpha, not 0.5
...
0.5 leads to some GL renderers computing 0.5 * 0xFF as 0x7F and
others 0x80, while 0.6 * 0xFF (255 is divisible by 5) is always 0x99.
2021-09-16 23:59:37 +02:00
Benjamin Otte
625b5ce91a
testsuite: Port compare_render() to use textures
2021-09-16 23:59:37 +02:00
Benjamin Otte
46bb160923
testuite: Add opacity-overdraw test
...
Tests that overdrawing of content inside an opacity node happens before
the opacity is applied.
This is broken in the GL renderer and causes the opacity.ui reftest to
fail.
2021-09-16 23:59:37 +02:00
Benjamin Otte
0dfab46c15
reftests: Use GdkTexture instead of cairo_surface_t
...
This also switches the rendering code from using gsk_render_node_draw()
to gsk_renderer_render_texture().
Some tests are broken with the GL renderer, so this patch forces the
Cairo renderer until they get fixed.
2021-09-16 23:59:37 +02:00
Benjamin Otte
3a8ec683d3
reftests: Make diff pixels always opaque
...
We had pixels that did not differ in alpha and we then set 0 alpha
difference hich made the pixel invisible. Oops.
2021-09-16 23:59:37 +02:00
Benjamin Otte
de53b0c7a3
testsuite: remove box-order test
...
The test used to test that GtkBox ordered it's children left-to-right in
CSS, no matter the text direction or pack-type.
But there is neither a pack-type anymore nor does GTK4 do that.
So that test has been broken for yers, it just didn't render anything
wrong.
2021-09-16 23:59:37 +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
Matthias Clasen
4439ff0c12
testsuite: Stop running tests for the gl renderer
...
It does not exist anymore.
2021-09-14 16:12:55 -04:00
Matthias Clasen
ffab67ac70
testsuite: Call g_test_init in test binaries
...
Without it, we mess out on G_DEBUG=fatal-warnings,
so our ci does not alert us that we run a bunch of
tests which spit out warnings.
2021-09-14 16:12:55 -04:00
Matthias Clasen
2b4f798e34
testsuite: Fix a few memory leaks
...
These are keeping the asan build in ci from passing.
2021-09-14 08:29:45 -04: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
Benjamin Otte
9e11ea699c
Merge branch 'hsl' into 'master'
...
gdk_rgba_parse: Support HSL colors
See merge request GNOME/gtk!3899
2021-09-11 12:57:25 +00:00
Matthias Clasen
155a4fac5c
Add vectorized half-float conversion
...
We can't make the -4 versions inline, since
we use ifuncs for them, so make vectorized
versions.
Test included.
2021-09-10 22:17:31 -04:00
James Westman
0782c8a051
gdk_rgba_parse: Support HSL colors
2021-09-10 16:56:42 -05:00
Simon McVittie
16b9a30655
reftest-compare: Treat colour channels as undefined if alpha is zero
...
If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
2021-09-02 22:34:48 +01:00
Matthias Clasen
67495fcc77
Update settings tests
...
We have a new setting, so the test that is counting
settings needs an update.
2021-09-01 17:16:08 -04:00
Matthias Clasen
733fb527fa
Revert "reftests: Enforce default settings"
...
This reverts commit 4e4f57e091
.
This should not be necessary, since we have GDK_DEBUG=default-settings.
2021-08-30 11:01:22 -04:00
Simon McVittie
1071818df8
compose: Update sequences from libX11 1.7.2
...
This adds support for sequences like <Compose>,G,u -> capital G with
breve. Previously, only a capital U was accepted for E, G, I and O
(but a lower-case u was accepted for A and U for some reason).
Signed-off-by: Simon McVittie <smcv@debian.org>
2021-08-30 13:09:27 +01:00
Matthias Clasen
03ed585f6f
tests: Rewrite PangoAttribute introspection
...
We can use the new binding helpers to make this
a little less bothersome. That way, it will need
tweaks less often (only when new fundamental types
are introduced).
2021-08-24 12:53:48 -04:00
Matthias Clasen
ba95ef63da
Drop PANGO_VERSION_CHECK checks
...
We require Pango 1.49 now.
2021-08-22 15:26:23 -04:00
Matthias Clasen
8b2f28eee3
css: Add parser tests for line-height
2021-08-22 15:15:50 -04:00
Matthias Clasen
f95e9407a9
Fix up test output for new version
...
Annoying that this test has to be touched every time
we bump the version.
2021-08-22 14:48:12 -04:00
Matthias Clasen
fd885e42b0
Merge branch 'drop-gl' into 'master'
...
gsk: Drop the gl renderer
See merge request GNOME/gtk!3863
2021-08-22 17:04:25 +00:00
Matthias Clasen
ea31ae31c1
tests: Remove an outdated comment
...
It refers to a file that no longer exists.
2021-08-22 12:29:59 -04:00
Matthias Clasen
5feba67a3d
Handle new pango attribute type
...
Update all the places where we switch over
PangoAttrType to handle PANGO_ATTR_TEXT_TRANSFORM,
and do nothing for now - text-transform support
will land in 4.6.
2021-08-22 11:04:28 -04:00
Matthias Clasen
f1f197e3b9
4.4.0
2021-08-20 15:10:25 -04:00
Matthias Clasen
cedb6183e9
Fix imcontext tests
...
We should force our internal im context for these
tests, so we don't depend on the environment.
2021-08-20 15:10:25 -04:00
Matthias Clasen
528ebfabf0
Handle the new line height pango attribute
...
Update all the places where we switch over PangoAttributeType
to handle (and ignore, for now) the new line height attribute.
2021-08-10 08:22:52 -04:00
Matthias Clasen
e5e7f5dd88
ci: Disable treeview-headers-hidden reftest
...
Somebody needs to figure out why it fails in ci so
frequently.
2021-08-05 12:41:04 -04:00
Matthias Clasen
f7dc0dda4e
Merge branch 'big-keysyms' into 'master'
...
imcontext: Treat keysyms as 32bit values
Closes #4149
See merge request GNOME/gtk!3819
2021-08-03 01:05:16 +00:00
Matthias Clasen
6563b05d60
Add some GtkIMContext tests
...
For now, these check that the surrounding handling
in GtkText and GtkTextView is sane.
Fixes : #4151
2021-08-02 20:44:40 -04:00