1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

LibAccelGfx+WebContent: Introduce Canvas that represents framebuffer

This commit is contained in:
Aliaksandr Kalenik 2023-11-22 14:33:37 +01:00 committed by Andreas Kling
parent c03b69e664
commit d5630fedf1
4 changed files with 84 additions and 26 deletions

View file

@ -164,10 +164,10 @@ void PageHost::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& targ
if (s_use_gpu_painter) {
#ifdef HAS_ACCELERATED_GRAPHICS
m_accelerated_painter->set_target_bitmap(target);
m_accelerated_painter->set_target_canvas(AccelGfx::Canvas::create(target.size()));
Web::Painting::PaintingCommandExecutorGPU painting_command_executor(*m_accelerated_painter);
recording_painter.execute(painting_command_executor);
m_accelerated_painter->flush();
m_accelerated_painter->flush(target);
#endif
} else {
Web::Painting::PaintingCommandExecutorCPU painting_command_executor(target);