Sfoglia il codice sorgente

LibWeb: Rename RecordingPainter to DisplayListRecorder

Use more widely recognized name among browser engine developers.
Aliaksandr Kalenik 1 anno fa
parent
commit
854b269338
43 ha cambiato i file con 204 aggiunte e 204 eliminazioni
  1. 1 1
      Meta/gn/secondary/Userland/Libraries/LibWeb/Painting/BUILD.gn
  2. 1 1
      Userland/Libraries/LibWeb/CMakeLists.txt
  3. 1 1
      Userland/Libraries/LibWeb/CSS/StyleValues/ConicGradientStyleValue.cpp
  4. 2 2
      Userland/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp
  5. 1 1
      Userland/Libraries/LibWeb/CSS/StyleValues/LinearGradientStyleValue.cpp
  6. 1 1
      Userland/Libraries/LibWeb/CSS/StyleValues/RadialGradientStyleValue.cpp
  7. 1 1
      Userland/Libraries/LibWeb/Forward.h
  8. 5 5
      Userland/Libraries/LibWeb/HTML/Navigable.cpp
  9. 1 1
      Userland/Libraries/LibWeb/HTML/Navigable.h
  10. 3 3
      Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp
  11. 2 2
      Userland/Libraries/LibWeb/Painting/AudioPaintable.cpp
  12. 5 5
      Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp
  13. 2 2
      Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
  14. 2 2
      Userland/Libraries/LibWeb/Painting/BorderPainting.h
  15. 2 2
      Userland/Libraries/LibWeb/Painting/BorderRadiusCornerClipper.cpp
  16. 1 1
      Userland/Libraries/LibWeb/Painting/CanvasPaintable.cpp
  17. 5 5
      Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp
  18. 1 1
      Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.cpp
  19. 1 1
      Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.h
  20. 1 1
      Userland/Libraries/LibWeb/Painting/CommandExecutorGPU.h
  21. 1 1
      Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.h
  22. 37 37
      Userland/Libraries/LibWeb/Painting/DisplayListRecorder.cpp
  23. 9 9
      Userland/Libraries/LibWeb/Painting/DisplayListRecorder.h
  24. 1 1
      Userland/Libraries/LibWeb/Painting/FilterPainting.cpp
  25. 3 3
      Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp
  26. 10 10
      Userland/Libraries/LibWeb/Painting/InlinePaintable.cpp
  27. 6 6
      Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp
  28. 15 15
      Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp
  29. 1 1
      Userland/Libraries/LibWeb/Painting/MediaPaintable.h
  30. 6 6
      Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp
  31. 2 2
      Userland/Libraries/LibWeb/Painting/PaintContext.cpp
  32. 5 5
      Userland/Libraries/LibWeb/Painting/PaintContext.h
  33. 32 32
      Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
  34. 1 1
      Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp
  35. 3 3
      Userland/Libraries/LibWeb/Painting/SVGMaskable.cpp
  36. 6 6
      Userland/Libraries/LibWeb/Painting/SVGPathPaintable.cpp
  37. 3 3
      Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.cpp
  38. 3 3
      Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp
  39. 7 7
      Userland/Libraries/LibWeb/Painting/StackingContext.cpp
  40. 5 5
      Userland/Libraries/LibWeb/Painting/TableBordersPainting.cpp
  41. 6 6
      Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp
  42. 1 1
      Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp
  43. 2 2
      Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp

+ 1 - 1
Meta/gn/secondary/Userland/Libraries/LibWeb/Painting/BUILD.gn

@@ -17,6 +17,7 @@ source_set("Painting") {
     "Command.cpp",
     "Command.cpp",
     "CommandExecutorCPU.cpp",
     "CommandExecutorCPU.cpp",
     "DisplayList.cpp",
     "DisplayList.cpp",
+    "DisplayListRecorder.cpp",
     "FilterPainting.cpp",
     "FilterPainting.cpp",
     "GradientPainting.cpp",
     "GradientPainting.cpp",
     "ImagePaintable.cpp",
     "ImagePaintable.cpp",
@@ -30,7 +31,6 @@ source_set("Painting") {
     "PaintableBox.cpp",
     "PaintableBox.cpp",
     "PaintableFragment.cpp",
     "PaintableFragment.cpp",
     "RadioButtonPaintable.cpp",
     "RadioButtonPaintable.cpp",
-    "RecordingPainter.cpp",
     "SVGClipPaintable.cpp",
     "SVGClipPaintable.cpp",
     "SVGForeignObjectPaintable.cpp",
     "SVGForeignObjectPaintable.cpp",
     "SVGGraphicsPaintable.cpp",
     "SVGGraphicsPaintable.cpp",

+ 1 - 1
Userland/Libraries/LibWeb/CMakeLists.txt

@@ -544,6 +544,7 @@ set(SOURCES
     Painting/CheckBoxPaintable.cpp
     Painting/CheckBoxPaintable.cpp
     Painting/ClippableAndScrollable.cpp
     Painting/ClippableAndScrollable.cpp
     Painting/DisplayList.cpp
     Painting/DisplayList.cpp
+    Painting/DisplayListRecorder.cpp
     Painting/GradientPainting.cpp
     Painting/GradientPainting.cpp
     Painting/FilterPainting.cpp
     Painting/FilterPainting.cpp
     Painting/ImagePaintable.cpp
     Painting/ImagePaintable.cpp
@@ -558,7 +559,6 @@ set(SOURCES
     Painting/PaintableBox.cpp
     Painting/PaintableBox.cpp
     Painting/PaintableFragment.cpp
     Painting/PaintableFragment.cpp
     Painting/RadioButtonPaintable.cpp
     Painting/RadioButtonPaintable.cpp
-    Painting/RecordingPainter.cpp
     Painting/SVGForeignObjectPaintable.cpp
     Painting/SVGForeignObjectPaintable.cpp
     Painting/SVGPathPaintable.cpp
     Painting/SVGPathPaintable.cpp
     Painting/SVGGraphicsPaintable.cpp
     Painting/SVGGraphicsPaintable.cpp

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleValues/ConicGradientStyleValue.cpp

@@ -47,7 +47,7 @@ void ConicGradientStyleValue::paint(PaintContext& context, DevicePixelRect const
     VERIFY(m_resolved.has_value());
     VERIFY(m_resolved.has_value());
     auto destination_rect = dest_rect.to_type<int>();
     auto destination_rect = dest_rect.to_type<int>();
     auto position = context.rounded_device_point(m_resolved->position).to_type<int>();
     auto position = context.rounded_device_point(m_resolved->position).to_type<int>();
-    context.recording_painter().fill_rect_with_conic_gradient(destination_rect, m_resolved->data, position, clip_paths);
+    context.display_list_recorder().fill_rect_with_conic_gradient(destination_rect, m_resolved->data, position, clip_paths);
 }
 }
 
 
 bool ConicGradientStyleValue::equals(StyleValue const& other) const
 bool ConicGradientStyleValue::equals(StyleValue const& other) const

+ 2 - 2
Userland/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp

@@ -14,8 +14,8 @@
 #include <LibWeb/HTML/DecodedImageData.h>
 #include <LibWeb/HTML/DecodedImageData.h>
 #include <LibWeb/HTML/ImageRequest.h>
 #include <LibWeb/HTML/ImageRequest.h>
 #include <LibWeb/HTML/PotentialCORSRequest.h>
 #include <LibWeb/HTML/PotentialCORSRequest.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 #include <LibWeb/Painting/PaintContext.h>
 #include <LibWeb/Painting/PaintContext.h>
-#include <LibWeb/Painting/RecordingPainter.h>
 #include <LibWeb/Platform/Timer.h>
 #include <LibWeb/Platform/Timer.h>
 
 
 namespace Web::CSS {
 namespace Web::CSS {
@@ -137,7 +137,7 @@ void ImageStyleValue::paint(PaintContext& context, DevicePixelRect const& dest_r
 {
 {
     if (auto const* b = bitmap(m_current_frame_index, dest_rect.size().to_type<int>()); b != nullptr) {
     if (auto const* b = bitmap(m_current_frame_index, dest_rect.size().to_type<int>()); b != nullptr) {
         auto scaling_mode = to_gfx_scaling_mode(image_rendering, b->rect(), dest_rect.to_type<int>());
         auto scaling_mode = to_gfx_scaling_mode(image_rendering, b->rect(), dest_rect.to_type<int>());
-        context.recording_painter().draw_scaled_immutable_bitmap(dest_rect.to_type<int>(), *b, b->rect(), scaling_mode, clip_paths);
+        context.display_list_recorder().draw_scaled_immutable_bitmap(dest_rect.to_type<int>(), *b, b->rect(), scaling_mode, clip_paths);
     }
     }
 }
 }
 
 

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleValues/LinearGradientStyleValue.cpp

@@ -112,7 +112,7 @@ void LinearGradientStyleValue::resolve_for_size(Layout::NodeWithStyleAndBoxModel
 void LinearGradientStyleValue::paint(PaintContext& context, DevicePixelRect const& dest_rect, CSS::ImageRendering, Vector<Gfx::Path> const& clip_paths) const
 void LinearGradientStyleValue::paint(PaintContext& context, DevicePixelRect const& dest_rect, CSS::ImageRendering, Vector<Gfx::Path> const& clip_paths) const
 {
 {
     VERIFY(m_resolved.has_value());
     VERIFY(m_resolved.has_value());
-    context.recording_painter().fill_rect_with_linear_gradient(dest_rect.to_type<int>(), m_resolved->data, clip_paths);
+    context.display_list_recorder().fill_rect_with_linear_gradient(dest_rect.to_type<int>(), m_resolved->data, clip_paths);
 }
 }
 
 
 }
 }

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleValues/RadialGradientStyleValue.cpp

@@ -212,7 +212,7 @@ void RadialGradientStyleValue::paint(PaintContext& context, DevicePixelRect cons
     VERIFY(m_resolved.has_value());
     VERIFY(m_resolved.has_value());
     auto center = context.rounded_device_point(m_resolved->center).to_type<int>();
     auto center = context.rounded_device_point(m_resolved->center).to_type<int>();
     auto size = context.rounded_device_size(m_resolved->gradient_size).to_type<int>();
     auto size = context.rounded_device_size(m_resolved->gradient_size).to_type<int>();
-    context.recording_painter().fill_rect_with_radial_gradient(dest_rect.to_type<int>(), m_resolved->data, center, size, clip_paths);
+    context.display_list_recorder().fill_rect_with_radial_gradient(dest_rect.to_type<int>(), m_resolved->data, center, size, clip_paths);
 }
 }
 
 
 }
 }

+ 1 - 1
Userland/Libraries/LibWeb/Forward.h

@@ -24,7 +24,7 @@ class XMLDocumentBuilder;
 }
 }
 
 
 namespace Web::Painting {
 namespace Web::Painting {
-class RecordingPainter;
+class DisplayListRecorder;
 class SVGGradientPaintStyle;
 class SVGGradientPaintStyle;
 using PaintStyle = RefPtr<SVGGradientPaintStyle>;
 using PaintStyle = RefPtr<SVGGradientPaintStyle>;
 }
 }

+ 5 - 5
Userland/Libraries/LibWeb/HTML/Navigable.cpp

@@ -2092,7 +2092,7 @@ void Navigable::inform_the_navigation_api_about_aborting_navigation()
     }));
     }));
 }
 }
 
 
-void Navigable::record_display_list(Painting::RecordingPainter& recording_painter, PaintConfig config)
+void Navigable::record_display_list(Painting::DisplayListRecorder& display_list_recorder, PaintConfig config)
 {
 {
     auto document = active_document();
     auto document = active_document();
     if (!document)
     if (!document)
@@ -2104,12 +2104,12 @@ void Navigable::record_display_list(Painting::RecordingPainter& recording_painte
 
 
     auto background_color = document->background_color();
     auto background_color = document->background_color();
 
 
-    recording_painter.fill_rect(bitmap_rect, background_color);
+    display_list_recorder.fill_rect(bitmap_rect, background_color);
     if (!document->paintable()) {
     if (!document->paintable()) {
         VERIFY_NOT_REACHED();
         VERIFY_NOT_REACHED();
     }
     }
 
 
-    Web::PaintContext context(recording_painter, page.palette(), page.client().device_pixels_per_css_pixel());
+    Web::PaintContext context(display_list_recorder, page.palette(), page.client().device_pixels_per_css_pixel());
     context.set_device_viewport_rect(viewport_rect);
     context.set_device_viewport_rect(viewport_rect);
     context.set_should_show_line_box_borders(config.should_show_line_box_borders);
     context.set_should_show_line_box_borders(config.should_show_line_box_borders);
     context.set_should_paint_overlay(config.paint_overlay);
     context.set_should_paint_overlay(config.paint_overlay);
@@ -2136,8 +2136,8 @@ void Navigable::record_display_list(Painting::RecordingPainter& recording_painte
             auto scroll_offset = context.rounded_device_point(scrollable_frame->offset).to_type<int>();
             auto scroll_offset = context.rounded_device_point(scrollable_frame->offset).to_type<int>();
             scroll_offsets_by_frame_id[scrollable_frame->id] = scroll_offset;
             scroll_offsets_by_frame_id[scrollable_frame->id] = scroll_offset;
         }
         }
-        recording_painter.display_list().apply_scroll_offsets(scroll_offsets_by_frame_id);
-        recording_painter.display_list().mark_unnecessary_commands();
+        display_list_recorder.display_list().apply_scroll_offsets(scroll_offsets_by_frame_id);
+        display_list_recorder.display_list().mark_unnecessary_commands();
     }
     }
 
 
     m_needs_repaint = false;
     m_needs_repaint = false;

+ 1 - 1
Userland/Libraries/LibWeb/HTML/Navigable.h

@@ -183,7 +183,7 @@ public:
         bool should_show_line_box_borders { false };
         bool should_show_line_box_borders { false };
         bool has_focus { false };
         bool has_focus { false };
     };
     };
-    void record_display_list(Painting::RecordingPainter& recording_painter, PaintConfig);
+    void record_display_list(Painting::DisplayListRecorder& display_list_recorder, PaintConfig);
 
 
     Page& page() { return m_page; }
     Page& page() { return m_page; }
     Page const& page() const { return m_page; }
     Page const& page() const { return m_page; }

+ 3 - 3
Userland/Libraries/LibWeb/HTML/TraversableNavigable.cpp

@@ -1177,16 +1177,16 @@ JS::GCPtr<DOM::Node> TraversableNavigable::currently_focused_area()
 void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& target, Web::PaintOptions paint_options)
 void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& target, Web::PaintOptions paint_options)
 {
 {
     Painting::DisplayList display_list;
     Painting::DisplayList display_list;
-    Painting::RecordingPainter recording_painter(display_list);
+    Painting::DisplayListRecorder display_list_recorder(display_list);
 
 
     Gfx::IntRect bitmap_rect { {}, content_rect.size().to_type<int>() };
     Gfx::IntRect bitmap_rect { {}, content_rect.size().to_type<int>() };
-    recording_painter.fill_rect(bitmap_rect, Web::CSS::SystemColor::canvas());
+    display_list_recorder.fill_rect(bitmap_rect, Web::CSS::SystemColor::canvas());
 
 
     Web::HTML::Navigable::PaintConfig paint_config;
     Web::HTML::Navigable::PaintConfig paint_config;
     paint_config.paint_overlay = paint_options.paint_overlay == Web::PaintOptions::PaintOverlay::Yes;
     paint_config.paint_overlay = paint_options.paint_overlay == Web::PaintOptions::PaintOverlay::Yes;
     paint_config.should_show_line_box_borders = paint_options.should_show_line_box_borders;
     paint_config.should_show_line_box_borders = paint_options.should_show_line_box_borders;
     paint_config.has_focus = paint_options.has_focus;
     paint_config.has_focus = paint_options.has_focus;
-    record_display_list(recording_painter, paint_config);
+    record_display_list(display_list_recorder, paint_config);
 
 
     auto painting_command_executor_type = page().client().painting_command_executor_type();
     auto painting_command_executor_type = page().client().painting_command_executor_type();
     if (painting_command_executor_type == PaintingCommandExecutorType::GPU) {
     if (painting_command_executor_type == PaintingCommandExecutorType::GPU) {

+ 2 - 2
Userland/Libraries/LibWeb/Painting/AudioPaintable.cpp

@@ -49,10 +49,10 @@ void AudioPaintable::paint(PaintContext& context, PaintPhase phase) const
     if (phase != PaintPhase::Foreground)
     if (phase != PaintPhase::Foreground)
         return;
         return;
 
 
-    RecordingPainterStateSaver saver { context.recording_painter() };
+    DisplayListRecorderStateSaver saver { context.display_list_recorder() };
 
 
     auto audio_rect = context.rounded_device_rect(absolute_rect());
     auto audio_rect = context.rounded_device_rect(absolute_rect());
-    context.recording_painter().add_clip_rect(audio_rect.to_type<int>());
+    context.display_list_recorder().add_clip_rect(audio_rect.to_type<int>());
 
 
     ScopedCornerRadiusClip corner_clip { context, audio_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
     ScopedCornerRadiusClip corner_clip { context, audio_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
 
 

+ 5 - 5
Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp

@@ -126,7 +126,7 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet
         clip_paths = compute_text_clip_paths(context, *layout_node.paintable());
         clip_paths = compute_text_clip_paths(context, *layout_node.paintable());
     }
     }
 
 
-    auto& painter = context.recording_painter();
+    auto& display_list_recorder = context.display_list_recorder();
 
 
     struct BackgroundBox {
     struct BackgroundBox {
         CSSPixelRect rect;
         CSSPixelRect rect;
@@ -181,7 +181,7 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet
         }
         }
     }
     }
 
 
-    painter.fill_rect_with_rounded_corners(
+    display_list_recorder.fill_rect_with_rounded_corners(
         context.rounded_device_rect(color_box.rect).to_type<int>(),
         context.rounded_device_rect(color_box.rect).to_type<int>(),
         background_color,
         background_color,
         color_box.radii.top_left.as_corner(context),
         color_box.radii.top_left.as_corner(context),
@@ -217,14 +217,14 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet
     for (auto& layer : background_layers->in_reverse()) {
     for (auto& layer : background_layers->in_reverse()) {
         if (!layer_is_paintable(layer))
         if (!layer_is_paintable(layer))
             continue;
             continue;
-        RecordingPainterStateSaver state { painter };
+        DisplayListRecorderStateSaver state { display_list_recorder };
 
 
         // Clip
         // Clip
         auto clip_box = get_box(layer.clip);
         auto clip_box = get_box(layer.clip);
 
 
         CSSPixelRect const& css_clip_rect = clip_box.rect;
         CSSPixelRect const& css_clip_rect = clip_box.rect;
         auto clip_rect = context.rounded_device_rect(css_clip_rect);
         auto clip_rect = context.rounded_device_rect(css_clip_rect);
-        painter.add_clip_rect(clip_rect.to_type<int>());
+        display_list_recorder.add_clip_rect(clip_rect.to_type<int>());
         ScopedCornerRadiusClip corner_clip { context, clip_rect, clip_box.radii };
         ScopedCornerRadiusClip corner_clip { context, clip_rect, clip_box.radii };
 
 
         if (layer.clip == CSS::BackgroundBox::BorderBox) {
         if (layer.clip == CSS::BackgroundBox::BorderBox) {
@@ -452,7 +452,7 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet
                     fill_rect = fill_rect->united(image_device_rect);
                     fill_rect = fill_rect->united(image_device_rect);
                 }
                 }
             });
             });
-            painter.fill_rect(fill_rect->to_type<int>(), color.value(), clip_paths);
+            display_list_recorder.fill_rect(fill_rect->to_type<int>(), color.value(), clip_paths);
         } else {
         } else {
             for_each_image_device_rect([&](auto const& image_device_rect) {
             for_each_image_device_rect([&](auto const& image_device_rect) {
                 image.paint(context, image_device_rect, image_rendering, clip_paths);
                 image.paint(context, image_device_rect, image_rendering, clip_paths);

+ 2 - 2
Userland/Libraries/LibWeb/Painting/BorderPainting.cpp

@@ -61,7 +61,7 @@ Gfx::Color border_color(BorderEdge edge, BordersDataDevicePixels const& borders_
     return border_data.color;
     return border_data.color;
 }
 }
 
 
-void paint_border(RecordingPainter& painter, BorderEdge edge, DevicePixelRect const& rect, Gfx::AntiAliasingPainter::CornerRadius const& radius, Gfx::AntiAliasingPainter::CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path& path, bool last)
+void paint_border(DisplayListRecorder& painter, BorderEdge edge, DevicePixelRect const& rect, Gfx::AntiAliasingPainter::CornerRadius const& radius, Gfx::AntiAliasingPainter::CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path& path, bool last)
 {
 {
     auto const& border_data = [&] {
     auto const& border_data = [&] {
         switch (edge) {
         switch (edge) {
@@ -491,7 +491,7 @@ void paint_border(RecordingPainter& painter, BorderEdge edge, DevicePixelRect co
     }
     }
 }
 }
 
 
-void paint_all_borders(RecordingPainter& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const& borders_data)
+void paint_all_borders(DisplayListRecorder& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const& borders_data)
 {
 {
     if (borders_data.top.width <= 0 && borders_data.right.width <= 0 && borders_data.left.width <= 0 && borders_data.bottom.width <= 0)
     if (borders_data.top.width <= 0 && borders_data.right.width <= 0 && borders_data.left.width <= 0 && borders_data.bottom.width <= 0)
         return;
         return;

+ 2 - 2
Userland/Libraries/LibWeb/Painting/BorderPainting.h

@@ -26,8 +26,8 @@ enum class BorderEdge {
 // Returns OptionalNone if there is no outline to paint.
 // Returns OptionalNone if there is no outline to paint.
 Optional<BordersData> borders_data_for_outline(Layout::Node const&, Color outline_color, CSS::OutlineStyle outline_style, CSSPixels outline_width);
 Optional<BordersData> borders_data_for_outline(Layout::Node const&, Color outline_color, CSS::OutlineStyle outline_style, CSSPixels outline_width);
 
 
-void paint_border(RecordingPainter& painter, BorderEdge edge, DevicePixelRect const& rect, Gfx::AntiAliasingPainter::CornerRadius const& radius, Gfx::AntiAliasingPainter::CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path& path, bool last);
-void paint_all_borders(RecordingPainter& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const&);
+void paint_border(DisplayListRecorder& painter, BorderEdge edge, DevicePixelRect const& rect, Gfx::AntiAliasingPainter::CornerRadius const& radius, Gfx::AntiAliasingPainter::CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path& path, bool last);
+void paint_all_borders(DisplayListRecorder& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const&);
 
 
 Gfx::Color border_color(BorderEdge edge, BordersDataDevicePixels const& borders_data);
 Gfx::Color border_color(BorderEdge edge, BordersDataDevicePixels const& borders_data);
 
 

+ 2 - 2
Userland/Libraries/LibWeb/Painting/BorderRadiusCornerClipper.cpp

@@ -128,14 +128,14 @@ ScopedCornerRadiusClip::ScopedCornerRadiusClip(PaintContext& context, DevicePixe
     m_has_radius = corner_radii.has_any_radius();
     m_has_radius = corner_radii.has_any_radius();
     if (!m_has_radius)
     if (!m_has_radius)
         return;
         return;
-    m_context.recording_painter().sample_under_corners(m_id, corner_radii, border_rect.to_type<int>(), corner_clip);
+    m_context.display_list_recorder().sample_under_corners(m_id, corner_radii, border_rect.to_type<int>(), corner_clip);
 }
 }
 
 
 ScopedCornerRadiusClip::~ScopedCornerRadiusClip()
 ScopedCornerRadiusClip::~ScopedCornerRadiusClip()
 {
 {
     if (!m_has_radius)
     if (!m_has_radius)
         return;
         return;
-    m_context.recording_painter().blit_corner_clipping(m_id);
+    m_context.display_list_recorder().blit_corner_clipping(m_id);
 }
 }
 
 
 }
 }

+ 1 - 1
Userland/Libraries/LibWeb/Painting/CanvasPaintable.cpp

@@ -40,7 +40,7 @@ void CanvasPaintable::paint(PaintContext& context, PaintPhase phase) const
             // FIXME: Remove this const_cast.
             // FIXME: Remove this const_cast.
             const_cast<HTML::HTMLCanvasElement&>(layout_box().dom_node()).present();
             const_cast<HTML::HTMLCanvasElement&>(layout_box().dom_node()).present();
             auto scaling_mode = to_gfx_scaling_mode(computed_values().image_rendering(), layout_box().dom_node().bitmap()->rect(), canvas_rect.to_type<int>());
             auto scaling_mode = to_gfx_scaling_mode(computed_values().image_rendering(), layout_box().dom_node().bitmap()->rect(), canvas_rect.to_type<int>());
-            context.recording_painter().draw_scaled_bitmap(canvas_rect.to_type<int>(), *layout_box().dom_node().bitmap(), layout_box().dom_node().bitmap()->rect(), scaling_mode);
+            context.display_list_recorder().draw_scaled_bitmap(canvas_rect.to_type<int>(), *layout_box().dom_node().bitmap(), layout_box().dom_node().bitmap()->rect(), scaling_mode);
         }
         }
     }
     }
 }
 }

+ 5 - 5
Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp

@@ -99,11 +99,11 @@ void CheckBoxPaintable::paint(PaintContext& context, PaintPhase phase) const
     // Little heuristic that smaller things look better with more smoothness.
     // Little heuristic that smaller things look better with more smoothness.
     if (checkbox.checked() && !checkbox.indeterminate()) {
     if (checkbox.checked() && !checkbox.indeterminate()) {
         auto background_color = enabled ? input_colors.accent : input_colors.mid_gray;
         auto background_color = enabled ? input_colors.accent : input_colors.mid_gray;
-        context.recording_painter().fill_rect_with_rounded_corners(checkbox_rect, modify_color(background_color), checkbox_radius);
+        context.display_list_recorder().fill_rect_with_rounded_corners(checkbox_rect, modify_color(background_color), checkbox_radius);
         auto tick_color = increase_contrast(input_colors.base, background_color);
         auto tick_color = increase_contrast(input_colors.base, background_color);
         if (!enabled)
         if (!enabled)
             tick_color = shade(tick_color, 0.5f);
             tick_color = shade(tick_color, 0.5f);
-        context.recording_painter().fill_path({
+        context.display_list_recorder().fill_path({
             .path = check_mark_path(checkbox_rect),
             .path = check_mark_path(checkbox_rect),
             .color = tick_color,
             .color = tick_color,
             .translation = checkbox_rect.location().to_type<float>(),
             .translation = checkbox_rect.location().to_type<float>(),
@@ -111,14 +111,14 @@ void CheckBoxPaintable::paint(PaintContext& context, PaintPhase phase) const
     } else {
     } else {
         auto background_color = input_colors.background_color(enabled);
         auto background_color = input_colors.background_color(enabled);
         auto border_thickness = max(1, checkbox_rect.width() / 10);
         auto border_thickness = max(1, checkbox_rect.width() / 10);
-        context.recording_painter().fill_rect_with_rounded_corners(checkbox_rect, modify_color(input_colors.border_color(enabled)), checkbox_radius);
-        context.recording_painter().fill_rect_with_rounded_corners(checkbox_rect.shrunken(border_thickness, border_thickness, border_thickness, border_thickness),
+        context.display_list_recorder().fill_rect_with_rounded_corners(checkbox_rect, modify_color(input_colors.border_color(enabled)), checkbox_radius);
+        context.display_list_recorder().fill_rect_with_rounded_corners(checkbox_rect.shrunken(border_thickness, border_thickness, border_thickness, border_thickness),
             background_color, max(0, checkbox_radius - border_thickness));
             background_color, max(0, checkbox_radius - border_thickness));
         if (checkbox.indeterminate()) {
         if (checkbox.indeterminate()) {
             int radius = 0.05 * checkbox_rect.width();
             int radius = 0.05 * checkbox_rect.width();
             auto dash_color = increase_contrast(input_colors.dark_gray, background_color);
             auto dash_color = increase_contrast(input_colors.dark_gray, background_color);
             auto dash_rect = checkbox_rect.inflated(-0.4 * checkbox_rect.width(), -0.8 * checkbox_rect.height());
             auto dash_rect = checkbox_rect.inflated(-0.4 * checkbox_rect.width(), -0.8 * checkbox_rect.height());
-            context.recording_painter().fill_rect_with_rounded_corners(dash_rect, dash_color, radius, radius, radius, radius);
+            context.display_list_recorder().fill_rect_with_rounded_corners(dash_rect, dash_color, radius, radius, radius, radius);
         }
         }
     }
     }
 }
 }

+ 1 - 1
Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.cpp

@@ -9,8 +9,8 @@
 #include <LibWeb/CSS/ComputedValues.h>
 #include <LibWeb/CSS/ComputedValues.h>
 #include <LibWeb/Painting/BorderRadiusCornerClipper.h>
 #include <LibWeb/Painting/BorderRadiusCornerClipper.h>
 #include <LibWeb/Painting/CommandExecutorCPU.h>
 #include <LibWeb/Painting/CommandExecutorCPU.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 #include <LibWeb/Painting/FilterPainting.h>
 #include <LibWeb/Painting/FilterPainting.h>
-#include <LibWeb/Painting/RecordingPainter.h>
 #include <LibWeb/Painting/ShadowPainting.h>
 #include <LibWeb/Painting/ShadowPainting.h>
 
 
 namespace Web::Painting {
 namespace Web::Painting {

+ 1 - 1
Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.h

@@ -8,7 +8,7 @@
 
 
 #include <AK/MaybeOwned.h>
 #include <AK/MaybeOwned.h>
 #include <LibGfx/ScalingMode.h>
 #include <LibGfx/ScalingMode.h>
-#include <LibWeb/Painting/RecordingPainter.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 
 
 namespace Web::Painting {
 namespace Web::Painting {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Painting/CommandExecutorGPU.h

@@ -8,7 +8,7 @@
 
 
 #include <AK/MaybeOwned.h>
 #include <AK/MaybeOwned.h>
 #include <LibAccelGfx/Painter.h>
 #include <LibAccelGfx/Painter.h>
-#include <LibWeb/Painting/RecordingPainter.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 
 
 namespace Web::Painting {
 namespace Web::Painting {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.h

@@ -7,7 +7,7 @@
 #pragma once
 #pragma once
 
 
 #include <LibGfx/Bitmap.h>
 #include <LibGfx/Bitmap.h>
-#include <LibWeb/Painting/RecordingPainter.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 
 
 namespace Web::Painting {
 namespace Web::Painting {
 
 

+ 37 - 37
Userland/Libraries/LibWeb/Painting/RecordingPainter.cpp → Userland/Libraries/LibWeb/Painting/DisplayListRecorder.cpp

@@ -4,28 +4,28 @@
  * SPDX-License-Identifier: BSD-2-Clause
  * SPDX-License-Identifier: BSD-2-Clause
  */
  */
 
 
-#include <LibWeb/Painting/RecordingPainter.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 #include <LibWeb/Painting/ShadowPainting.h>
 #include <LibWeb/Painting/ShadowPainting.h>
 
 
 namespace Web::Painting {
 namespace Web::Painting {
 
 
-RecordingPainter::RecordingPainter(DisplayList& command_list)
+DisplayListRecorder::DisplayListRecorder(DisplayList& command_list)
     : m_command_list(command_list)
     : m_command_list(command_list)
 {
 {
     m_state_stack.append(State());
     m_state_stack.append(State());
 }
 }
 
 
-RecordingPainter::~RecordingPainter()
+DisplayListRecorder::~DisplayListRecorder()
 {
 {
     VERIFY(m_corner_clip_state_stack.is_empty());
     VERIFY(m_corner_clip_state_stack.is_empty());
 }
 }
 
 
-void RecordingPainter::append(Command&& command)
+void DisplayListRecorder::append(Command&& command)
 {
 {
     m_command_list.append(move(command), state().scroll_frame_id);
     m_command_list.append(move(command), state().scroll_frame_id);
 }
 }
 
 
-void RecordingPainter::sample_under_corners(u32 id, CornerRadii corner_radii, Gfx::IntRect border_rect, CornerClip corner_clip)
+void DisplayListRecorder::sample_under_corners(u32 id, CornerRadii corner_radii, Gfx::IntRect border_rect, CornerClip corner_clip)
 {
 {
     m_corner_clip_state_stack.append({ id, border_rect });
     m_corner_clip_state_stack.append({ id, border_rect });
     if (m_corner_clip_state_stack.size() > display_list().corner_clip_max_depth())
     if (m_corner_clip_state_stack.size() > display_list().corner_clip_max_depth())
@@ -37,14 +37,14 @@ void RecordingPainter::sample_under_corners(u32 id, CornerRadii corner_radii, Gf
         corner_clip });
         corner_clip });
 }
 }
 
 
-void RecordingPainter::blit_corner_clipping(u32 id)
+void DisplayListRecorder::blit_corner_clipping(u32 id)
 {
 {
     auto clip_state = m_corner_clip_state_stack.take_last();
     auto clip_state = m_corner_clip_state_stack.take_last();
     VERIFY(clip_state.id == id);
     VERIFY(clip_state.id == id);
     append(BlitCornerClipping { id, state().translation.map(clip_state.rect) });
     append(BlitCornerClipping { id, state().translation.map(clip_state.rect) });
 }
 }
 
 
-void RecordingPainter::fill_rect(Gfx::IntRect const& rect, Color color, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect(Gfx::IntRect const& rect, Color color, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -55,7 +55,7 @@ void RecordingPainter::fill_rect(Gfx::IntRect const& rect, Color color, Vector<G
     });
     });
 }
 }
 
 
-void RecordingPainter::fill_path(FillPathUsingColorParams params)
+void DisplayListRecorder::fill_path(FillPathUsingColorParams params)
 {
 {
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
@@ -70,7 +70,7 @@ void RecordingPainter::fill_path(FillPathUsingColorParams params)
     });
     });
 }
 }
 
 
-void RecordingPainter::fill_path(FillPathUsingPaintStyleParams params)
+void DisplayListRecorder::fill_path(FillPathUsingPaintStyleParams params)
 {
 {
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
@@ -86,7 +86,7 @@ void RecordingPainter::fill_path(FillPathUsingPaintStyleParams params)
     });
     });
 }
 }
 
 
-void RecordingPainter::stroke_path(StrokePathUsingColorParams params)
+void DisplayListRecorder::stroke_path(StrokePathUsingColorParams params)
 {
 {
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
@@ -103,7 +103,7 @@ void RecordingPainter::stroke_path(StrokePathUsingColorParams params)
     });
     });
 }
 }
 
 
-void RecordingPainter::stroke_path(StrokePathUsingPaintStyleParams params)
+void DisplayListRecorder::stroke_path(StrokePathUsingPaintStyleParams params)
 {
 {
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto aa_translation = state().translation.map(params.translation.value_or(Gfx::FloatPoint {}));
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
     auto path_bounding_rect = params.path.bounding_box().translated(aa_translation).to_type<int>();
@@ -121,7 +121,7 @@ void RecordingPainter::stroke_path(StrokePathUsingPaintStyleParams params)
     });
     });
 }
 }
 
 
-void RecordingPainter::draw_ellipse(Gfx::IntRect const& a_rect, Color color, int thickness)
+void DisplayListRecorder::draw_ellipse(Gfx::IntRect const& a_rect, Color color, int thickness)
 {
 {
     if (a_rect.is_empty())
     if (a_rect.is_empty())
         return;
         return;
@@ -132,7 +132,7 @@ void RecordingPainter::draw_ellipse(Gfx::IntRect const& a_rect, Color color, int
     });
     });
 }
 }
 
 
-void RecordingPainter::fill_ellipse(Gfx::IntRect const& a_rect, Color color)
+void DisplayListRecorder::fill_ellipse(Gfx::IntRect const& a_rect, Color color)
 {
 {
     if (a_rect.is_empty())
     if (a_rect.is_empty())
         return;
         return;
@@ -142,7 +142,7 @@ void RecordingPainter::fill_ellipse(Gfx::IntRect const& a_rect, Color color)
     });
     });
 }
 }
 
 
-void RecordingPainter::fill_rect_with_linear_gradient(Gfx::IntRect const& gradient_rect, LinearGradientData const& data, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect_with_linear_gradient(Gfx::IntRect const& gradient_rect, LinearGradientData const& data, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (gradient_rect.is_empty())
     if (gradient_rect.is_empty())
         return;
         return;
@@ -152,7 +152,7 @@ void RecordingPainter::fill_rect_with_linear_gradient(Gfx::IntRect const& gradie
         .clip_paths = clip_paths });
         .clip_paths = clip_paths });
 }
 }
 
 
-void RecordingPainter::fill_rect_with_conic_gradient(Gfx::IntRect const& rect, ConicGradientData const& data, Gfx::IntPoint const& position, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect_with_conic_gradient(Gfx::IntRect const& rect, ConicGradientData const& data, Gfx::IntPoint const& position, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -163,7 +163,7 @@ void RecordingPainter::fill_rect_with_conic_gradient(Gfx::IntRect const& rect, C
         .clip_paths = clip_paths });
         .clip_paths = clip_paths });
 }
 }
 
 
-void RecordingPainter::fill_rect_with_radial_gradient(Gfx::IntRect const& rect, RadialGradientData const& data, Gfx::IntPoint center, Gfx::IntSize size, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect_with_radial_gradient(Gfx::IntRect const& rect, RadialGradientData const& data, Gfx::IntPoint center, Gfx::IntSize size, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -175,7 +175,7 @@ void RecordingPainter::fill_rect_with_radial_gradient(Gfx::IntRect const& rect,
         .clip_paths = clip_paths });
         .clip_paths = clip_paths });
 }
 }
 
 
-void RecordingPainter::draw_rect(Gfx::IntRect const& rect, Color color, bool rough)
+void DisplayListRecorder::draw_rect(Gfx::IntRect const& rect, Color color, bool rough)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -185,7 +185,7 @@ void RecordingPainter::draw_rect(Gfx::IntRect const& rect, Color color, bool rou
         .rough = rough });
         .rough = rough });
 }
 }
 
 
-void RecordingPainter::draw_scaled_bitmap(Gfx::IntRect const& dst_rect, Gfx::Bitmap const& bitmap, Gfx::IntRect const& src_rect, Gfx::ScalingMode scaling_mode)
+void DisplayListRecorder::draw_scaled_bitmap(Gfx::IntRect const& dst_rect, Gfx::Bitmap const& bitmap, Gfx::IntRect const& src_rect, Gfx::ScalingMode scaling_mode)
 {
 {
     if (dst_rect.is_empty())
     if (dst_rect.is_empty())
         return;
         return;
@@ -197,7 +197,7 @@ void RecordingPainter::draw_scaled_bitmap(Gfx::IntRect const& dst_rect, Gfx::Bit
     });
     });
 }
 }
 
 
-void RecordingPainter::draw_scaled_immutable_bitmap(Gfx::IntRect const& dst_rect, Gfx::ImmutableBitmap const& bitmap, Gfx::IntRect const& src_rect, Gfx::ScalingMode scaling_mode, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::draw_scaled_immutable_bitmap(Gfx::IntRect const& dst_rect, Gfx::ImmutableBitmap const& bitmap, Gfx::IntRect const& src_rect, Gfx::ScalingMode scaling_mode, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (dst_rect.is_empty())
     if (dst_rect.is_empty())
         return;
         return;
@@ -210,7 +210,7 @@ void RecordingPainter::draw_scaled_immutable_bitmap(Gfx::IntRect const& dst_rect
     });
     });
 }
 }
 
 
-void RecordingPainter::draw_line(Gfx::IntPoint from, Gfx::IntPoint to, Color color, int thickness, Gfx::LineStyle style, Color alternate_color)
+void DisplayListRecorder::draw_line(Gfx::IntPoint from, Gfx::IntPoint to, Color color, int thickness, Gfx::LineStyle style, Color alternate_color)
 {
 {
     append(DrawLine {
     append(DrawLine {
         .color = color,
         .color = color,
@@ -222,7 +222,7 @@ void RecordingPainter::draw_line(Gfx::IntPoint from, Gfx::IntPoint to, Color col
     });
     });
 }
 }
 
 
-void RecordingPainter::draw_text(Gfx::IntRect const& rect, String raw_text, Gfx::Font const& font, Gfx::TextAlignment alignment, Color color)
+void DisplayListRecorder::draw_text(Gfx::IntRect const& rect, String raw_text, Gfx::Font const& font, Gfx::TextAlignment alignment, Color color)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -254,7 +254,7 @@ void RecordingPainter::draw_text(Gfx::IntRect const& rect, String raw_text, Gfx:
     draw_text_run(Gfx::IntPoint(roundf(baseline_x), roundf(baseline_y)), *glyph_run, color, rect, 1.0);
     draw_text_run(Gfx::IntPoint(roundf(baseline_x), roundf(baseline_y)), *glyph_run, color, rect, 1.0);
 }
 }
 
 
-void RecordingPainter::draw_text_run(Gfx::IntPoint baseline_start, Gfx::GlyphRun const& glyph_run, Color color, Gfx::IntRect const& rect, double scale)
+void DisplayListRecorder::draw_text_run(Gfx::IntPoint baseline_start, Gfx::GlyphRun const& glyph_run, Color color, Gfx::IntRect const& rect, double scale)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -268,28 +268,28 @@ void RecordingPainter::draw_text_run(Gfx::IntPoint baseline_start, Gfx::GlyphRun
     });
     });
 }
 }
 
 
-void RecordingPainter::add_clip_rect(Gfx::IntRect const& rect)
+void DisplayListRecorder::add_clip_rect(Gfx::IntRect const& rect)
 {
 {
     append(AddClipRect { .rect = state().translation.map(rect) });
     append(AddClipRect { .rect = state().translation.map(rect) });
 }
 }
 
 
-void RecordingPainter::translate(int dx, int dy)
+void DisplayListRecorder::translate(int dx, int dy)
 {
 {
     m_state_stack.last().translation.translate(dx, dy);
     m_state_stack.last().translation.translate(dx, dy);
 }
 }
 
 
-void RecordingPainter::translate(Gfx::IntPoint delta)
+void DisplayListRecorder::translate(Gfx::IntPoint delta)
 {
 {
     m_state_stack.last().translation.translate(delta.to_type<float>());
     m_state_stack.last().translation.translate(delta.to_type<float>());
 }
 }
 
 
-void RecordingPainter::save()
+void DisplayListRecorder::save()
 {
 {
     append(Save {});
     append(Save {});
     m_state_stack.append(m_state_stack.last());
     m_state_stack.append(m_state_stack.last());
 }
 }
 
 
-void RecordingPainter::restore()
+void DisplayListRecorder::restore()
 {
 {
     append(Restore {});
     append(Restore {});
 
 
@@ -297,7 +297,7 @@ void RecordingPainter::restore()
     m_state_stack.take_last();
     m_state_stack.take_last();
 }
 }
 
 
-void RecordingPainter::push_stacking_context(PushStackingContextParams params)
+void DisplayListRecorder::push_stacking_context(PushStackingContextParams params)
 {
 {
     append(PushStackingContext {
     append(PushStackingContext {
         .opacity = params.opacity,
         .opacity = params.opacity,
@@ -316,13 +316,13 @@ void RecordingPainter::push_stacking_context(PushStackingContextParams params)
     m_state_stack.append(State());
     m_state_stack.append(State());
 }
 }
 
 
-void RecordingPainter::pop_stacking_context()
+void DisplayListRecorder::pop_stacking_context()
 {
 {
     m_state_stack.take_last();
     m_state_stack.take_last();
     append(PopStackingContext {});
     append(PopStackingContext {});
 }
 }
 
 
-void RecordingPainter::apply_backdrop_filter(Gfx::IntRect const& backdrop_region, BorderRadiiData const& border_radii_data, CSS::ResolvedBackdropFilter const& backdrop_filter)
+void DisplayListRecorder::apply_backdrop_filter(Gfx::IntRect const& backdrop_region, BorderRadiiData const& border_radii_data, CSS::ResolvedBackdropFilter const& backdrop_filter)
 {
 {
     if (backdrop_region.is_empty())
     if (backdrop_region.is_empty())
         return;
         return;
@@ -333,18 +333,18 @@ void RecordingPainter::apply_backdrop_filter(Gfx::IntRect const& backdrop_region
     });
     });
 }
 }
 
 
-void RecordingPainter::paint_outer_box_shadow_params(PaintBoxShadowParams params)
+void DisplayListRecorder::paint_outer_box_shadow_params(PaintBoxShadowParams params)
 {
 {
     params.device_content_rect = state().translation.map(params.device_content_rect);
     params.device_content_rect = state().translation.map(params.device_content_rect);
     append(PaintOuterBoxShadow { .box_shadow_params = params });
     append(PaintOuterBoxShadow { .box_shadow_params = params });
 }
 }
 
 
-void RecordingPainter::paint_inner_box_shadow_params(PaintBoxShadowParams params)
+void DisplayListRecorder::paint_inner_box_shadow_params(PaintBoxShadowParams params)
 {
 {
     append(PaintInnerBoxShadow { .box_shadow_params = params });
     append(PaintInnerBoxShadow { .box_shadow_params = params });
 }
 }
 
 
-void RecordingPainter::paint_text_shadow(int blur_radius, Gfx::IntRect bounding_rect, Gfx::IntRect text_rect, Span<Gfx::DrawGlyphOrEmoji const> glyph_run, Color color, int fragment_baseline, Gfx::IntPoint draw_location)
+void DisplayListRecorder::paint_text_shadow(int blur_radius, Gfx::IntRect bounding_rect, Gfx::IntRect text_rect, Span<Gfx::DrawGlyphOrEmoji const> glyph_run, Color color, int fragment_baseline, Gfx::IntPoint draw_location)
 {
 {
     append(PaintTextShadow {
     append(PaintTextShadow {
         .blur_radius = blur_radius,
         .blur_radius = blur_radius,
@@ -356,7 +356,7 @@ void RecordingPainter::paint_text_shadow(int blur_radius, Gfx::IntRect bounding_
         .draw_location = state().translation.map(draw_location) });
         .draw_location = state().translation.map(draw_location) });
 }
 }
 
 
-void RecordingPainter::fill_rect_with_rounded_corners(Gfx::IntRect const& rect, Color color, Gfx::AntiAliasingPainter::CornerRadius top_left_radius, Gfx::AntiAliasingPainter::CornerRadius top_right_radius, Gfx::AntiAliasingPainter::CornerRadius bottom_right_radius, Gfx::AntiAliasingPainter::CornerRadius bottom_left_radius, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect_with_rounded_corners(Gfx::IntRect const& rect, Color color, Gfx::AntiAliasingPainter::CornerRadius top_left_radius, Gfx::AntiAliasingPainter::CornerRadius top_right_radius, Gfx::AntiAliasingPainter::CornerRadius bottom_right_radius, Gfx::AntiAliasingPainter::CornerRadius bottom_left_radius, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (rect.is_empty())
     if (rect.is_empty())
         return;
         return;
@@ -377,14 +377,14 @@ void RecordingPainter::fill_rect_with_rounded_corners(Gfx::IntRect const& rect,
     });
     });
 }
 }
 
 
-void RecordingPainter::fill_rect_with_rounded_corners(Gfx::IntRect const& a_rect, Color color, int radius, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect_with_rounded_corners(Gfx::IntRect const& a_rect, Color color, int radius, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (a_rect.is_empty())
     if (a_rect.is_empty())
         return;
         return;
     fill_rect_with_rounded_corners(a_rect, color, radius, radius, radius, radius, clip_paths);
     fill_rect_with_rounded_corners(a_rect, color, radius, radius, radius, radius, clip_paths);
 }
 }
 
 
-void RecordingPainter::fill_rect_with_rounded_corners(Gfx::IntRect const& a_rect, Color color, int top_left_radius, int top_right_radius, int bottom_right_radius, int bottom_left_radius, Vector<Gfx::Path> const& clip_paths)
+void DisplayListRecorder::fill_rect_with_rounded_corners(Gfx::IntRect const& a_rect, Color color, int top_left_radius, int top_right_radius, int bottom_right_radius, int bottom_left_radius, Vector<Gfx::Path> const& clip_paths)
 {
 {
     if (a_rect.is_empty())
     if (a_rect.is_empty())
         return;
         return;
@@ -396,7 +396,7 @@ void RecordingPainter::fill_rect_with_rounded_corners(Gfx::IntRect const& a_rect
         clip_paths);
         clip_paths);
 }
 }
 
 
-void RecordingPainter::draw_triangle_wave(Gfx::IntPoint a_p1, Gfx::IntPoint a_p2, Color color, int amplitude, int thickness = 1)
+void DisplayListRecorder::draw_triangle_wave(Gfx::IntPoint a_p1, Gfx::IntPoint a_p2, Color color, int amplitude, int thickness = 1)
 {
 {
     append(DrawTriangleWave {
     append(DrawTriangleWave {
         .p1 = state().translation.map(a_p1),
         .p1 = state().translation.map(a_p1),

+ 9 - 9
Userland/Libraries/LibWeb/Painting/RecordingPainter.h → Userland/Libraries/LibWeb/Painting/DisplayListRecorder.h

@@ -35,9 +35,9 @@
 
 
 namespace Web::Painting {
 namespace Web::Painting {
 
 
-class RecordingPainter {
-    AK_MAKE_NONCOPYABLE(RecordingPainter);
-    AK_MAKE_NONMOVABLE(RecordingPainter);
+class DisplayListRecorder {
+    AK_MAKE_NONCOPYABLE(DisplayListRecorder);
+    AK_MAKE_NONMOVABLE(DisplayListRecorder);
 
 
 public:
 public:
     void fill_rect(Gfx::IntRect const& rect, Color color, Vector<Gfx::Path> const& clip_paths = {});
     void fill_rect(Gfx::IntRect const& rect, Color color, Vector<Gfx::Path> const& clip_paths = {});
@@ -135,8 +135,8 @@ public:
 
 
     void draw_triangle_wave(Gfx::IntPoint a_p1, Gfx::IntPoint a_p2, Color color, int amplitude, int thickness);
     void draw_triangle_wave(Gfx::IntPoint a_p1, Gfx::IntPoint a_p2, Color color, int amplitude, int thickness);
 
 
-    RecordingPainter(DisplayList&);
-    ~RecordingPainter();
+    DisplayListRecorder(DisplayList&);
+    ~DisplayListRecorder();
 
 
     DisplayList& display_list() { return m_command_list; }
     DisplayList& display_list() { return m_command_list; }
 
 
@@ -161,21 +161,21 @@ private:
     DisplayList& m_command_list;
     DisplayList& m_command_list;
 };
 };
 
 
-class RecordingPainterStateSaver {
+class DisplayListRecorderStateSaver {
 public:
 public:
-    explicit RecordingPainterStateSaver(RecordingPainter& painter)
+    explicit DisplayListRecorderStateSaver(DisplayListRecorder& painter)
         : m_painter(painter)
         : m_painter(painter)
     {
     {
         m_painter.save();
         m_painter.save();
     }
     }
 
 
-    ~RecordingPainterStateSaver()
+    ~DisplayListRecorderStateSaver()
     {
     {
         m_painter.restore();
         m_painter.restore();
     }
     }
 
 
 private:
 private:
-    RecordingPainter& m_painter;
+    DisplayListRecorder& m_painter;
 };
 };
 
 
 }
 }

+ 1 - 1
Userland/Libraries/LibWeb/Painting/FilterPainting.cpp

@@ -103,7 +103,7 @@ void apply_backdrop_filter(PaintContext& context, CSSPixelRect const& backdrop_r
     auto backdrop_region = context.rounded_device_rect(backdrop_rect);
     auto backdrop_region = context.rounded_device_rect(backdrop_rect);
 
 
     ScopedCornerRadiusClip corner_clipper { context, backdrop_region, border_radii_data };
     ScopedCornerRadiusClip corner_clipper { context, backdrop_region, border_radii_data };
-    context.recording_painter().apply_backdrop_filter(backdrop_region.to_type<int>(), border_radii_data, backdrop_filter);
+    context.display_list_recorder().apply_backdrop_filter(backdrop_region.to_type<int>(), border_radii_data, backdrop_filter);
 }
 }
 
 
 }
 }

+ 3 - 3
Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp

@@ -65,8 +65,8 @@ void ImagePaintable::paint(PaintContext& context, PaintPhase phase) const
         auto image_rect = context.rounded_device_rect(absolute_rect());
         auto image_rect = context.rounded_device_rect(absolute_rect());
         if (m_renders_as_alt_text) {
         if (m_renders_as_alt_text) {
             auto enclosing_rect = context.enclosing_device_rect(absolute_rect()).to_type<int>();
             auto enclosing_rect = context.enclosing_device_rect(absolute_rect()).to_type<int>();
-            context.recording_painter().draw_rect(enclosing_rect, Gfx::Color::Black);
-            context.recording_painter().draw_text(enclosing_rect, m_alt_text, Platform::FontPlugin::the().default_font(), Gfx::TextAlignment::Center, computed_values().color());
+            context.display_list_recorder().draw_rect(enclosing_rect, Gfx::Color::Black);
+            context.display_list_recorder().draw_text(enclosing_rect, m_alt_text, Platform::FontPlugin::the().default_font(), Gfx::TextAlignment::Center, computed_values().color());
         } else if (auto bitmap = m_image_provider.current_image_bitmap(image_rect.size().to_type<int>())) {
         } else if (auto bitmap = m_image_provider.current_image_bitmap(image_rect.size().to_type<int>())) {
             ScopedCornerRadiusClip corner_clip { context, image_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
             ScopedCornerRadiusClip corner_clip { context, image_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
             auto image_int_rect = image_rect.to_type<int>();
             auto image_int_rect = image_rect.to_type<int>();
@@ -150,7 +150,7 @@ void ImagePaintable::paint(PaintContext& context, PaintPhase phase) const
                 (int)scaled_bitmap_height
                 (int)scaled_bitmap_height
             };
             };
 
 
-            context.recording_painter().draw_scaled_immutable_bitmap(draw_rect.intersected(image_int_rect), *bitmap, bitmap_rect.intersected(bitmap_intersect), scaling_mode);
+            context.display_list_recorder().draw_scaled_immutable_bitmap(draw_rect.intersected(image_int_rect), *bitmap, bitmap_rect.intersected(bitmap_intersect), scaling_mode);
         }
         }
     }
     }
 }
 }

+ 10 - 10
Userland/Libraries/LibWeb/Painting/InlinePaintable.cpp

@@ -33,26 +33,26 @@ Layout::InlineNode const& InlinePaintable::layout_node() const
 void InlinePaintable::before_paint(PaintContext& context, PaintPhase) const
 void InlinePaintable::before_paint(PaintContext& context, PaintPhase) const
 {
 {
     if (scroll_frame_id().has_value()) {
     if (scroll_frame_id().has_value()) {
-        context.recording_painter().save();
-        context.recording_painter().set_scroll_frame_id(scroll_frame_id().value());
+        context.display_list_recorder().save();
+        context.display_list_recorder().set_scroll_frame_id(scroll_frame_id().value());
     }
     }
     if (clip_rect().has_value()) {
     if (clip_rect().has_value()) {
-        context.recording_painter().save();
-        context.recording_painter().add_clip_rect(context.enclosing_device_rect(*clip_rect()).to_type<int>());
+        context.display_list_recorder().save();
+        context.display_list_recorder().add_clip_rect(context.enclosing_device_rect(*clip_rect()).to_type<int>());
     }
     }
 }
 }
 
 
 void InlinePaintable::after_paint(PaintContext& context, PaintPhase) const
 void InlinePaintable::after_paint(PaintContext& context, PaintPhase) const
 {
 {
     if (clip_rect().has_value())
     if (clip_rect().has_value())
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
     if (scroll_frame_id().has_value())
     if (scroll_frame_id().has_value())
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
 }
 }
 
 
 void InlinePaintable::paint(PaintContext& context, PaintPhase phase) const
 void InlinePaintable::paint(PaintContext& context, PaintPhase phase) const
 {
 {
-    auto& painter = context.recording_painter();
+    auto& display_list_recorder = context.display_list_recorder();
 
 
     if (phase == PaintPhase::Background) {
     if (phase == PaintPhase::Background) {
         auto containing_block_position_in_absolute_coordinates = containing_block()->absolute_position();
         auto containing_block_position_in_absolute_coordinates = containing_block()->absolute_position();
@@ -141,9 +141,9 @@ void InlinePaintable::paint(PaintContext& context, PaintPhase phase) const
 
 
                 border_radii_data.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
                 border_radii_data.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
                 borders_rect.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
                 borders_rect.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
-                paint_all_borders(context.recording_painter(), context.rounded_device_rect(borders_rect), border_radii_data.as_corners(context), outline_data->to_device_pixels(context));
+                paint_all_borders(context.display_list_recorder(), context.rounded_device_rect(borders_rect), border_radii_data.as_corners(context), outline_data->to_device_pixels(context));
             } else {
             } else {
-                paint_all_borders(context.recording_painter(), context.rounded_device_rect(borders_rect), border_radii_data.as_corners(context), borders_data.to_device_pixels(context));
+                paint_all_borders(context.display_list_recorder(), context.rounded_device_rect(borders_rect), border_radii_data.as_corners(context), borders_data.to_device_pixels(context));
             }
             }
 
 
             return IterationDecision::Continue;
             return IterationDecision::Continue;
@@ -172,7 +172,7 @@ void InlinePaintable::paint(PaintContext& context, PaintPhase phase) const
         //        would be none. Once we implement non-rectangular outlines for the `outline` CSS
         //        would be none. Once we implement non-rectangular outlines for the `outline` CSS
         //        property, we can use that here instead.
         //        property, we can use that here instead.
         for_each_fragment([&](auto const& fragment, bool, bool) {
         for_each_fragment([&](auto const& fragment, bool, bool) {
-            painter.draw_rect(context.enclosing_device_rect(fragment.absolute_rect()).template to_type<int>(), Color::Magenta);
+            display_list_recorder.draw_rect(context.enclosing_device_rect(fragment.absolute_rect()).template to_type<int>(), Color::Magenta);
             return IterationDecision::Continue;
             return IterationDecision::Continue;
         });
         });
     }
     }

+ 6 - 6
Userland/Libraries/LibWeb/Painting/MarkerPaintable.cpp

@@ -69,13 +69,13 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const
 
 
     switch (layout_box().list_style_type()) {
     switch (layout_box().list_style_type()) {
     case CSS::ListStyleType::Square:
     case CSS::ListStyleType::Square:
-        context.recording_painter().fill_rect(device_marker_rect.to_type<int>(), color);
+        context.display_list_recorder().fill_rect(device_marker_rect.to_type<int>(), color);
         break;
         break;
     case CSS::ListStyleType::Circle:
     case CSS::ListStyleType::Circle:
-        context.recording_painter().draw_ellipse(device_marker_rect.to_type<int>(), color, 1);
+        context.display_list_recorder().draw_ellipse(device_marker_rect.to_type<int>(), color, 1);
         break;
         break;
     case CSS::ListStyleType::Disc:
     case CSS::ListStyleType::Disc:
-        context.recording_painter().fill_ellipse(device_marker_rect.to_type<int>(), color);
+        context.display_list_recorder().fill_ellipse(device_marker_rect.to_type<int>(), color);
         break;
         break;
     case CSS::ListStyleType::DisclosureClosed: {
     case CSS::ListStyleType::DisclosureClosed: {
         // https://drafts.csswg.org/css-counter-styles-3/#disclosure-closed
         // https://drafts.csswg.org/css-counter-styles-3/#disclosure-closed
@@ -88,7 +88,7 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const
         path.line_to({ left + sin_60_deg * (right - left), (top + bottom) / 2 });
         path.line_to({ left + sin_60_deg * (right - left), (top + bottom) / 2 });
         path.line_to({ left, bottom });
         path.line_to({ left, bottom });
         path.close();
         path.close();
-        context.recording_painter().fill_path({ .path = path, .color = color, .winding_rule = Gfx::WindingRule::EvenOdd });
+        context.display_list_recorder().fill_path({ .path = path, .color = color, .winding_rule = Gfx::WindingRule::EvenOdd });
         break;
         break;
     }
     }
     case CSS::ListStyleType::DisclosureOpen: {
     case CSS::ListStyleType::DisclosureOpen: {
@@ -102,7 +102,7 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const
         path.line_to({ right, top });
         path.line_to({ right, top });
         path.line_to({ (left + right) / 2, top + sin_60_deg * (bottom - top) });
         path.line_to({ (left + right) / 2, top + sin_60_deg * (bottom - top) });
         path.close();
         path.close();
-        context.recording_painter().fill_path({ .path = path, .color = color, .winding_rule = Gfx::WindingRule::EvenOdd });
+        context.display_list_recorder().fill_path({ .path = path, .color = color, .winding_rule = Gfx::WindingRule::EvenOdd });
         break;
         break;
     }
     }
     case CSS::ListStyleType::Decimal:
     case CSS::ListStyleType::Decimal:
@@ -118,7 +118,7 @@ void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const
             break;
             break;
         // FIXME: This should use proper text layout logic!
         // FIXME: This should use proper text layout logic!
         // This does not line up with the text in the <li> element which looks very sad :(
         // This does not line up with the text in the <li> element which looks very sad :(
-        context.recording_painter().draw_text(device_enclosing.to_type<int>(), MUST(String::from_byte_string(*text)), layout_box().scaled_font(context), Gfx::TextAlignment::Center, color);
+        context.display_list_recorder().draw_text(device_enclosing.to_type<int>(), MUST(String::from_byte_string(*text)), layout_box().scaled_font(context), Gfx::TextAlignment::Center, color);
         break;
         break;
     }
     }
     case CSS::ListStyleType::None:
     case CSS::ListStyleType::None:

+ 15 - 15
Userland/Libraries/LibWeb/Painting/MediaPaintable.cpp

@@ -44,7 +44,7 @@ Optional<DevicePixelPoint> MediaPaintable::mouse_position(PaintContext& context,
     return {};
     return {};
 }
 }
 
 
-void MediaPaintable::fill_triangle(RecordingPainter& painter, Gfx::IntPoint location, Array<Gfx::IntPoint, 3> coordinates, Color color)
+void MediaPaintable::fill_triangle(DisplayListRecorder& painter, Gfx::IntPoint location, Array<Gfx::IntPoint, 3> coordinates, Color color)
 {
 {
     Gfx::Path path;
     Gfx::Path path;
     path.move_to((coordinates[0] + location).to_type<float>());
     path.move_to((coordinates[0] + location).to_type<float>());
@@ -61,7 +61,7 @@ void MediaPaintable::fill_triangle(RecordingPainter& painter, Gfx::IntPoint loca
 void MediaPaintable::paint_media_controls(PaintContext& context, HTML::HTMLMediaElement const& media_element, DevicePixelRect media_rect, Optional<DevicePixelPoint> const& mouse_position) const
 void MediaPaintable::paint_media_controls(PaintContext& context, HTML::HTMLMediaElement const& media_element, DevicePixelRect media_rect, Optional<DevicePixelPoint> const& mouse_position) const
 {
 {
     auto components = compute_control_bar_components(context, media_element, media_rect);
     auto components = compute_control_bar_components(context, media_element, media_rect);
-    context.recording_painter().fill_rect(components.control_box_rect.to_type<int>(), control_box_color.with_alpha(0xd0));
+    context.display_list_recorder().fill_rect(components.control_box_rect.to_type<int>(), control_box_color.with_alpha(0xd0));
 
 
     paint_control_bar_playback_button(context, media_element, components, mouse_position);
     paint_control_bar_playback_button(context, media_element, components, mouse_position);
     paint_control_bar_timeline(context, media_element, components);
     paint_control_bar_timeline(context, media_element, components);
@@ -155,7 +155,7 @@ void MediaPaintable::paint_control_bar_playback_button(PaintContext& context, HT
             { 0, static_cast<int>(playback_button_size) },
             { 0, static_cast<int>(playback_button_size) },
         } };
         } };
 
 
-        fill_triangle(context.recording_painter(), playback_button_location.to_type<int>(), play_button_coordinates, playback_button_color);
+        fill_triangle(context.display_list_recorder(), playback_button_location.to_type<int>(), play_button_coordinates, playback_button_color);
     } else {
     } else {
         DevicePixelRect pause_button_left_rect {
         DevicePixelRect pause_button_left_rect {
             playback_button_location,
             playback_button_location,
@@ -166,8 +166,8 @@ void MediaPaintable::paint_control_bar_playback_button(PaintContext& context, HT
             { playback_button_size / 3, playback_button_size }
             { playback_button_size / 3, playback_button_size }
         };
         };
 
 
-        context.recording_painter().fill_rect(pause_button_left_rect.to_type<int>(), playback_button_color);
-        context.recording_painter().fill_rect(pause_button_right_rect.to_type<int>(), playback_button_color);
+        context.display_list_recorder().fill_rect(pause_button_left_rect.to_type<int>(), playback_button_color);
+        context.display_list_recorder().fill_rect(pause_button_right_rect.to_type<int>(), playback_button_color);
     }
     }
 }
 }
 
 
@@ -182,11 +182,11 @@ void MediaPaintable::paint_control_bar_timeline(PaintContext& context, HTML::HTM
 
 
     auto timeline_past_rect = components.timeline_rect;
     auto timeline_past_rect = components.timeline_rect;
     timeline_past_rect.set_width(timeline_button_offset_x);
     timeline_past_rect.set_width(timeline_button_offset_x);
-    context.recording_painter().fill_rect(timeline_past_rect.to_type<int>(), control_highlight_color.lightened());
+    context.display_list_recorder().fill_rect(timeline_past_rect.to_type<int>(), control_highlight_color.lightened());
 
 
     auto timeline_future_rect = components.timeline_rect;
     auto timeline_future_rect = components.timeline_rect;
     timeline_future_rect.take_from_left(timeline_button_offset_x);
     timeline_future_rect.take_from_left(timeline_button_offset_x);
-    context.recording_painter().fill_rect(timeline_future_rect.to_type<int>(), Color::Black);
+    context.display_list_recorder().fill_rect(timeline_future_rect.to_type<int>(), Color::Black);
 }
 }
 
 
 void MediaPaintable::paint_control_bar_timestamp(PaintContext& context, Components const& components)
 void MediaPaintable::paint_control_bar_timestamp(PaintContext& context, Components const& components)
@@ -194,7 +194,7 @@ void MediaPaintable::paint_control_bar_timestamp(PaintContext& context, Componen
     if (components.timestamp_rect.is_empty())
     if (components.timestamp_rect.is_empty())
         return;
         return;
 
 
-    context.recording_painter().draw_text(components.timestamp_rect.to_type<int>(), components.timestamp, *components.timestamp_font, Gfx::TextAlignment::CenterLeft, Color::White);
+    context.display_list_recorder().draw_text(components.timestamp_rect.to_type<int>(), components.timestamp, *components.timestamp_font, Gfx::TextAlignment::CenterLeft, Color::White);
 }
 }
 
 
 void MediaPaintable::paint_control_bar_speaker(PaintContext& context, HTML::HTMLMediaElement const& media_element, Components const& components, Optional<DevicePixelPoint> const& mouse_position)
 void MediaPaintable::paint_control_bar_speaker(PaintContext& context, HTML::HTMLMediaElement const& media_element, Components const& components, Optional<DevicePixelPoint> const& mouse_position)
@@ -227,18 +227,18 @@ void MediaPaintable::paint_control_bar_speaker(PaintContext& context, HTML::HTML
     path.line_to(device_point(0, 11));
     path.line_to(device_point(0, 11));
     path.line_to(device_point(0, 4));
     path.line_to(device_point(0, 4));
     path.close();
     path.close();
-    context.recording_painter().fill_path({ .path = path, .color = speaker_button_color, .winding_rule = Gfx::WindingRule::EvenOdd });
+    context.display_list_recorder().fill_path({ .path = path, .color = speaker_button_color, .winding_rule = Gfx::WindingRule::EvenOdd });
 
 
     path.clear();
     path.clear();
     path.move_to(device_point(13, 3));
     path.move_to(device_point(13, 3));
     path.quadratic_bezier_curve_to(device_point(16, 7.5), device_point(13, 12));
     path.quadratic_bezier_curve_to(device_point(16, 7.5), device_point(13, 12));
     path.move_to(device_point(14, 0));
     path.move_to(device_point(14, 0));
     path.quadratic_bezier_curve_to(device_point(20, 7.5), device_point(14, 15));
     path.quadratic_bezier_curve_to(device_point(20, 7.5), device_point(14, 15));
-    context.recording_painter().stroke_path({ .path = path, .color = speaker_button_color, .thickness = 1 });
+    context.display_list_recorder().stroke_path({ .path = path, .color = speaker_button_color, .thickness = 1 });
 
 
     if (media_element.muted()) {
     if (media_element.muted()) {
-        context.recording_painter().draw_line(device_point(0, 0).to_type<int>(), device_point(20, 15).to_type<int>(), Color::Red, 2);
-        context.recording_painter().draw_line(device_point(0, 15).to_type<int>(), device_point(20, 0).to_type<int>(), Color::Red, 2);
+        context.display_list_recorder().draw_line(device_point(0, 0).to_type<int>(), device_point(20, 15).to_type<int>(), Color::Red, 2);
+        context.display_list_recorder().draw_line(device_point(0, 15).to_type<int>(), device_point(20, 0).to_type<int>(), Color::Red, 2);
     }
     }
 }
 }
 
 
@@ -252,11 +252,11 @@ void MediaPaintable::paint_control_bar_volume(PaintContext& context, HTML::HTMLM
 
 
     auto volume_lower_rect = components.volume_scrub_rect;
     auto volume_lower_rect = components.volume_scrub_rect;
     volume_lower_rect.set_width(volume_button_offset_x);
     volume_lower_rect.set_width(volume_button_offset_x);
-    context.recording_painter().fill_rect_with_rounded_corners(volume_lower_rect.to_type<int>(), control_highlight_color.lightened(), 4);
+    context.display_list_recorder().fill_rect_with_rounded_corners(volume_lower_rect.to_type<int>(), control_highlight_color.lightened(), 4);
 
 
     auto volume_higher_rect = components.volume_scrub_rect;
     auto volume_higher_rect = components.volume_scrub_rect;
     volume_higher_rect.take_from_left(volume_button_offset_x);
     volume_higher_rect.take_from_left(volume_button_offset_x);
-    context.recording_painter().fill_rect_with_rounded_corners(volume_higher_rect.to_type<int>(), Color::Black, 4);
+    context.display_list_recorder().fill_rect_with_rounded_corners(volume_higher_rect.to_type<int>(), Color::Black, 4);
 
 
     auto volume_button_rect = components.volume_scrub_rect;
     auto volume_button_rect = components.volume_scrub_rect;
     volume_button_rect.shrink(components.volume_scrub_rect.width() - components.volume_button_size, components.volume_scrub_rect.height() - components.volume_button_size);
     volume_button_rect.shrink(components.volume_scrub_rect.width() - components.volume_button_size, components.volume_scrub_rect.height() - components.volume_button_size);
@@ -264,7 +264,7 @@ void MediaPaintable::paint_control_bar_volume(PaintContext& context, HTML::HTMLM
 
 
     auto volume_is_hovered = rect_is_hovered(media_element, components.volume_rect, mouse_position, HTML::HTMLMediaElement::MouseTrackingComponent::Volume);
     auto volume_is_hovered = rect_is_hovered(media_element, components.volume_rect, mouse_position, HTML::HTMLMediaElement::MouseTrackingComponent::Volume);
     auto volume_color = control_button_color(volume_is_hovered);
     auto volume_color = control_button_color(volume_is_hovered);
-    context.recording_painter().fill_ellipse(volume_button_rect.to_type<int>(), volume_color);
+    context.display_list_recorder().fill_ellipse(volume_button_rect.to_type<int>(), volume_color);
 }
 }
 
 
 MediaPaintable::DispatchEventOfSameName MediaPaintable::handle_mousedown(Badge<EventHandler>, CSSPixelPoint position, unsigned button, unsigned)
 MediaPaintable::DispatchEventOfSameName MediaPaintable::handle_mousedown(Badge<EventHandler>, CSSPixelPoint position, unsigned button, unsigned)

+ 1 - 1
Userland/Libraries/LibWeb/Painting/MediaPaintable.h

@@ -20,7 +20,7 @@ protected:
     explicit MediaPaintable(Layout::ReplacedBox const&);
     explicit MediaPaintable(Layout::ReplacedBox const&);
 
 
     static Optional<DevicePixelPoint> mouse_position(PaintContext&, HTML::HTMLMediaElement const&);
     static Optional<DevicePixelPoint> mouse_position(PaintContext&, HTML::HTMLMediaElement const&);
-    static void fill_triangle(RecordingPainter& painter, Gfx::IntPoint location, Array<Gfx::IntPoint, 3> coordinates, Color color);
+    static void fill_triangle(DisplayListRecorder& painter, Gfx::IntPoint location, Array<Gfx::IntPoint, 3> coordinates, Color color);
 
 
     void paint_media_controls(PaintContext&, HTML::HTMLMediaElement const&, DevicePixelRect media_rect, Optional<DevicePixelPoint> const& mouse_position) const;
     void paint_media_controls(PaintContext&, HTML::HTMLMediaElement const&, DevicePixelRect media_rect, Optional<DevicePixelPoint> const& mouse_position) const;
 
 

+ 6 - 6
Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp

@@ -50,23 +50,23 @@ void NestedBrowsingContextPaintable::paint(PaintContext& context, PaintPhase pha
         if (!hosted_paint_tree)
         if (!hosted_paint_tree)
             return;
             return;
 
 
-        context.recording_painter().save();
+        context.display_list_recorder().save();
 
 
-        context.recording_painter().add_clip_rect(clip_rect.to_type<int>());
+        context.display_list_recorder().add_clip_rect(clip_rect.to_type<int>());
         auto absolute_device_rect = context.enclosing_device_rect(absolute_rect);
         auto absolute_device_rect = context.enclosing_device_rect(absolute_rect);
-        context.recording_painter().translate(absolute_device_rect.x().value(), absolute_device_rect.y().value());
+        context.display_list_recorder().translate(absolute_device_rect.x().value(), absolute_device_rect.y().value());
 
 
         HTML::Navigable::PaintConfig paint_config;
         HTML::Navigable::PaintConfig paint_config;
         paint_config.paint_overlay = context.should_paint_overlay();
         paint_config.paint_overlay = context.should_paint_overlay();
         paint_config.should_show_line_box_borders = context.should_show_line_box_borders();
         paint_config.should_show_line_box_borders = context.should_show_line_box_borders();
         paint_config.has_focus = context.has_focus();
         paint_config.has_focus = context.has_focus();
-        const_cast<DOM::Document*>(hosted_document)->navigable()->record_display_list(context.recording_painter(), paint_config);
+        const_cast<DOM::Document*>(hosted_document)->navigable()->record_display_list(context.display_list_recorder(), paint_config);
 
 
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
 
 
         if constexpr (HIGHLIGHT_FOCUSED_FRAME_DEBUG) {
         if constexpr (HIGHLIGHT_FOCUSED_FRAME_DEBUG) {
             if (layout_box().dom_node().content_navigable()->is_focused()) {
             if (layout_box().dom_node().content_navigable()->is_focused()) {
-                context.recording_painter().draw_rect(clip_rect.to_type<int>(), Color::Cyan);
+                context.display_list_recorder().draw_rect(clip_rect.to_type<int>(), Color::Cyan);
             }
             }
         }
         }
     }
     }

+ 2 - 2
Userland/Libraries/LibWeb/Painting/PaintContext.cpp

@@ -11,8 +11,8 @@ namespace Web {
 
 
 static u64 s_next_paint_generation_id = 0;
 static u64 s_next_paint_generation_id = 0;
 
 
-PaintContext::PaintContext(Painting::RecordingPainter& recording_painter, Palette const& palette, double device_pixels_per_css_pixel)
-    : m_recording_painter(recording_painter)
+PaintContext::PaintContext(Painting::DisplayListRecorder& display_list_recorder, Palette const& palette, double device_pixels_per_css_pixel)
+    : m_display_list_recorder(display_list_recorder)
     , m_palette(palette)
     , m_palette(palette)
     , m_device_pixels_per_css_pixel(device_pixels_per_css_pixel)
     , m_device_pixels_per_css_pixel(device_pixels_per_css_pixel)
     , m_paint_generation_id(s_next_paint_generation_id++)
     , m_paint_generation_id(s_next_paint_generation_id++)

+ 5 - 5
Userland/Libraries/LibWeb/Painting/PaintContext.h

@@ -11,16 +11,16 @@
 #include <LibGfx/Forward.h>
 #include <LibGfx/Forward.h>
 #include <LibGfx/Palette.h>
 #include <LibGfx/Palette.h>
 #include <LibGfx/Rect.h>
 #include <LibGfx/Rect.h>
-#include <LibWeb/Painting/RecordingPainter.h>
+#include <LibWeb/Painting/DisplayListRecorder.h>
 #include <LibWeb/PixelUnits.h>
 #include <LibWeb/PixelUnits.h>
 
 
 namespace Web {
 namespace Web {
 
 
 class PaintContext {
 class PaintContext {
 public:
 public:
-    PaintContext(Painting::RecordingPainter& painter, Palette const& palette, double device_pixels_per_css_pixel);
+    PaintContext(Painting::DisplayListRecorder& painter, Palette const& palette, double device_pixels_per_css_pixel);
 
 
-    Painting::RecordingPainter& recording_painter() const { return m_recording_painter; }
+    Painting::DisplayListRecorder& display_list_recorder() const { return m_display_list_recorder; }
     Palette const& palette() const { return m_palette; }
     Palette const& palette() const { return m_palette; }
 
 
     bool should_show_line_box_borders() const { return m_should_show_line_box_borders; }
     bool should_show_line_box_borders() const { return m_should_show_line_box_borders; }
@@ -70,7 +70,7 @@ public:
     CSSPixelSize scale_to_css_size(DevicePixelSize) const;
     CSSPixelSize scale_to_css_size(DevicePixelSize) const;
     CSSPixelRect scale_to_css_rect(DevicePixelRect) const;
     CSSPixelRect scale_to_css_rect(DevicePixelRect) const;
 
 
-    PaintContext clone(Painting::RecordingPainter& painter) const
+    PaintContext clone(Painting::DisplayListRecorder& painter) const
     {
     {
         auto clone = PaintContext(painter, m_palette, m_device_pixels_per_css_pixel);
         auto clone = PaintContext(painter, m_palette, m_device_pixels_per_css_pixel);
         clone.m_device_viewport_rect = m_device_viewport_rect;
         clone.m_device_viewport_rect = m_device_viewport_rect;
@@ -87,7 +87,7 @@ public:
     u64 paint_generation_id() const { return m_paint_generation_id; }
     u64 paint_generation_id() const { return m_paint_generation_id; }
 
 
 private:
 private:
-    Painting::RecordingPainter& m_recording_painter;
+    Painting::DisplayListRecorder& m_display_list_recorder;
     Palette m_palette;
     Palette m_palette;
     double m_device_pixels_per_css_pixel { 0 };
     double m_device_pixels_per_css_pixel { 0 };
     DevicePixelRect m_device_viewport_rect;
     DevicePixelRect m_device_viewport_rect;

+ 32 - 32
Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

@@ -333,7 +333,7 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
             border_radius_data.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
             border_radius_data.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
             borders_rect.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
             borders_rect.inflate(outline_data->top.width + outline_offset_y, outline_data->right.width + outline_offset_x, outline_data->bottom.width + outline_offset_y, outline_data->left.width + outline_offset_x);
 
 
-            paint_all_borders(context.recording_painter(), context.rounded_device_rect(borders_rect), border_radius_data.as_corners(context), outline_data->to_device_pixels(context));
+            paint_all_borders(context.display_list_recorder(), context.rounded_device_rect(borders_rect), border_radius_data.as_corners(context), outline_data->to_device_pixels(context));
         }
         }
     }
     }
 
 
@@ -343,11 +343,11 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
         int thumb_corner_radius = static_cast<int>(context.rounded_device_pixels(scrollbar_thumb_thickness / 2));
         int thumb_corner_radius = static_cast<int>(context.rounded_device_pixels(scrollbar_thumb_thickness / 2));
         if (auto thumb_rect = scroll_thumb_rect(ScrollDirection::Horizontal); thumb_rect.has_value()) {
         if (auto thumb_rect = scroll_thumb_rect(ScrollDirection::Horizontal); thumb_rect.has_value()) {
             auto thumb_device_rect = context.enclosing_device_rect(thumb_rect.value());
             auto thumb_device_rect = context.enclosing_device_rect(thumb_rect.value());
-            context.recording_painter().fill_rect_with_rounded_corners(thumb_device_rect.to_type<int>(), color, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius);
+            context.display_list_recorder().fill_rect_with_rounded_corners(thumb_device_rect.to_type<int>(), color, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius);
         }
         }
         if (auto thumb_rect = scroll_thumb_rect(ScrollDirection::Vertical); thumb_rect.has_value()) {
         if (auto thumb_rect = scroll_thumb_rect(ScrollDirection::Vertical); thumb_rect.has_value()) {
             auto thumb_device_rect = context.enclosing_device_rect(thumb_rect.value());
             auto thumb_device_rect = context.enclosing_device_rect(thumb_rect.value());
-            context.recording_painter().fill_rect_with_rounded_corners(thumb_device_rect.to_type<int>(), color, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius);
+            context.display_list_recorder().fill_rect_with_rounded_corners(thumb_device_rect.to_type<int>(), color, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius, thumb_corner_radius);
         }
         }
     }
     }
 
 
@@ -366,8 +366,8 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
 
 
         auto paint_inspector_rect = [&](CSSPixelRect const& rect, Color color) {
         auto paint_inspector_rect = [&](CSSPixelRect const& rect, Color color) {
             auto device_rect = context.enclosing_device_rect(rect).to_type<int>();
             auto device_rect = context.enclosing_device_rect(rect).to_type<int>();
-            context.recording_painter().fill_rect(device_rect, Color(color).with_alpha(100));
-            context.recording_painter().draw_rect(device_rect, Color(color));
+            context.display_list_recorder().fill_rect(device_rect, Color(color).with_alpha(100));
+            context.display_list_recorder().draw_rect(device_rect, Color(color));
         };
         };
 
 
         paint_inspector_rect(margin_rect, Color::Yellow);
         paint_inspector_rect(margin_rect, Color::Yellow);
@@ -390,9 +390,9 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
         size_text_rect.set_width(CSSPixels::nearest_value_for(font.width(size_text)) + 4);
         size_text_rect.set_width(CSSPixels::nearest_value_for(font.width(size_text)) + 4);
         size_text_rect.set_height(CSSPixels::nearest_value_for(font.pixel_size()) + 4);
         size_text_rect.set_height(CSSPixels::nearest_value_for(font.pixel_size()) + 4);
         auto size_text_device_rect = context.enclosing_device_rect(size_text_rect).to_type<int>();
         auto size_text_device_rect = context.enclosing_device_rect(size_text_rect).to_type<int>();
-        context.recording_painter().fill_rect(size_text_device_rect, context.palette().color(Gfx::ColorRole::Tooltip));
-        context.recording_painter().draw_rect(size_text_device_rect, context.palette().threed_shadow1());
-        context.recording_painter().draw_text(size_text_device_rect, size_text, font, Gfx::TextAlignment::Center, context.palette().color(Gfx::ColorRole::TooltipText));
+        context.display_list_recorder().fill_rect(size_text_device_rect, context.palette().color(Gfx::ColorRole::Tooltip));
+        context.display_list_recorder().draw_rect(size_text_device_rect, context.palette().threed_shadow1());
+        context.display_list_recorder().draw_text(size_text_device_rect, size_text, font, Gfx::TextAlignment::Center, context.palette().color(Gfx::ColorRole::TooltipText));
     }
     }
 }
 }
 
 
@@ -414,7 +414,7 @@ void PaintableBox::paint_border(PaintContext& context) const
         .bottom = box_model().border.bottom == 0 ? CSS::BorderData() : computed_values().border_bottom(),
         .bottom = box_model().border.bottom == 0 ? CSS::BorderData() : computed_values().border_bottom(),
         .left = box_model().border.left == 0 ? CSS::BorderData() : computed_values().border_left(),
         .left = box_model().border.left == 0 ? CSS::BorderData() : computed_values().border_left(),
     };
     };
-    paint_all_borders(context.recording_painter(), context.rounded_device_rect(absolute_border_box_rect()), normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context));
+    paint_all_borders(context.display_list_recorder(), context.rounded_device_rect(absolute_border_box_rect()), normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context));
 }
 }
 
 
 void PaintableBox::paint_backdrop_filter(PaintContext& context) const
 void PaintableBox::paint_backdrop_filter(PaintContext& context) const
@@ -482,15 +482,15 @@ BorderRadiiData PaintableBox::normalized_border_radii_data(ShrinkRadiiForBorders
 void PaintableBox::apply_scroll_offset(PaintContext& context, PaintPhase) const
 void PaintableBox::apply_scroll_offset(PaintContext& context, PaintPhase) const
 {
 {
     if (scroll_frame_id().has_value()) {
     if (scroll_frame_id().has_value()) {
-        context.recording_painter().save();
-        context.recording_painter().set_scroll_frame_id(scroll_frame_id().value());
+        context.display_list_recorder().save();
+        context.display_list_recorder().set_scroll_frame_id(scroll_frame_id().value());
     }
     }
 }
 }
 
 
 void PaintableBox::reset_scroll_offset(PaintContext& context, PaintPhase) const
 void PaintableBox::reset_scroll_offset(PaintContext& context, PaintPhase) const
 {
 {
     if (scroll_frame_id().has_value())
     if (scroll_frame_id().has_value())
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
 }
 }
 
 
 void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase phase) const
 void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase phase) const
@@ -501,8 +501,8 @@ void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase ph
     if (clip_rect().has_value()) {
     if (clip_rect().has_value()) {
         auto overflow_clip_rect = clip_rect().value();
         auto overflow_clip_rect = clip_rect().value();
         m_clipping_overflow = true;
         m_clipping_overflow = true;
-        context.recording_painter().save();
-        context.recording_painter().add_clip_rect(context.enclosing_device_rect(overflow_clip_rect).to_type<int>());
+        context.display_list_recorder().save();
+        context.display_list_recorder().add_clip_rect(context.enclosing_device_rect(overflow_clip_rect).to_type<int>());
         auto const& border_radii_clips = this->border_radii_clips();
         auto const& border_radii_clips = this->border_radii_clips();
         m_corner_clipper_ids.resize(border_radii_clips.size());
         m_corner_clipper_ids.resize(border_radii_clips.size());
         auto const& combined_transform = combined_css_transform();
         auto const& combined_transform = combined_css_transform();
@@ -514,7 +514,7 @@ void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase ph
             auto corner_clipper_id = context.allocate_corner_clipper_id();
             auto corner_clipper_id = context.allocate_corner_clipper_id();
             m_corner_clipper_ids[corner_clip_index] = corner_clipper_id;
             m_corner_clipper_ids[corner_clip_index] = corner_clipper_id;
             auto rect = corner_clip.rect.translated(-combined_transform.translation().to_type<CSSPixels>());
             auto rect = corner_clip.rect.translated(-combined_transform.translation().to_type<CSSPixels>());
-            context.recording_painter().sample_under_corners(corner_clipper_id, corner_clip.radii.as_corners(context), context.rounded_device_rect(rect).to_type<int>(), CornerClip::Outside);
+            context.display_list_recorder().sample_under_corners(corner_clipper_id, corner_clip.radii.as_corners(context), context.rounded_device_rect(rect).to_type<int>(), CornerClip::Outside);
         }
         }
     }
     }
 }
 }
@@ -534,9 +534,9 @@ void PaintableBox::clear_clip_overflow_rect(PaintContext& context, PaintPhase ph
                 continue;
                 continue;
             auto corner_clipper_id = m_corner_clipper_ids[corner_clip_index];
             auto corner_clipper_id = m_corner_clipper_ids[corner_clip_index];
             m_corner_clipper_ids[corner_clip_index] = corner_clipper_id;
             m_corner_clipper_ids[corner_clip_index] = corner_clipper_id;
-            context.recording_painter().blit_corner_clipping(corner_clipper_id);
+            context.display_list_recorder().blit_corner_clipping(corner_clipper_id);
         }
         }
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
     }
     }
 }
 }
 
 
@@ -572,12 +572,12 @@ void paint_cursor_if_needed(PaintContext& context, TextPaintable const& paintabl
 
 
     auto cursor_device_rect = context.rounded_device_rect(cursor_rect).to_type<int>();
     auto cursor_device_rect = context.rounded_device_rect(cursor_rect).to_type<int>();
 
 
-    context.recording_painter().draw_rect(cursor_device_rect, paintable.computed_values().color());
+    context.display_list_recorder().draw_rect(cursor_device_rect, paintable.computed_values().color());
 }
 }
 
 
 void paint_text_decoration(PaintContext& context, TextPaintable const& paintable, PaintableFragment const& fragment)
 void paint_text_decoration(PaintContext& context, TextPaintable const& paintable, PaintableFragment const& fragment)
 {
 {
-    auto& painter = context.recording_painter();
+    auto& painter = context.display_list_recorder();
     auto& font = fragment.layout_node().first_available_font();
     auto& font = fragment.layout_node().first_available_font();
     auto fragment_box = fragment.absolute_rect();
     auto fragment_box = fragment.absolute_rect();
     CSSPixels glyph_height = CSSPixels::nearest_value_for(font.pixel_size());
     CSSPixels glyph_height = CSSPixels::nearest_value_for(font.pixel_size());
@@ -652,14 +652,14 @@ void paint_text_decoration(PaintContext& context, TextPaintable const& paintable
 
 
 void paint_text_fragment(PaintContext& context, TextPaintable const& paintable, PaintableFragment const& fragment, PaintPhase phase)
 void paint_text_fragment(PaintContext& context, TextPaintable const& paintable, PaintableFragment const& fragment, PaintPhase phase)
 {
 {
-    auto& painter = context.recording_painter();
+    auto& painter = context.display_list_recorder();
 
 
     if (phase == PaintPhase::Foreground) {
     if (phase == PaintPhase::Foreground) {
         auto fragment_absolute_rect = fragment.absolute_rect();
         auto fragment_absolute_rect = fragment.absolute_rect();
         auto fragment_absolute_device_rect = context.enclosing_device_rect(fragment_absolute_rect);
         auto fragment_absolute_device_rect = context.enclosing_device_rect(fragment_absolute_rect);
 
 
         if (paintable.document().inspected_layout_node() == &paintable.layout_node())
         if (paintable.document().inspected_layout_node() == &paintable.layout_node())
-            context.recording_painter().draw_rect(fragment_absolute_device_rect.to_type<int>(), Color::Magenta);
+            context.display_list_recorder().draw_rect(fragment_absolute_device_rect.to_type<int>(), Color::Magenta);
 
 
         auto text = paintable.text_for_rendering();
         auto text = paintable.text_for_rendering();
 
 
@@ -670,7 +670,7 @@ void paint_text_fragment(PaintContext& context, TextPaintable const& paintable,
         auto selection_rect = context.enclosing_device_rect(fragment.selection_rect(paintable.layout_node().first_available_font())).to_type<int>();
         auto selection_rect = context.enclosing_device_rect(fragment.selection_rect(paintable.layout_node().first_available_font())).to_type<int>();
         if (!selection_rect.is_empty()) {
         if (!selection_rect.is_empty()) {
             painter.fill_rect(selection_rect, CSS::SystemColor::highlight());
             painter.fill_rect(selection_rect, CSS::SystemColor::highlight());
-            RecordingPainterStateSaver saver(painter);
+            DisplayListRecorderStateSaver saver(painter);
             painter.add_clip_rect(selection_rect);
             painter.add_clip_rect(selection_rect);
             painter.draw_text_run(baseline_start.to_type<int>(), fragment.glyph_run(), CSS::SystemColor::highlight_text(), fragment_absolute_device_rect.to_type<int>(), scale);
             painter.draw_text_run(baseline_start.to_type<int>(), fragment.glyph_run(), CSS::SystemColor::highlight_text(), fragment_absolute_device_rect.to_type<int>(), scale);
         }
         }
@@ -699,12 +699,12 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
         should_clip_overflow = true;
         should_clip_overflow = true;
     }
     }
     if (should_clip_overflow) {
     if (should_clip_overflow) {
-        context.recording_painter().save();
+        context.display_list_recorder().save();
         // FIXME: Handle overflow-x and overflow-y being different values.
         // FIXME: Handle overflow-x and overflow-y being different values.
         auto clip_box_with_enclosing_scroll_frame_offset = clip_box;
         auto clip_box_with_enclosing_scroll_frame_offset = clip_box;
         if (enclosing_scroll_frame_offset().has_value())
         if (enclosing_scroll_frame_offset().has_value())
             clip_box_with_enclosing_scroll_frame_offset.translate_by(enclosing_scroll_frame_offset().value());
             clip_box_with_enclosing_scroll_frame_offset.translate_by(enclosing_scroll_frame_offset().value());
-        context.recording_painter().add_clip_rect(context.rounded_device_rect(clip_box_with_enclosing_scroll_frame_offset).to_type<int>());
+        context.display_list_recorder().add_clip_rect(context.rounded_device_rect(clip_box_with_enclosing_scroll_frame_offset).to_type<int>());
 
 
         auto border_radii = normalized_border_radii_data(ShrinkRadiiForBorders::Yes);
         auto border_radii = normalized_border_radii_data(ShrinkRadiiForBorders::Yes);
         CornerRadii corner_radii {
         CornerRadii corner_radii {
@@ -715,12 +715,12 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
         };
         };
         if (corner_radii.has_any_radius()) {
         if (corner_radii.has_any_radius()) {
             corner_clip_id = context.allocate_corner_clipper_id();
             corner_clip_id = context.allocate_corner_clipper_id();
-            context.recording_painter().sample_under_corners(*corner_clip_id, corner_radii, context.rounded_device_rect(clip_box).to_type<int>(), CornerClip::Outside);
+            context.display_list_recorder().sample_under_corners(*corner_clip_id, corner_radii, context.rounded_device_rect(clip_box).to_type<int>(), CornerClip::Outside);
         }
         }
 
 
-        context.recording_painter().save();
+        context.display_list_recorder().save();
         auto scroll_offset = context.rounded_device_point(this->scroll_offset());
         auto scroll_offset = context.rounded_device_point(this->scroll_offset());
-        context.recording_painter().translate(-scroll_offset.to_type<int>());
+        context.display_list_recorder().translate(-scroll_offset.to_type<int>());
     }
     }
 
 
     // Text shadows
     // Text shadows
@@ -737,8 +737,8 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
         auto fragment_absolute_rect = fragment.absolute_rect();
         auto fragment_absolute_rect = fragment.absolute_rect();
         auto fragment_absolute_device_rect = context.enclosing_device_rect(fragment_absolute_rect);
         auto fragment_absolute_device_rect = context.enclosing_device_rect(fragment_absolute_rect);
         if (context.should_show_line_box_borders()) {
         if (context.should_show_line_box_borders()) {
-            context.recording_painter().draw_rect(fragment_absolute_device_rect.to_type<int>(), Color::Green);
-            context.recording_painter().draw_line(
+            context.display_list_recorder().draw_rect(fragment_absolute_device_rect.to_type<int>(), Color::Green);
+            context.display_list_recorder().draw_line(
                 context.rounded_device_point(fragment_absolute_rect.top_left().translated(0, fragment.baseline())).to_type<int>(),
                 context.rounded_device_point(fragment_absolute_rect.top_left().translated(0, fragment.baseline())).to_type<int>(),
                 context.rounded_device_point(fragment_absolute_rect.top_right().translated(-1, fragment.baseline())).to_type<int>(), Color::Red);
                 context.rounded_device_point(fragment_absolute_rect.top_right().translated(-1, fragment.baseline())).to_type<int>(), Color::Red);
         }
         }
@@ -747,12 +747,12 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
     }
     }
 
 
     if (should_clip_overflow) {
     if (should_clip_overflow) {
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
         if (corner_clip_id.has_value()) {
         if (corner_clip_id.has_value()) {
-            context.recording_painter().blit_corner_clipping(*corner_clip_id);
+            context.display_list_recorder().blit_corner_clipping(*corner_clip_id);
             corner_clip_id = {};
             corner_clip_id = {};
         }
         }
-        context.recording_painter().restore();
+        context.display_list_recorder().restore();
     }
     }
 }
 }
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Painting/RadioButtonPaintable.cpp

@@ -40,7 +40,7 @@ void RadioButtonPaintable::paint(PaintContext& context, PaintPhase phase) const
     auto draw_circle = [&](auto const& rect, Color color) {
     auto draw_circle = [&](auto const& rect, Color color) {
         // Note: Doing this is a bit more forgiving than draw_circle() which will round to the nearset even radius.
         // Note: Doing this is a bit more forgiving than draw_circle() which will round to the nearset even radius.
         // This will fudge it (which works better here).
         // This will fudge it (which works better here).
-        context.recording_painter().fill_rect_with_rounded_corners(rect, color, rect.width() / 2);
+        context.display_list_recorder().fill_rect_with_rounded_corners(rect, color, rect.width() / 2);
     };
     };
 
 
     auto shrink_all = [&](auto const& rect, int amount) {
     auto shrink_all = [&](auto const& rect, int amount) {

+ 3 - 3
Userland/Libraries/LibWeb/Painting/SVGMaskable.cpp

@@ -82,9 +82,9 @@ RefPtr<Gfx::Bitmap> SVGMaskable::calculate_mask_of_svg(PaintContext& context, CS
             return {};
             return {};
         mask_bitmap = mask_bitmap_or_error.release_value();
         mask_bitmap = mask_bitmap_or_error.release_value();
         DisplayList display_list;
         DisplayList display_list;
-        RecordingPainter recording_painter(display_list);
-        recording_painter.translate(-mask_rect.location().to_type<int>());
-        auto paint_context = context.clone(recording_painter);
+        DisplayListRecorder display_list_recorder(display_list);
+        display_list_recorder.translate(-mask_rect.location().to_type<int>());
+        auto paint_context = context.clone(display_list_recorder);
         paint_context.set_svg_transform(graphics_element.get_transform());
         paint_context.set_svg_transform(graphics_element.get_transform());
         paint_context.set_draw_svg_geometry_for_clip_path(is<SVGClipPaintable>(paintable));
         paint_context.set_draw_svg_geometry_for_clip_path(is<SVGClipPaintable>(paintable));
         StackingContext::paint_node_as_stacking_context(paintable, paint_context);
         StackingContext::paint_node_as_stacking_context(paintable, paint_context);

+ 6 - 6
Userland/Libraries/LibWeb/Painting/SVGPathPaintable.cpp

@@ -66,7 +66,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
     auto svg_element_rect = svg_node->paintable_box()->absolute_rect();
     auto svg_element_rect = svg_node->paintable_box()->absolute_rect();
 
 
     // FIXME: This should not be trucated to an int.
     // FIXME: This should not be trucated to an int.
-    RecordingPainterStateSaver save_painter { context.recording_painter() };
+    DisplayListRecorderStateSaver save_painter { context.display_list_recorder() };
 
 
     auto offset = context.floored_device_point(svg_element_rect.location()).to_type<int>().to_type<float>();
     auto offset = context.floored_device_point(svg_element_rect.location()).to_type<int>().to_type<float>();
     auto maybe_view_box = svg_node->dom_node().view_box();
     auto maybe_view_box = svg_node->dom_node().view_box();
@@ -98,7 +98,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
         // The raw geometry of each child element exclusive of rendering properties such as fill, stroke, stroke-width
         // The raw geometry of each child element exclusive of rendering properties such as fill, stroke, stroke-width
         // within a clipPath conceptually defines a 1-bit mask (with the possible exception of anti-aliasing along
         // within a clipPath conceptually defines a 1-bit mask (with the possible exception of anti-aliasing along
         // the edge of the geometry) which represents the silhouette of the graphics associated with that element.
         // the edge of the geometry) which represents the silhouette of the graphics associated with that element.
-        context.recording_painter().fill_path({
+        context.display_list_recorder().fill_path({
             .path = closed_path(),
             .path = closed_path(),
             .color = Color::Black,
             .color = Color::Black,
             .winding_rule = to_gfx_winding_rule(graphics_element.clip_rule().value_or(SVG::ClipRule::Nonzero)),
             .winding_rule = to_gfx_winding_rule(graphics_element.clip_rule().value_or(SVG::ClipRule::Nonzero)),
@@ -116,7 +116,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
     auto fill_opacity = graphics_element.fill_opacity().value_or(1);
     auto fill_opacity = graphics_element.fill_opacity().value_or(1);
     auto winding_rule = to_gfx_winding_rule(graphics_element.fill_rule().value_or(SVG::FillRule::Nonzero));
     auto winding_rule = to_gfx_winding_rule(graphics_element.fill_rule().value_or(SVG::FillRule::Nonzero));
     if (auto paint_style = graphics_element.fill_paint_style(paint_context); paint_style.has_value()) {
     if (auto paint_style = graphics_element.fill_paint_style(paint_context); paint_style.has_value()) {
-        context.recording_painter().fill_path({
+        context.display_list_recorder().fill_path({
             .path = closed_path(),
             .path = closed_path(),
             .paint_style = *paint_style,
             .paint_style = *paint_style,
             .winding_rule = winding_rule,
             .winding_rule = winding_rule,
@@ -124,7 +124,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
             .translation = offset,
             .translation = offset,
         });
         });
     } else if (auto fill_color = graphics_element.fill_color(); fill_color.has_value()) {
     } else if (auto fill_color = graphics_element.fill_color(); fill_color.has_value()) {
-        context.recording_painter().fill_path({
+        context.display_list_recorder().fill_path({
             .path = closed_path(),
             .path = closed_path(),
             .color = fill_color->with_opacity(fill_opacity),
             .color = fill_color->with_opacity(fill_opacity),
             .winding_rule = winding_rule,
             .winding_rule = winding_rule,
@@ -138,7 +138,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
     float stroke_thickness = graphics_element.stroke_width().value_or(1) * viewbox_scale;
     float stroke_thickness = graphics_element.stroke_width().value_or(1) * viewbox_scale;
 
 
     if (auto paint_style = graphics_element.stroke_paint_style(paint_context); paint_style.has_value()) {
     if (auto paint_style = graphics_element.stroke_paint_style(paint_context); paint_style.has_value()) {
-        context.recording_painter().stroke_path({
+        context.display_list_recorder().stroke_path({
             .path = path,
             .path = path,
             .paint_style = *paint_style,
             .paint_style = *paint_style,
             .thickness = stroke_thickness,
             .thickness = stroke_thickness,
@@ -146,7 +146,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
             .translation = offset,
             .translation = offset,
         });
         });
     } else if (auto stroke_color = graphics_element.stroke_color(); stroke_color.has_value()) {
     } else if (auto stroke_color = graphics_element.stroke_color(); stroke_color.has_value()) {
-        context.recording_painter().stroke_path({
+        context.display_list_recorder().stroke_path({
             .path = path,
             .path = path,
             .color = stroke_color->with_opacity(stroke_opacity),
             .color = stroke_color->with_opacity(stroke_opacity),
             .thickness = stroke_thickness,
             .thickness = stroke_thickness,

+ 3 - 3
Userland/Libraries/LibWeb/Painting/SVGSVGPaintable.cpp

@@ -31,10 +31,10 @@ void SVGSVGPaintable::before_children_paint(PaintContext& context, PaintPhase ph
     PaintableBox::before_children_paint(context, phase);
     PaintableBox::before_children_paint(context, phase);
     if (phase != PaintPhase::Foreground)
     if (phase != PaintPhase::Foreground)
         return;
         return;
-    context.recording_painter().save();
+    context.display_list_recorder().save();
     auto clip_rect = absolute_rect();
     auto clip_rect = absolute_rect();
     clip_rect.translate_by(enclosing_scroll_frame_offset().value_or({}));
     clip_rect.translate_by(enclosing_scroll_frame_offset().value_or({}));
-    context.recording_painter().add_clip_rect(context.enclosing_device_rect(clip_rect).to_type<int>());
+    context.display_list_recorder().add_clip_rect(context.enclosing_device_rect(clip_rect).to_type<int>());
 }
 }
 
 
 void SVGSVGPaintable::after_children_paint(PaintContext& context, PaintPhase phase) const
 void SVGSVGPaintable::after_children_paint(PaintContext& context, PaintPhase phase) const
@@ -42,7 +42,7 @@ void SVGSVGPaintable::after_children_paint(PaintContext& context, PaintPhase pha
     PaintableBox::after_children_paint(context, phase);
     PaintableBox::after_children_paint(context, phase);
     if (phase != PaintPhase::Foreground)
     if (phase != PaintPhase::Foreground)
         return;
         return;
-    context.recording_painter().restore();
+    context.display_list_recorder().restore();
 }
 }
 
 
 }
 }

+ 3 - 3
Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp

@@ -569,10 +569,10 @@ void paint_box_shadow(PaintContext& context,
             auto shrinked_border_radii = border_radii;
             auto shrinked_border_radii = border_radii;
             shrinked_border_radii.shrink(borders_data.top.width, borders_data.right.width, borders_data.bottom.width, borders_data.left.width);
             shrinked_border_radii.shrink(borders_data.top.width, borders_data.right.width, borders_data.bottom.width, borders_data.left.width);
             ScopedCornerRadiusClip corner_clipper { context, device_content_rect, shrinked_border_radii, CornerClip::Outside };
             ScopedCornerRadiusClip corner_clipper { context, device_content_rect, shrinked_border_radii, CornerClip::Outside };
-            context.recording_painter().paint_inner_box_shadow_params(params);
+            context.display_list_recorder().paint_inner_box_shadow_params(params);
         } else {
         } else {
             ScopedCornerRadiusClip corner_clipper { context, device_content_rect, border_radii, CornerClip::Inside };
             ScopedCornerRadiusClip corner_clipper { context, device_content_rect, border_radii, CornerClip::Inside };
-            context.recording_painter().paint_outer_box_shadow_params(params);
+            context.display_list_recorder().paint_outer_box_shadow_params(params);
         }
         }
     }
     }
 }
 }
@@ -620,7 +620,7 @@ void paint_text_shadow(PaintContext& context, PaintableFragment const& fragment,
             draw_rect.y() + offset_y - margin
             draw_rect.y() + offset_y - margin
         };
         };
 
 
-        context.recording_painter().paint_text_shadow(blur_radius, bounding_rect, text_rect, scaled_glyph_run, layer.color, fragment_baseline, draw_location);
+        context.display_list_recorder().paint_text_shadow(blur_radius, bounding_rect, text_rect, scaled_glyph_run, layer.color, fragment_baseline, draw_location);
     }
     }
 }
 }
 
 

+ 7 - 7
Userland/Libraries/LibWeb/Painting/StackingContext.cpp

@@ -276,7 +276,7 @@ void StackingContext::paint(PaintContext& context) const
     if (opacity == 0.0f)
     if (opacity == 0.0f)
         return;
         return;
 
 
-    RecordingPainterStateSaver saver(context.recording_painter());
+    DisplayListRecorderStateSaver saver(context.display_list_recorder());
 
 
     auto to_device_pixels_scale = float(context.device_pixels_per_css_pixel());
     auto to_device_pixels_scale = float(context.device_pixels_per_css_pixel());
     Gfx::IntRect source_paintable_rect;
     Gfx::IntRect source_paintable_rect;
@@ -295,7 +295,7 @@ void StackingContext::paint(PaintContext& context) const
         transform_origin = paintable_box().transform_origin().to_type<float>();
         transform_origin = paintable_box().transform_origin().to_type<float>();
     }
     }
 
 
-    RecordingPainter::PushStackingContextParams push_stacking_context_params {
+    DisplayListRecorder::PushStackingContextParams push_stacking_context_params {
         .opacity = opacity,
         .opacity = opacity,
         .is_fixed_position = paintable().is_fixed_position(),
         .is_fixed_position = paintable().is_fixed_position(),
         .source_paintable_rect = source_paintable_rect,
         .source_paintable_rect = source_paintable_rect,
@@ -322,13 +322,13 @@ void StackingContext::paint(PaintContext& context) const
         }
         }
     }
     }
 
 
-    context.recording_painter().save();
+    context.display_list_recorder().save();
     if (paintable().is_paintable_box() && paintable_box().scroll_frame_id().has_value())
     if (paintable().is_paintable_box() && paintable_box().scroll_frame_id().has_value())
-        context.recording_painter().set_scroll_frame_id(*paintable_box().scroll_frame_id());
-    context.recording_painter().push_stacking_context(push_stacking_context_params);
+        context.display_list_recorder().set_scroll_frame_id(*paintable_box().scroll_frame_id());
+    context.display_list_recorder().push_stacking_context(push_stacking_context_params);
     paint_internal(context);
     paint_internal(context);
-    context.recording_painter().pop_stacking_context();
-    context.recording_painter().restore();
+    context.display_list_recorder().pop_stacking_context();
+    context.display_list_recorder().restore();
 }
 }
 
 
 TraversalDecision StackingContext::hit_test(CSSPixelPoint position, HitTestType type, Function<TraversalDecision(HitTestResult)> const& callback) const
 TraversalDecision StackingContext::hit_test(CSSPixelPoint position, HitTestType type, Function<TraversalDecision(HitTestResult)> const& callback) const

+ 5 - 5
Userland/Libraries/LibWeb/Painting/TableBordersPainting.cpp

@@ -284,12 +284,12 @@ static void paint_collected_edges(PaintContext& context, Vector<BorderEdgePainti
             : border_edge_painting_info.rect.bottom_left();
             : border_edge_painting_info.rect.bottom_left();
 
 
         if (border_style == CSS::LineStyle::Dotted) {
         if (border_style == CSS::LineStyle::Dotted) {
-            context.recording_painter().draw_line(p1.to_type<int>(), p2.to_type<int>(), color, width.value(), Gfx::LineStyle::Dotted);
+            context.display_list_recorder().draw_line(p1.to_type<int>(), p2.to_type<int>(), color, width.value(), Gfx::LineStyle::Dotted);
         } else if (border_style == CSS::LineStyle::Dashed) {
         } else if (border_style == CSS::LineStyle::Dashed) {
-            context.recording_painter().draw_line(p1.to_type<int>(), p2.to_type<int>(), color, width.value(), Gfx::LineStyle::Dashed);
+            context.display_list_recorder().draw_line(p1.to_type<int>(), p2.to_type<int>(), color, width.value(), Gfx::LineStyle::Dashed);
         } else {
         } else {
             // FIXME: Support the remaining line styles instead of rendering them as solid.
             // FIXME: Support the remaining line styles instead of rendering them as solid.
-            context.recording_painter().fill_rect(Gfx::IntRect(border_edge_painting_info.rect.location(), border_edge_painting_info.rect.size()), color);
+            context.display_list_recorder().fill_rect(Gfx::IntRect(border_edge_painting_info.rect.location(), border_edge_painting_info.rect.size()), color);
         }
         }
     }
     }
 }
 }
@@ -351,7 +351,7 @@ static void paint_separate_cell_borders(PaintableBox const& cell_box, HashMap<Ce
         .left = cell_box.box_model().border.left == 0 ? CSS::BorderData() : cell_box.computed_values().border_left(),
         .left = cell_box.box_model().border.left == 0 ? CSS::BorderData() : cell_box.computed_values().border_left(),
     };
     };
     auto cell_rect = cell_coordinates_to_device_rect.get({ cell_box.table_cell_coordinates()->row_index, cell_box.table_cell_coordinates()->column_index }).value();
     auto cell_rect = cell_coordinates_to_device_rect.get({ cell_box.table_cell_coordinates()->row_index, cell_box.table_cell_coordinates()->column_index }).value();
-    paint_all_borders(context.recording_painter(), cell_rect, cell_box.normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context));
+    paint_all_borders(context.display_list_recorder(), cell_rect, cell_box.normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context));
 }
 }
 
 
 void paint_table_borders(PaintContext& context, PaintableBox const& table_paintable)
 void paint_table_borders(PaintContext& context, PaintableBox const& table_paintable)
@@ -436,7 +436,7 @@ void paint_table_borders(PaintContext& context, PaintableBox const& table_painta
                 .bottom = cell_box.box_model().border.bottom == 0 ? CSS::BorderData() : cell_box.computed_values().border_bottom(),
                 .bottom = cell_box.box_model().border.bottom == 0 ? CSS::BorderData() : cell_box.computed_values().border_bottom(),
                 .left = cell_box.box_model().border.left == 0 ? CSS::BorderData() : cell_box.computed_values().border_left(),
                 .left = cell_box.box_model().border.left == 0 ? CSS::BorderData() : cell_box.computed_values().border_left(),
             };
             };
-            paint_all_borders(context.recording_painter(), context.rounded_device_rect(cell_box.absolute_border_box_rect()), cell_box.normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context));
+            paint_all_borders(context.display_list_recorder(), context.rounded_device_rect(cell_box.absolute_border_box_rect()), cell_box.normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context));
         }
         }
     }
     }
 }
 }

+ 6 - 6
Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp

@@ -58,10 +58,10 @@ void VideoPaintable::paint(PaintContext& context, PaintPhase phase) const
     if (phase != PaintPhase::Foreground)
     if (phase != PaintPhase::Foreground)
         return;
         return;
 
 
-    RecordingPainterStateSaver saver { context.recording_painter() };
+    DisplayListRecorderStateSaver saver { context.display_list_recorder() };
 
 
     auto video_rect = context.rounded_device_rect(absolute_rect());
     auto video_rect = context.rounded_device_rect(absolute_rect());
-    context.recording_painter().add_clip_rect(video_rect.to_type<int>());
+    context.display_list_recorder().add_clip_rect(video_rect.to_type<int>());
 
 
     ScopedCornerRadiusClip corner_clip { context, video_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
     ScopedCornerRadiusClip corner_clip { context, video_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
 
 
@@ -130,12 +130,12 @@ void VideoPaintable::paint(PaintContext& context, PaintPhase phase) const
 
 
     auto paint_frame = [&](auto const& frame) {
     auto paint_frame = [&](auto const& frame) {
         auto scaling_mode = to_gfx_scaling_mode(computed_values().image_rendering(), frame->rect(), video_rect.to_type<int>());
         auto scaling_mode = to_gfx_scaling_mode(computed_values().image_rendering(), frame->rect(), video_rect.to_type<int>());
-        context.recording_painter().draw_scaled_bitmap(video_rect.to_type<int>(), *frame, frame->rect(), scaling_mode);
+        context.display_list_recorder().draw_scaled_bitmap(video_rect.to_type<int>(), *frame, frame->rect(), scaling_mode);
     };
     };
 
 
     auto paint_transparent_black = [&]() {
     auto paint_transparent_black = [&]() {
         static constexpr auto transparent_black = Gfx::Color::from_argb(0x00'00'00'00);
         static constexpr auto transparent_black = Gfx::Color::from_argb(0x00'00'00'00);
-        context.recording_painter().fill_rect(video_rect.to_type<int>(), transparent_black);
+        context.display_list_recorder().fill_rect(video_rect.to_type<int>(), transparent_black);
     };
     };
 
 
     auto paint_loaded_video_controls = [&]() {
     auto paint_loaded_video_controls = [&]() {
@@ -211,8 +211,8 @@ void VideoPaintable::paint_placeholder_video_controls(PaintContext& context, Dev
     auto playback_button_is_hovered = mouse_position.has_value() && control_box_rect.contains(*mouse_position);
     auto playback_button_is_hovered = mouse_position.has_value() && control_box_rect.contains(*mouse_position);
     auto playback_button_color = control_button_color(playback_button_is_hovered);
     auto playback_button_color = control_button_color(playback_button_is_hovered);
 
 
-    context.recording_painter().fill_ellipse(control_box_rect.to_type<int>(), control_box_color);
-    fill_triangle(context.recording_painter(), playback_button_location.to_type<int>(), play_button_coordinates, playback_button_color);
+    context.display_list_recorder().fill_ellipse(control_box_rect.to_type<int>(), control_box_color);
+    fill_triangle(context.display_list_recorder(), playback_button_location.to_type<int>(), play_button_coordinates, playback_button_color);
 }
 }
 
 
 }
 }

+ 1 - 1
Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp

@@ -63,7 +63,7 @@ void ViewportPaintable::build_stacking_context_tree()
 void ViewportPaintable::paint_all_phases(PaintContext& context)
 void ViewportPaintable::paint_all_phases(PaintContext& context)
 {
 {
     build_stacking_context_tree_if_needed();
     build_stacking_context_tree_if_needed();
-    context.recording_painter().translate(-context.device_viewport_rect().location().to_type<int>());
+    context.display_list_recorder().translate(-context.device_viewport_rect().location().to_type<int>());
     stacking_context()->paint(context);
     stacking_context()->paint(context);
 }
 }
 
 

+ 2 - 2
Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp

@@ -94,9 +94,9 @@ RefPtr<Gfx::Bitmap> SVGDecodedImageData::render(Gfx::IntSize size) const
     m_document->update_layout();
     m_document->update_layout();
 
 
     Painting::DisplayList display_list;
     Painting::DisplayList display_list;
-    Painting::RecordingPainter recording_painter(display_list);
+    Painting::DisplayListRecorder display_list_recorder(display_list);
 
 
-    m_document->navigable()->record_display_list(recording_painter, {});
+    m_document->navigable()->record_display_list(display_list_recorder, {});
 
 
     auto painting_command_executor_type = m_page_client->painting_command_executor_type();
     auto painting_command_executor_type = m_page_client->painting_command_executor_type();
     switch (painting_command_executor_type) {
     switch (painting_command_executor_type) {