gtk/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
..
broadway gsk: Add GskStrokeNode 2023-08-07 13:02:57 -04:00
gl gsk: Clean up standalone headers 2023-08-29 12:58:30 -04:00
vulkan gsk: Clean up standalone headers 2023-08-29 12:58:30 -04:00
gen-gsk-gresources-xml.py gsk: Move shader resources 2021-04-03 08:24:58 -04:00
gsk.h Add GskPathMeasure 2023-08-25 20:16:49 -04:00
gskboundingboxprivate.h gsk: Add a bounding box type 2023-08-06 17:16:30 -04:00
gskcairoblur.c Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00
gskcairoblurprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskcairorenderer.c renderers: Handle large viewports 2022-02-26 20:35:44 +01:00
gskcairorenderer.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskcontour.c contour: Fixup for 1-point contours 2023-09-04 00:55:21 +02:00
gskcontourprivate.h Drop tolerance from gsk_contour_foreach 2023-08-28 20:52:22 -04:00
gskcurve-ct-values.c curve: Reduce the order of our approximation 2023-08-26 10:23:02 -04:00
gskcurve.c curve: Add a vfunc for get_at_length 2023-08-29 22:09:59 -04:00
gskcurveprivate.h curve: Add length computation 2023-08-25 16:13:36 -04:00
gskdebug.c vulkan: Add infrastructure for printing ops 2023-07-16 12:13:00 +02:00
gskdebugprivate.h vulkan: Add infrastructure for printing ops 2023-07-16 12:13:00 +02:00
gskdiff.c gsk: Stop using g_slice 2023-03-14 14:56:42 -04:00
gskdiffprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskenums.h path: Switch back to conics 2023-08-25 07:33:16 -04:00
gskenumtypes.c.template types: fix various use of volatile in type registration 2020-11-18 20:21:33 -08:00
gskenumtypes.h.template Use @basename@ in enumeration type templates 2019-02-04 14:02:45 +01:00
gskglshader.c Fix spelling errors 2022-11-17 22:49:45 -05:00
gskglshader.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskglshaderprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskpath.c path: Cosmetics 2023-08-28 21:13:58 -04:00
gskpath.h Change gsk_path_get_closest_point to return distance 2023-08-28 11:22:30 -04:00
gskpathbuilder.c Improve precondition checks for path points 2023-08-28 00:07:50 -04:00
gskpathbuilder.h pathbuilder: Add rel-variants for arc-to 2023-08-25 09:45:45 -04:00
gskpathmeasure.c measure: Cosmetics 2023-08-28 21:14:28 -04:00
gskpathmeasure.h Add GskPathMeasure 2023-08-25 20:16:49 -04:00
gskpathopprivate.h path: Switch back to conics 2023-08-25 07:33:16 -04:00
gskpathpoint.c Improve precondition checks for path points 2023-08-28 00:07:50 -04:00
gskpathpoint.h pathpoint: Add G_GNUC_EXTENSION to struct definition 2023-09-07 16:19:20 +02:00
gskpathpointprivate.h Improve precondition checks for path points 2023-08-28 00:07:50 -04:00
gskpathprivate.h Make gsk_path_builder_svg_arc_to public 2023-08-23 12:43:52 -04:00
gskpointprivate.h gsk: Add GskPath 2023-08-06 20:48:09 -04:00
gskprivate.c Drop an unused function 2022-07-15 15:47:11 -04:00
gskprivate.h vulkan: Add VulkanOp->next 2023-07-16 12:13:00 +02:00
gskprofiler.c Fix various bitfield warnings 2023-04-27 13:42:03 +02:00
gskprofilerprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskrectprivate.h gsk: Add gsk_rect_to_float() 2023-08-21 05:23:42 +02:00
gskrenderer.c renderer: return_if_fail() if the given texture size is 0 2023-06-04 19:42:00 +02:00
gskrenderer.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskrendererprivate.h gsk: Drop an unused function 2023-05-10 20:21:12 -04:00
gskrendernode.c rendernode: Change to gsk_render_node_get_preferred_depth() 2023-06-18 14:26:18 +02:00
gskrendernode.h rendernode: Put typedef into gsktypes.h 2023-08-12 23:13:47 +02:00
gskrendernodeimpl.c rendernode: Fix Cairo rendering of repeating gradients 2023-09-07 16:19:20 +02:00
gskrendernodeparser.c rendernodeparser: Generate better default child 2023-08-25 21:12:12 +02:00
gskrendernodeparserprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskrendernodeprivate.h gsk: Don't change the GskRenderNodeType order 2023-08-09 20:26:46 +02:00
gskroundedrect.c gsk: Add gskrectprivate.h 2023-07-22 01:33:44 +02:00
gskroundedrect.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gskroundedrectprivate.h vulkan: Try really hard to use clear 2023-07-16 13:16:41 +02:00
gskstroke.c Docs: Cosmetics 2023-08-25 22:21:27 -04:00
gskstroke.h Add GskStroke 2023-08-07 13:02:57 -04:00
gskstrokeprivate.h Add gsk_path_get_stroke_bounds 2023-08-07 13:02:57 -04:00
gsktransform.c snapshot, gsktransform: Mention that rotation happens around (0, 0) 2023-08-25 15:54:05 +03:00
gsktransform.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gsktransformprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gsktypes.h Add GskPathMeasure 2023-08-25 20:16:49 -04:00
meson.build Drop unused code 2023-08-26 11:29:09 -04:00