LibWeb+LibGfx: Refactor CSS filters into LibGfx

CSS filters work similarly to canvas filters, so it makes sense to have
Gfx::Filter that can be used by both libraries in an analogous way
as Gfx::Color.
This commit is contained in:
Lucien Fiorini 2024-12-18 11:34:25 +01:00 committed by Alexander Kalenik
parent bc971a4ccc
commit 9fd1223992
Notes: github-actions[bot] 2024-12-18 17:55:46 +00:00
18 changed files with 365 additions and 367 deletions

View file

@ -329,7 +329,7 @@ void StackingContext::paint(PaintContext& context) const
context.display_list_recorder().push_stacking_context(push_stacking_context_params);
auto const& filter = computed_values.filter();
if (!filter.is_none()) {
if (!filter.is_empty()) {
context.display_list_recorder().apply_filters(paintable_box().computed_values().filter());
}
@ -354,7 +354,7 @@ void StackingContext::paint(PaintContext& context) const
paint_internal(context);
if (!filter.is_none()) {
if (!filter.is_empty()) {
context.display_list_recorder().restore();
}