mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 07:22:50 +00:00
LibWeb: Allow SVGDecodedImageData to cache bitmaps at different sizes
This avoids constantly re-rendering the same SVG image over and over during painting when it's being used at a couple of different sizes (for example when used as a CSS background).
This commit is contained in:
parent
2484324f9a
commit
9759f44faf
Notes:
sideshowbarker
2024-07-17 08:37:36 +09:00
Author: https://github.com/awesomekling
Commit: 9759f44faf
Pull-request: https://github.com/SerenityOS/serenity/pull/23328
Reviewed-by: https://github.com/tcl3
2 changed files with 12 additions and 5 deletions
|
@ -40,7 +40,8 @@ private:
|
|||
SVGDecodedImageData(JS::NonnullGCPtr<Page>, JS::NonnullGCPtr<SVGPageClient>, JS::NonnullGCPtr<DOM::Document>, JS::NonnullGCPtr<SVG::SVGSVGElement>);
|
||||
|
||||
RefPtr<Gfx::Bitmap> render(Gfx::IntSize) const;
|
||||
mutable RefPtr<Gfx::ImmutableBitmap> m_immutable_bitmap;
|
||||
|
||||
mutable HashMap<Gfx::IntSize, NonnullRefPtr<Gfx::ImmutableBitmap>> m_cached_rendered_bitmaps;
|
||||
|
||||
JS::NonnullGCPtr<Page> m_page;
|
||||
JS::NonnullGCPtr<SVGPageClient> m_page_client;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue