ladybird/Libraries/LibWeb/Painting
Jelle Raaijmakers f8c4043460 LibWeb: Repeat shader for repeating linear gradient
We implemented repeating linear gradients by expanding a vector of color
stops until the entire range was covered. This is both a bit wasteful
and caused Skia to draw corrupted gradients to screen whenever the total
amount of color stops and positions exceeded 127.

Instead of doing that, use the original color stops for the shader and
repeat it instead of clamping it. We need to do a bit of math to project
positions correctly, but after that the shader repeats itself nicely.

While we're here, calculate the gradient's length and the center point
as floats instead of ints, yielding a slight but noticeable improvement
in gradient rendering (see the diff on the zig zag pattern in
css-gradients.html for an example of this).
2025-10-22 10:45:18 +02:00
..
AudioPaintable.cpp LibWeb: Delete AudioPaintable::layout_box() 2025-10-10 09:03:39 +02:00
AudioPaintable.h LibWeb: Delete AudioPaintable::layout_box() 2025-10-10 09:03:39 +02:00
BackgroundPainting.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
BackgroundPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BackingStoreManager.cpp LibWeb: Update painting backing stores in all cases 2025-10-21 09:17:53 +02:00
BackingStoreManager.h LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
Blending.h LibWeb/CSS: Improved implementation of background-blend-mode 2025-04-01 13:38:00 +02:00
BorderPainting.cpp LibWeb+LibGfx: Remove Path::close_all_subpaths() 2025-09-25 21:42:52 +02:00
BorderPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BorderRadiiData.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
BorderRadiiData.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BorderRadiusCornerClipper.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
BorderRadiusCornerClipper.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BordersData.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
BordersData.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BoxModelMetrics.cpp LibWeb: Store final box model metrics in paint tree, not layout tree 2025-02-17 18:28:29 +01:00
BoxModelMetrics.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
CanvasPaintable.cpp LibWeb: Delete CanvasPaintable::layout_box() 2025-10-10 09:03:39 +02:00
CanvasPaintable.h LibWeb: Delete CanvasPaintable::layout_box() 2025-10-10 09:03:39 +02:00
CheckBoxPaintable.cpp LibWeb: Delete CheckBoxPaintable::layout_box() 2025-10-10 09:03:39 +02:00
CheckBoxPaintable.h LibWeb: Delete CheckBoxPaintable::layout_box() 2025-10-10 09:03:39 +02:00
ClipFrame.cpp LibWeb: Use scroll state from snapshot while applying clip rectangles 2025-07-24 13:03:23 -04:00
ClipFrame.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
DevicePixelConverter.h LibWeb: Maintain rect positioning when rounding to device pixel rects 2025-08-19 21:53:46 +02:00
DisplayList.cpp LibWeb: Compute bounds for paint-contained stacking contexts 2025-09-25 15:10:10 +02:00
DisplayList.h LibWeb: Implement pinch-to-zoom support 2025-10-10 15:37:45 +02:00
DisplayListCommand.cpp LibGfx+LibWeb: Implement GlyphRun::bounding_rect() 2025-09-23 17:55:32 +02:00
DisplayListCommand.h LibWeb: Calculate and use bounds for "simple" stacking contexts 2025-09-24 22:11:24 +02:00
DisplayListPlayerSkia.cpp LibWeb: Repeat shader for repeating linear gradient 2025-10-22 10:45:18 +02:00
DisplayListPlayerSkia.h LibWeb: Merge FillPathUsingPaintStyle and FillPathUsingColor 2025-08-03 10:42:33 +02:00
DisplayListRecorder.cpp LibWeb: Implement pinch-to-zoom support 2025-10-10 15:37:45 +02:00
DisplayListRecorder.h LibWeb: Compute bounds for paint-contained stacking contexts 2025-09-25 15:10:10 +02:00
DisplayListRecordingContext.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
DisplayListRecordingContext.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
FieldSetPaintable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
FieldSetPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
GradientData.h LibWeb: Remove unused include from GradientData.h 2025-10-22 10:45:18 +02:00
GradientPainting.cpp LibWeb/CSS: Use generated FooUnit types instead of Foo::Type 2025-09-11 17:06:44 +01:00
GradientPainting.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
ImagePaintable.cpp LibWeb: Make DisplayListRecorder::draw_text() take text as UTF-16 2025-09-21 13:22:38 +02:00
ImagePaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
InputColors.h LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
LabelablePaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
LabelablePaintable.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
MarkerPaintable.cpp LibWeb: Make DisplayListRecorder::draw_text() take text as UTF-16 2025-09-21 13:22:38 +02:00
MarkerPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
MediaPaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
MediaPaintable.h LibWeb: Delete non-const layout_node_with_style_and_box_metrics() 2025-10-10 16:58:51 +02:00
NavigableContainerViewportPaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
NavigableContainerViewportPaintable.h LibWeb: Delete NavigableContainerViewportPaintable::layout_box() 2025-10-10 09:03:39 +02:00
Paintable.cpp LibWeb: Copy "is inert" attribute into Paintable 2025-10-14 11:23:29 +02:00
Paintable.h LibWeb: Copy "is inert" attribute into Paintable 2025-10-14 11:23:29 +02:00
PaintableBox.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
PaintableBox.h LibJS+LibWeb: Use GC::Weak instead of AK::WeakPtr for GC-allocated types 2025-10-17 17:22:16 +02:00
PaintableFragment.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
PaintableFragment.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
PaintBoxShadowParams.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
PaintStyle.h LibWeb: Implement the color-interpolation property for SVG gradients 2025-08-17 10:51:05 +02:00
RadioButtonPaintable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
RadioButtonPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
ScrollFrame.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ScrollFrame.h LibJS+LibWeb: Use GC::Weak instead of AK::WeakPtr for GC-allocated types 2025-10-17 17:22:16 +02:00
ScrollState.cpp LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
ScrollState.h LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
ShadowData.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ShadowPainting.cpp LibWeb: Disallow spread distance value when parsing text-shadow 2025-09-18 15:21:22 +01:00
ShadowPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
ShouldAntiAlias.h LibWeb: Use shape-rendering to control anti aliasing for SVG paths 2025-08-19 09:47:28 +01:00
StackingContext.cpp LibWeb: Don't reach into layout node to check if paintable is SVG 2025-10-14 11:23:29 +02:00
StackingContext.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
SVGClipPaintable.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGClipPaintable.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGForeignObjectPaintable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
SVGForeignObjectPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
SVGGraphicsPaintable.cpp LibWeb: Delete unused SVGGraphicsPaintable::layout_box() 2025-10-10 09:03:39 +02:00
SVGGraphicsPaintable.h LibWeb: Delete unused SVGGraphicsPaintable::layout_box() 2025-10-10 09:03:39 +02:00
SVGMaskable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
SVGMaskable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
SVGMaskPaintable.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGMaskPaintable.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGPaintable.cpp LibWeb: Use shape-rendering to control anti aliasing for SVG paths 2025-08-19 09:47:28 +01:00
SVGPaintable.h LibWeb: Use shape-rendering to control anti aliasing for SVG paths 2025-08-19 09:47:28 +01:00
SVGPathPaintable.cpp LibWeb: Get rid of SVGPathPaintable::layout_box() 2025-10-14 11:23:29 +02:00
SVGPathPaintable.h LibWeb: Get rid of SVGPathPaintable::layout_box() 2025-10-14 11:23:29 +02:00
SVGSVGPaintable.cpp LibWeb: Delete unused SVGSVGPaintable::layout_box() 2025-10-10 09:03:39 +02:00
SVGSVGPaintable.h LibWeb: Delete unused SVGSVGPaintable::layout_box() 2025-10-10 09:03:39 +02:00
TableBordersPainting.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
TableBordersPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
TextPaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
TextPaintable.h LibWeb: Paint inspector overlays as a separate pass 2025-09-19 10:17:56 +02:00
VideoPaintable.cpp LibWeb: Delete VideoPaintable::layout_box() 2025-10-10 09:03:39 +02:00
VideoPaintable.h LibWeb: Delete VideoPaintable::layout_box() 2025-10-10 09:03:39 +02:00
ViewportPaintable.cpp LibWeb: Fix partially selecting non-text nodes 2025-10-21 10:23:10 +01:00
ViewportPaintable.h LibWeb: Add fast_is<T> optimization for more paintables 2025-09-22 15:00:50 +02:00