mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
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:
parent
0c7670b226
commit
de50d27870
Notes:
github-actions[bot]
2024-08-20 07:38:27 +00:00
Author: https://github.com/awesomekling
Commit: de50d27870
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1024
10 changed files with 507 additions and 78 deletions
19
Userland/Libraries/LibGfx/Painter.cpp
Normal file
19
Userland/Libraries/LibGfx/Painter.cpp
Normal 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));
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue