mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Save Gfx::ImmutableBitmap in ApplyBitmapMask display list item
This allows to delete duplicated code between DisplayListPlayerSkia.cpp and ImmutableBitmap.cpp responsible for wrapping Gfx::Bitmap in SkImage.
This commit is contained in:
parent
e02ca0480f
commit
68f58b23ce
Notes:
github-actions[bot]
2024-11-10 16:21:25 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 68f58b23ce
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2261
9 changed files with 10 additions and 45 deletions
|
@ -73,7 +73,7 @@ Optional<Gfx::Bitmap::MaskKind> SVGMaskable::get_mask_type_of_svg() const
|
|||
return {};
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> SVGMaskable::calculate_mask_of_svg(PaintContext& context, CSSPixelRect const& masking_area) const
|
||||
RefPtr<Gfx::ImmutableBitmap> SVGMaskable::calculate_mask_of_svg(PaintContext& context, CSSPixelRect const& masking_area) const
|
||||
{
|
||||
auto const& graphics_element = verify_cast<SVG::SVGGraphicsElement const>(*dom_node_of_svg());
|
||||
auto mask_rect = context.enclosing_device_rect(masking_area);
|
||||
|
@ -108,7 +108,7 @@ RefPtr<Gfx::Bitmap> SVGMaskable::calculate_mask_of_svg(PaintContext& context, CS
|
|||
if (!mask_bitmap)
|
||||
mask_bitmap = clip_bitmap;
|
||||
}
|
||||
return mask_bitmap;
|
||||
return Gfx::ImmutableBitmap::create(*mask_bitmap);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue