Revert "LibWeb/CSS: Implement 'background-blend-mode'"

This reverts commit a73cd88f0c.

Emitting SaveLayer for each paintable made rasterization a lot slower
on every website because now Skia has to allocate enormous amounts of
temporary surfaces. Let's revert it for now and figure how to implement
it with less aggressive SaveLayer usage.
This commit is contained in:
Aliaksandr Kalenik 2025-03-28 13:45:50 +00:00 committed by Alexander Kalenik
commit 552dd18696
Notes: github-actions[bot] 2025-03-28 16:49:06 +00:00
27 changed files with 199 additions and 303 deletions

View file

@ -14,7 +14,6 @@
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/ReplacedBox.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/Blending.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/SVGSVGPaintable.h>
@ -317,7 +316,16 @@ void StackingContext::paint(PaintContext& context) const
auto transform_matrix = paintable_box().transform();
auto transform_origin = paintable_box().transform_origin().to_type<float>();
Gfx::CompositingAndBlendingOperator compositing_and_blending_operator = mix_blend_mode_to_compositing_and_blending_operator(paintable_box().computed_values().mix_blend_mode());
Gfx::CompositingAndBlendingOperator compositing_and_blending_operator;
switch (paintable_box().computed_values().mix_blend_mode()) {
#undef __ENUMERATE
#define __ENUMERATE(mix_blend_mode) \
case CSS::MixBlendMode::mix_blend_mode: \
compositing_and_blending_operator = Gfx::CompositingAndBlendingOperator::mix_blend_mode; \
break;
ENUMERATE_MIX_BLEND_MODES(__ENUMERATE)
#undef __ENUMERATE
}
DisplayListRecorder::PushStackingContextParams push_stacking_context_params {
.opacity = opacity,