1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:47:36 +00:00

LibAccelGfx: Remove ability to change target canvas in painter

It is easier to build painter assuming target canvas won't change and
we don't use this api anyway :)
This commit is contained in:
Aliaksandr Kalenik 2023-12-16 16:36:58 +01:00 committed by Andreas Kling
parent 161082e282
commit 4a2a37275e
3 changed files with 13 additions and 23 deletions

View file

@ -29,9 +29,9 @@ class Painter {
AK_MAKE_NONMOVABLE(Painter);
public:
static NonnullOwnPtr<Painter> create(Context&);
static NonnullOwnPtr<Painter> create(Context&, NonnullRefPtr<Canvas>);
Painter(Context&);
Painter(Context&, NonnullRefPtr<Canvas>);
~Painter();
void clear(Gfx::Color);
@ -67,7 +67,6 @@ public:
void set_clip_rect(Gfx::IntRect);
void clear_clip_rect();
void set_target_canvas(NonnullRefPtr<Canvas>);
void flush(Gfx::Bitmap&);
void fill_rect_with_linear_gradient(Gfx::IntRect const&, ReadonlySpan<Gfx::ColorStop>, float angle, Optional<float> repeat_length = {});
@ -110,7 +109,7 @@ private:
Vector<State, 1> m_state_stack;
RefPtr<Canvas> m_target_canvas;
NonnullRefPtr<Canvas> m_target_canvas;
Program m_rectangle_program;
Program m_rounded_rectangle_program;