mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
LibGfx: Make Painter::target() return a Bitmap&
Painter always has a target bitmap, so let's return a reference.
This commit is contained in:
committed by
Andreas Kling
parent
a1a59ec3ab
commit
f42c18bc4c
@@ -387,7 +387,7 @@ void CanvasRenderingContext2D::reset_to_default_state()
|
||||
|
||||
// 1. Clear canvas's bitmap to transparent black.
|
||||
if (painter)
|
||||
painter->clear_rect(painter->target()->rect(), Color::Transparent);
|
||||
painter->clear_rect(painter->target().rect(), Color::Transparent);
|
||||
|
||||
// 2. Empty the list of subpaths in context's current default path.
|
||||
path().clear();
|
||||
@@ -399,7 +399,7 @@ void CanvasRenderingContext2D::reset_to_default_state()
|
||||
reset_drawing_state();
|
||||
|
||||
if (painter)
|
||||
did_draw(painter->target()->rect().to_type<float>());
|
||||
did_draw(painter->target().rect().to_type<float>());
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-measuretext
|
||||
|
||||
Reference in New Issue
Block a user