ladybird/Userland/Libraries/LibWeb/Painting
MacDue 4e04f81626 LibWeb: Don't encode painting limitations in RecordingPainter API
The current set of stacking context commands do not encode the
information needed to correctly paint the stacking context, instead,
they're based on the limitations of the current CPU renderer.

Stacking contexts should be able to be transformed by an arbitrary
3D transformation matrix, not just scaled from a source to a destination
rect. The `_with_mask()` stacking context also should not be separate
from the regular stacking context.

```c++
push_stacking_context(
	bool semitransparent_or_has_non_identity_transform,
	float opacity, Gfx::FloatRect const& source_rect,
	Gfx::FloatRect const& transformed_destination_rect,
	Gfx::IntPoint const& painter_location);

pop_stacking_context(
	bool semitransparent_or_has_non_identity_transform,
	Gfx::Painter::ScalingMode scaling_mode);

push_stacking_context_with_mask(
	Gfx::IntRect const& paint_rect);

pop_stacking_context_with_mask(
	Gfx::IntRect const& paint_rect,
	RefPtr<Gfx::Bitmap> const& mask_bitmap,
	Gfx::Bitmap::MaskKind mask_kind, float opacity);
```

This patch replaces this APIs with just:

```c++
push_stacking_context(
	float opacity,
        bool is_fixed_position,
        Gfx::IntRect const& source_paintable_rect,
	Gfx::IntPoint post_transform_translation,
	CSS::ImageRendering image_rendering,
	StackingContextTransform transform,
	Optional<StackingContextMask> mask);

pop_stacking_context()
```

And moves the implementation details into the executor, this should
allow future backends to implement stacking contexts without these
limitations.
2023-11-18 19:32:31 +01:00
..
AudioPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
AudioPaintable.h LibWeb: Begin implementing the HTMLAudioElement for audio playback 2023-06-13 06:14:01 +02:00
BackgroundPainting.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
BackgroundPainting.h LibWeb: Convert background painting to new pixel units 2022-12-14 16:47:57 +00:00
BorderPainting.cpp LibWeb: Remove "cached corner bitmap" and its use in the corner clipper 2023-10-21 23:16:17 +02:00
BorderPainting.h LibWeb: Remove "cached corner bitmap" and its use in the corner clipper 2023-10-21 23:16:17 +02:00
BorderRadiiData.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
BorderRadiiData.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
BorderRadiusCornerClipper.cpp LibWeb: Record painting commands in coordinates of stacking context 2023-10-25 05:53:36 +02:00
BorderRadiusCornerClipper.h LibWeb: Remove "cached corner bitmap" and its use in the corner clipper 2023-10-21 23:16:17 +02:00
BordersData.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
ButtonPaintable.cpp LibWeb: Make FontCache per-StyleComputer 2023-08-17 20:32:21 +02:00
ButtonPaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
CanvasPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
CanvasPaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
CheckBoxPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
CheckBoxPaintable.h LibWeb: Add scaleable checkboxes (with theme/accent-color support) 2023-03-23 08:27:51 +00:00
FilterPainting.cpp LibWeb: Get rid of DevicePixels usage in RecordingPainter 2023-10-24 18:55:12 +02:00
FilterPainting.h LibWeb: Resolve backdrop filter length in apply_style() 2023-10-12 07:38:48 +02:00
GradientData.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
GradientPainting.cpp LibWeb: Store RadialGradientStyleValue's position as PositionStyleValue 2023-11-07 22:00:24 +00:00
GradientPainting.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
ImagePaintable.cpp LibWeb: Respect offsets always when painting with object-position 2023-10-31 07:03:05 +01:00
ImagePaintable.h LibWeb: Move viewport subscriptions from BrowsingContext to Document 2023-08-23 20:14:20 +02:00
InlinePaintable.cpp LibWeb: Snap table grid to device pixels in separate borders mode 2023-08-08 12:26:11 +02:00
InlinePaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
InputColors.h LibWeb: Move checkbox color palette computation to helper header 2023-03-24 09:57:48 +00:00
LabelablePaintable.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
LabelablePaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
LinearGradientData.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
MarkerPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
MarkerPaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
MediaPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
MediaPaintable.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
NestedBrowsingContextPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
NestedBrowsingContextPaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Paintable.cpp LibWeb: Rename "position" enum to "positioning" 2023-10-30 10:40:30 +00:00
Paintable.h LibWeb: Layout SVG <mask> elements (but don't paint them) 2023-09-19 10:46:05 +02:00
PaintableBox.cpp LibWeb: Ignore document's box during overflow clip rect calculation 2023-11-09 07:56:34 +01:00
PaintableBox.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
PaintContext.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
PaintContext.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
PaintingCommandExecutorCPU.cpp LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
PaintingCommandExecutorCPU.h LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
PaintingCommandExecutorGPU.cpp LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
PaintingCommandExecutorGPU.h LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
PaintOuterBoxShadowParams.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
ProgressPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
ProgressPaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
RadioButtonPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
RadioButtonPaintable.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
RecordingPainter.cpp LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
RecordingPainter.h LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
ShadowData.h LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
ShadowPainting.cpp LibWeb: Record painting commands in coordinates of stacking context 2023-10-25 05:53:36 +02:00
ShadowPainting.h LibWeb/Painting: Do not paint box outer shadows not visible in viewport 2023-10-19 08:29:06 +02:00
StackingContext.cpp LibWeb: Don't encode painting limitations in RecordingPainter API 2023-11-18 19:32:31 +01:00
StackingContext.h LibWeb: Make CSS Transformation struct a proper class 2023-10-15 07:14:39 +02:00
SVGGraphicsPaintable.cpp LibWeb/Painting: Introduce PaintingCommandExecutor 2023-10-26 11:02:04 +02:00
SVGGraphicsPaintable.h LibWeb: Layout SVG <text> elements during layout (not while painting) 2023-10-30 19:44:54 +01:00
SVGPaintable.cpp LibWeb: Resolve and paint simple SVG masks 2023-09-19 10:46:05 +02:00
SVGPaintable.h LibWeb: Remove SVGContext 2023-07-02 01:31:18 +02:00
SVGPathPaintable.cpp LibWeb: Support transforms, stroking, gradients, etc for SVG <text> 2023-11-05 02:46:46 +01:00
SVGPathPaintable.h LibWeb: Support transforms, stroking, gradients, etc for SVG <text> 2023-11-05 02:46:46 +01:00
SVGSVGPaintable.cpp LibWeb: Remove SVGContext 2023-07-02 01:31:18 +02:00
SVGSVGPaintable.h LibWeb: Make a handful of paintable leaf classes final 2023-01-11 14:03:25 +01:00
TableBordersPainting.cpp AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
TableBordersPainting.h LibWeb: Make StackingContext point to paint tree instead of layout tree 2023-08-20 05:02:59 +02:00
TextPaintable.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
TextPaintable.h LibWeb: Make a handful of paintable leaf classes final 2023-01-11 14:03:25 +01:00
VideoPaintable.cpp LibWeb: Introduce RecordingPainter to serialize painting commands 2023-10-18 10:58:42 +02:00
VideoPaintable.h LibWeb: Extract media element timeline painting to a base class 2023-06-13 06:14:01 +02:00
ViewportPaintable.cpp LibWeb: Make StackingContext point to paint tree instead of layout tree 2023-08-20 05:02:59 +02:00
ViewportPaintable.h LibWeb: Move painting logic from Layout::Viewport to ViewportPaintable 2023-08-20 05:02:59 +02:00