1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:37:44 +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/HTML/TraversableNavigable.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/PaintingCommandExecutorCPU.h>
#include <LibWeb/Painting/ViewportPaintable.h>
#include <LibWeb/Platform/Timer.h>
#include <WebContent/WebContentClientEndpoint.h>
@ -144,7 +145,8 @@ void PageHost::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& targ
context.set_has_focus(m_has_focus);
document->paintable()->paint_all_phases(context);
recording_painter.execute(target);
Web::Painting::PaintingCommandExecutorCPU painting_command_executor(target);
recording_painter.execute(painting_command_executor);
}
void PageHost::set_viewport_rect(Web::DevicePixelRect const& rect)