gtk/testsuite/gsk
Benjamin Otte a05a021fd1 rendernode: Fix Cairo rendering of repeating gradients
Cairo and the GL renderer have a different idea of how to handle
transitioning of colors outside the defined range.

Consider these stops:
  black 50%, white 50%

What color is at 0%?

Cairo would transition between the last and first stop, ie it'd do a
white-to-black transition and end up at rgb(0.5,0.5,0.5) at 0%.
GL would behave as it would for non-repeating gradients and use black
for the range [0%..50%] and white for [50%..100%].
The web would rescale the range so the first stop would be at 0% and
the last stop would be at 100%, so this gradient would be illegal.

Considering that it's possible for code to transition between the
different behaviors by adding explicit stops at 0%/100%, I could choose
any method.
So I chose the simplest one, which is what the GL renderer does and
which treats repeating and non-repeating gradients the same.

Tests attached.
2023-09-07 16:19:20 +02:00
..
compare rendernode: Fix Cairo rendering of repeating gradients 2023-09-07 16:19:20 +02:00
nodeparser testsuite/gsk: add explicit dimensions to <svg> elements 2023-08-28 17:14:18 -04:00
boundingbox.c gsk: Add tests for GskBoundingBox 2023-08-06 17:16:46 -04:00
compare-render.c testsuite: Add render node replay tests 2023-08-25 15:54:05 +03:00
curve-special-cases.c Make curve tests pass 2023-08-26 11:22:58 -04:00
curve.c Make curve tests more robust 2023-08-25 20:23:08 -04:00
diff.c gsk: Improve test coverage 2022-07-15 16:41:05 -04:00
half-float.c Improve coverage for half-float fallbacks 2023-05-09 23:02:30 -04:00
meson.build rendernode: Fix Cairo rendering of repeating gradients 2023-09-07 16:19:20 +02:00
misc.c testsuite: Simplify shader test 2023-05-11 09:20:25 -04:00
node-parser.c testsuite: Reduce the use of g_assert 2021-04-12 21:22:46 -04:00
path-private.c Add a rectangle contour 2023-08-27 12:36:56 -04:00
path-special-cases.c Change gsk_path_get_closest_point to return distance 2023-08-28 11:22:30 -04:00
path.c Allow circles with radius of zero 2023-08-28 00:07:50 -04:00
render-nodes-cairo.test.in a11y: Consolidate accessibility environment variables 2020-11-09 16:21:49 +00:00
render-nodes-vulkan.test.in a11y: Consolidate accessibility environment variables 2020-11-09 16:21:49 +00:00
replay-node.c testsuite: Add render node replay tests 2023-08-25 15:54:05 +03:00
rounded-rect.c gsk: Add (private) gsk_rounded_rect_intersection() 2023-06-04 19:42:01 +02:00
shader.c testsuite: fix another surface unref warning 2023-05-11 06:40:57 -04:00
transform.c gsk: Improve test coverage 2023-05-10 20:21:31 -04:00