Matthias Clasen
7cc5d5c7a5
Revert "Merge branch 'rgba-new-from-string' into 'main'"
...
This reverts commit 77f40d7508
, reversing
changes made to b969f4649d
.
It turns out we did not have agreement on this after all.
2023-12-02 10:55:35 +05:45
Emmanuele Bassi
0114fad8a5
Style/doc fixes from review
2023-11-28 00:42:19 +00:00
FeRD (Frank Dana)
39db73dff1
Add gdk_rgba_new_from_string()
...
Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
2023-11-24 22:19:39 -05:00
Matthias Clasen
b7a1b1d7ee
Fix some static analysis warnings
2023-11-24 10:35:57 -05:00
Matthias Clasen
210c7f25ad
testsuite: Leak even less
...
A memory leak spotted by asan.
2023-11-21 23:21:55 -05:00
Matthias Clasen
9695791f7b
testsuite: Don't leak so much
...
My subsurface attach code was leaking all the nodes. Oops.
2023-11-21 23:21:55 -05:00
Matthias Clasen
b916c4dac1
ci: Reshuffle test setups
...
Add a wayland_gl setup that explicitly uses desktop GL, and rename
wayland_gles to wayland_gles2 (since that is what it does).
In ci, make the fedora-x86_64 runner run tests with wayland_gl
and wayland_gles2, and make the fedora-release runner run test
with wayland and x11.
2023-11-19 08:24:38 -05:00
Matthias Clasen
fb969f5431
offload: Raise all subsurfaces that can be
...
If two subsurfaces don't overlap and aren't otherwise obstructed,
we can just raise them both.
Tests included.
2023-11-18 08:19:43 -05:00
Matthias Clasen
00a63a9fcf
offload tests: Fix the simple test
...
This was expecting the wrong 'above'. Oops.
2023-11-18 08:19:43 -05:00
Matthias Clasen
b4ae2377b3
offload tests: Make --verbose work
...
When passing a directory via G_TEST_SRCDIR, still pay attention
to --verbose, and print out each file thats tests. This lets us
quickly pin down which test fails.
2023-11-18 08:19:43 -05:00
Matthias Clasen
392977d670
offload tests: fix output
2023-11-18 08:18:29 -05: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
44d977844b
testsuite: Add offload tests
...
These tests come in two variants.
The first takes .node and .offload file, parses the node file,
and compares the resulting subsurface attachments to expected results.
The second variant takes two .node/.offload file pairs and a .diff
file, parses the node files, compares the resulting subsurface
attachments, and then diffs the nodes, comparing the resulting
area to the region in the .diff file.
2023-11-13 18:41:53 -06:00
Matthias Clasen
d0a675ab01
gsk: Add subsurface nodes
...
Also show them in the inspector recorder, with some information.
2023-11-13 22:17:35 +01:00
Benjamin Otte
a9e4993184
Merge branch 'wip/otte/enable-debug' into 'main'
...
Remove G_ENABLE_DEBUG around debug checks
See merge request GNOME/gtk!6546
2023-11-07 15:12:11 +00:00
Benjamin Otte
cd7e1c1387
dmabuf: Modify gdk_gl_context_import_dmabuf()
...
Move a bunch of code - namely the target selection - into the function.
I want to use the same code in the NGL renderer, so no need to duplicate
it.
2023-11-07 05:12:57 +01:00
Benjamin Otte
a2e1e727c5
testsuite: Make texture-scale-magnify tests have roundable numbers
...
Use a number that's 2^N * 255 to get floating point awesomeness combined
with uint8_t awesomeness.
Fixes rounding errors in samplers.
2023-11-07 05:12:57 +01:00
Benjamin Otte
f624586a75
testsuite: Don't skip test
...
The test now works without debugging as debug messages are always
available.
2023-11-05 11:16:23 +01:00
Benjamin Otte
00ce51472c
testsuite: Add render test for texture placement
...
Make sure that texture nodes sample from the texture properly.
2023-11-01 08:01:27 +01:00
Benjamin Otte
7ba4ba05e1
gl: Fix padding in icon library
...
The previous code would not pad the left side with the left column of
pixels but with the top row.
Test attached.
2023-10-31 00:50:00 +01:00
Benjamin Otte
85e1088171
gsk: Fix texture-scale node Cairo drawing
...
The code was interpreting x/y coordinates wrong sometimes and causing
things to not be drawn at the correct offset.
Testcase included.
2023-10-31 00:36:27 +01:00
Benjamin Otte
cc3e25b163
testsuite: Be more resistant against rounding errors
...
Make a test use numbers that are less likely to cause rounding
issues in GPUs (read: use powers of 2).
2023-10-31 00:36:27 +01:00
Benjamin Otte
bdb3e345c8
testsuite: Add test for scaling texture-scale node
...
Finally figured out a way to test that a texture-scale node using
NEAREST that is upscaled using a transform node doesn't use NEAREST but
LINEAR.
2023-10-31 00:36:27 +01:00
Benjamin Otte
a30e9dcfeb
testsuite: Add a test for nearest vs linear scales
2023-10-31 00:36:27 +01:00
Matthias Clasen
fb20542fcc
Merge branch 'fix_name_computation' into 'main'
...
a11y: When using rule 2.E for computing accessible name, use it only if appropriate
See merge request GNOME/gtk!6495
2023-10-27 17:32:14 +00:00
Lukáš Tyrychtr
a26e289d5c
Adjust tests
2023-10-26 09:44:59 +02:00
Chun-wei Fan
864c5b4608
testsuite: Disable dmabuftexture test on Windows
...
It's not meaningful there.
2023-10-24 14:08:16 +08:00
Benjamin Otte
c9b83dfa1d
testsuite: Add a test for texture-scale filters
...
Check that the right filter is chosen and that that filter is
implemented correctly.
The test is disabled for Cairo because Cairo (or rather Pixman)
doesn't follow the filtering specifications for GL/Vulkan and in
particular the nearest filter picks a different pixel.
2023-10-24 01:41:25 +02:00
Benjamin Otte
a579e3bc6d
build: Fix up header includes
...
These weren't fixed in the merge request in
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6489
to the change from
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6514
2023-10-23 03:12:09 +02:00
Matthias Clasen
d17d8e04a6
Add a few dmabuf texture tests
...
Test some basic import and export of dmabufs.
For now, put the test into the 'failing' suite,
since it does not work in CI, and also fails
on AMD hw.
2023-10-22 16:39:24 -04:00
Matthias Clasen
10250a0a6a
Add XRGB memory formats
...
These are not uncommon in dmabufs,
and supporting them is easy.
Fixes : #6172
2023-10-20 17:58:06 -04:00
Matthias Clasen
bd974b08b3
Add GDK_MEMORY_A8B8G8R8_PREMULTIPLIED
...
We did have 4 ordering variations of ARGB straight,
but only 3 premultiplied. Add the missing one.
Update all the places where we switch over memory formats.
2023-10-20 16:42:40 -04:00
Benjamin Otte
677a601d11
Merge branch 'wip/otte/for-main' into 'main'
...
dmabuf: Init the dmabuf subsystem before creating texture
See merge request GNOME/gtk!6499
2023-10-19 19:30:23 +00:00
Benjamin Otte
194db51fba
dmabuf: Make Builder::display non-nullable
...
We always have a display - the default display - so there's no need to
accept NULL.
Plus, we need a display when building the texture, so accepthing NULL
wouldn't even make sense.
Includes update to defaultvalue test.
2023-10-19 20:51:51 +02:00
Benjamin Otte
402a51b876
testsuite: Use a better opacity in the test
...
Using the default opacity of 0.5 makes it unclear if 0xFF should be
mapped to 0x7F or 0x80.
0.6 should hopefully map to 0x99 always.
2023-10-19 13:38:47 +02:00
Benjamin Otte
d1e091279c
testsuite: fix "empty" linear-gradient compare test
...
We need to provide color stops to avoid rounding errors with different
shaders.
That makes the empty linear gradient somewhat less empty, but I think
it's the emptiest we can make it.
2023-10-19 13:38:47 +02:00
Benjamin Otte
e584d17aad
Merge branch 'dmabuf-texture-api' into 'main'
...
Add API for dmabuf textures
See merge request GNOME/gtk!6463
2023-10-11 20:25:50 +00:00
Matthias Clasen
4936965fb6
display: Get supported dmabuf formats
...
These are the dmabuf formats that we can import
into a GL context as an EGLImage, and successfully
download.
We skip the GdkDisplay:dmabuf-formats property
in the default value tests, since the nominal
default value is NULL, but the actual value is
constructed on demand.
2023-10-11 15:43:01 -04:00
Christian Hergert
d8bbe1c296
testsuite/gsk: add render test for mask(texture|color)
2023-10-06 10:52:53 -07:00
Matthias Clasen
6da5b8cb25
tests: Split off some path utilities
...
Thes can be reused in different test sources.
2023-09-23 15:28:35 -04:00
Matthias Clasen
5dd0d39a6b
Drop performance tests
...
These were an experient, and not actively used,
and libsysprof has been changing api so they broke.
Fixes : #6112
2023-09-21 13:14:48 -04:00
Matthias Clasen
cc904698a6
Merge branch 'matthiasc/for-main' into 'main'
...
contour: Make circles and rounded rects match
See merge request GNOME/gtk!6405
2023-09-18 11:14:39 +00:00
Benjamin Otte
95865cb1bf
gsk: Fix clipping error when drawing shadows
...
When shadows were offset - in particular when offset so the original
source was out of bounds of the result - the drawing code would create a
pattern for it that didn't include enough of it to compose a shadow.
Fix that by not creating those patterns anymore, but instead drawing the
source (potentially multiple times) at the required offsets.
While that does more drawing, it simplifies the shadow node draw code,
and that's the primary goal of the Cairo rendering.
Test included.
2023-09-18 07:53:03 +02:00
Matthias Clasen
9c159cf129
path: Tweak printing a bit more
...
We are dealing with floats here, so using
g_ascii_dtostr isn't really the best.
Update affected tests.
2023-09-17 22:35:33 -04:00
Matthias Clasen
957d494090
contour: Make circles and rounded rects match
...
Make sure that we print the weights in the
same way (as floats).
Update affected tests.
2023-09-17 20:32:32 -04:00
Matthias Clasen
f67c57b1f8
path: Fix parsing rounded rects
...
We were messing up the bottom left corner.
Test included.
2023-09-17 17:01:44 -04:00
Matthias Clasen
ecfc661054
Adapt tests to new path builder behavior
...
Some tests were expecting to get elevated curves
from GskPathBuilder. But they won't, anymore.
2023-09-17 08:53:10 -04:00
Matthias Clasen
f0bd0c3e50
contour: Add more tests for circles
...
Cover the radius 0 case, in particular.
2023-09-16 08:31:52 -04:00
Matthias Clasen
4d71ff6da1
contour: Fixes for circles
...
Make circle contours use 'foreach coordinates' for
its points. This works here, but not for general
conics. As with the other custom contours, avoid
emitting collapsed conics.
2023-09-16 08:27:18 -04:00