1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 03:08:11 +00:00
serenity/Userland/Libraries/LibWeb/Painting
Sam Atkins a796207b9f LibWeb: Paint box-shadows more efficiently
Our previous code roughly did this:

1. Generate a bitmap as large as the shadow would end up.
2. Paint a rectangle onto it.
3. Blur the whole bitmap.
4. Split it up and render each section.

This patch takes advantage of the fact that (aside from corners) each
horizontal or vertical strip of a box-shadow is identical to the
others, to generate and blur a much smaller bitmap - only large enough
for the four corners and 1px of central "side" in each direction. This
greatly reduces the memory footprint, and should also speed things up,
since there is much less to blur.
2022-02-09 19:36:26 +01:00
..
BackgroundPainting.cpp LibWeb: Allow LengthPercentage to hold a calculated value 2022-02-04 13:52:02 +01:00
BackgroundPainting.h LibWeb: Implement background-clip :^) 2021-11-17 22:20:01 +01:00
BorderPainting.cpp LibWeb: Allow LengthPercentage to hold a calculated value 2022-02-04 13:52:02 +01:00
BorderPainting.h LibWeb: Convert border-radii from Length to LengthPercentage :^) 2022-01-20 00:04:10 +01:00
PaintContext.h LibWeb: Clear SVG context after SVGSVGBox children are painted 2021-08-05 20:17:08 +02:00
ShadowPainting.cpp LibWeb: Paint box-shadows more efficiently 2022-02-09 19:36:26 +01:00
ShadowPainting.h LibWeb: Incorporate spread-distance into box-shadow rendering 2022-02-08 17:45:51 +01:00
StackingContext.cpp LibWeb: Keep tree order of sibling stacking contexts with same z-index 2022-02-05 22:50:39 +01:00
StackingContext.h LibWeb: Draw elements with opacity in a separate stacking context 2021-07-24 22:02:28 +04:30