1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

LibWeb/Painting: Introduce PaintingCommandExecutor

Decoupling painting command executor from RecordingPainter allows to
introduce painters other than CPU Gfx::Painter :)
This commit is contained in:
Aliaksandr Kalenik 2023-10-26 08:45:25 +02:00 committed by Andreas Kling
parent 1682e46df9
commit f915aa70cd
8 changed files with 627 additions and 477 deletions

View file

@ -15,6 +15,7 @@
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Page/Page.h>
#include <LibWeb/Painting/PaintContext.h>
#include <LibWeb/Painting/PaintingCommandExecutorCPU.h>
#include <LibWeb/Painting/ViewportPaintable.h>
#include <LibWeb/SVG/SVGDecodedImageData.h>
#include <LibWeb/SVG/SVGSVGElement.h>
@ -111,7 +112,8 @@ void SVGDecodedImageData::render(Gfx::IntSize size) const
m_document->paintable()->paint_all_phases(context);
recording_painter.execute(*m_bitmap);
Painting::PaintingCommandExecutorCPU executor { *m_bitmap };
recording_painter.execute(executor);
}
RefPtr<Gfx::Bitmap const> SVGDecodedImageData::bitmap(size_t, Gfx::IntSize size) const