mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 06:38:22 +00:00
LibWeb: Store LibGfx objects in RefPtr to const for draw commands
This commit is contained in:
parent
c36c7ed67b
commit
ea68944149
Notes:
github-actions[bot]
2025-04-16 16:43:06 +00:00
Author: https://github.com/ADKaster
Commit: ea68944149
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4362
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Hendiadyoin1
3 changed files with 8 additions and 8 deletions
|
@ -39,7 +39,7 @@ namespace Web::Painting {
|
|||
class DisplayList;
|
||||
|
||||
struct DrawGlyphRun {
|
||||
NonnullRefPtr<Gfx::GlyphRun> glyph_run;
|
||||
NonnullRefPtr<Gfx::GlyphRun const> glyph_run;
|
||||
double scale { 1 };
|
||||
Gfx::IntRect rect;
|
||||
Gfx::FloatPoint translation;
|
||||
|
@ -61,7 +61,7 @@ struct FillRect {
|
|||
|
||||
struct DrawPaintingSurface {
|
||||
Gfx::IntRect dst_rect;
|
||||
NonnullRefPtr<Gfx::PaintingSurface> surface;
|
||||
NonnullRefPtr<Gfx::PaintingSurface const> surface;
|
||||
Gfx::IntRect src_rect;
|
||||
Gfx::ScalingMode scaling_mode;
|
||||
|
||||
|
@ -72,7 +72,7 @@ struct DrawPaintingSurface {
|
|||
struct DrawScaledImmutableBitmap {
|
||||
Gfx::IntRect dst_rect;
|
||||
Gfx::IntRect clip_rect;
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap> bitmap;
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap const> bitmap;
|
||||
Gfx::ScalingMode scaling_mode;
|
||||
|
||||
[[nodiscard]] Gfx::IntRect bounding_rect() const { return clip_rect; }
|
||||
|
@ -91,7 +91,7 @@ struct DrawRepeatedImmutableBitmap {
|
|||
|
||||
Gfx::IntRect dst_rect;
|
||||
Gfx::IntRect clip_rect;
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap> bitmap;
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap const> bitmap;
|
||||
Gfx::ScalingMode scaling_mode;
|
||||
Repeat repeat;
|
||||
|
||||
|
@ -170,7 +170,7 @@ struct PaintInnerBoxShadow {
|
|||
};
|
||||
|
||||
struct PaintTextShadow {
|
||||
NonnullRefPtr<Gfx::GlyphRun> glyph_run;
|
||||
NonnullRefPtr<Gfx::GlyphRun const> glyph_run;
|
||||
double glyph_run_scale { 1 };
|
||||
Gfx::IntRect shadow_bounding_rect;
|
||||
Gfx::IntRect text_rect;
|
||||
|
@ -438,7 +438,7 @@ struct ApplyTransform {
|
|||
|
||||
struct ApplyMaskBitmap {
|
||||
Gfx::IntPoint origin;
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap> bitmap;
|
||||
NonnullRefPtr<Gfx::ImmutableBitmap const> bitmap;
|
||||
Gfx::Bitmap::MaskKind kind;
|
||||
|
||||
void translate_by(Gfx::IntPoint const& offset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue