diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp index ae134b7d73f..1cf52888f2d 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -94,10 +95,26 @@ RefPtr SVGDecodedImageData::render(Gfx::IntSize size) const Painting::CommandList painting_commands; Painting::RecordingPainter recording_painter(painting_commands); - Painting::CommandExecutorCPU executor { *bitmap }; m_document->navigable()->record_painting_commands(recording_painter, {}); - painting_commands.execute(executor); + + auto painting_command_executor_type = m_page_client->painting_command_executor_type(); + switch (painting_command_executor_type) { + case PaintingCommandExecutorType::CPU: + case PaintingCommandExecutorType::CPUWithExperimentalTransformSupport: + case PaintingCommandExecutorType::GPU: { // GPU painter does not have any path rasterization support so we always fall back to CPU painter + Painting::CommandExecutorCPU executor { *bitmap }; + painting_commands.execute(executor); + break; + } + case PaintingCommandExecutorType::Skia: { + Painting::CommandExecutorSkia executor { *bitmap }; + painting_commands.execute(executor); + break; + } + default: + VERIFY_NOT_REACHED(); + } return bitmap; }