LibGfx: Introduce a new Gfx::Painter with a Skia backend

This new painter is written with a virtual interface from the start,
and we begin with a Skia backend.

This patch adds enough to support our basic 2D HTML canvas usecase.
This commit is contained in:
Andreas Kling 2024-07-05 15:36:55 +02:00 committed by Andreas Kling
commit de50d27870
Notes: github-actions[bot] 2024-08-20 07:38:27 +00:00
10 changed files with 507 additions and 78 deletions

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2024, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/Painter.h>
#include <LibGfx/PainterSkia.h>
namespace Gfx {
Painter::~Painter() = default;
NonnullOwnPtr<Painter> Painter::create(NonnullRefPtr<Gfx::Bitmap> target_bitmap)
{
return make<PainterSkia>(move(target_bitmap));
}
}