summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-05-20 16:40:44 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-21 07:44:29 +0200
commite63f68661f8d31bf195f801b3f82ad57da1e8237 (patch)
tree870b2e98e443bc34b5a528543e2c3594cd22c513 /Userland/Libraries/LibWeb/SVG
parent6f46bff4dfe43f78ac1906587b3f1106f31765e5 (diff)
downloadserenity-e63f68661f8d31bf195f801b3f82ad57da1e8237.zip
LibWeb: Have ImageProvider bitmap getter take optional size argument
This allows the painting subsystem to request a bitmap with the exact size needed for painting, instead of being limited to "just give me a bitmap" (which was perfectly enough for raster images, but not for vector graphics).
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp2
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
index d6192cb9ef..bda9e99561 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
@@ -20,7 +20,7 @@ SVGDecodedImageData::SVGDecodedImageData()
SVGDecodedImageData::~SVGDecodedImageData() = default;
-RefPtr<Gfx::Bitmap const> SVGDecodedImageData::bitmap(size_t) const
+RefPtr<Gfx::Bitmap const> SVGDecodedImageData::bitmap(size_t, Gfx::IntSize) const
{
return nullptr;
}
diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h
index f8a5b05809..1adc482684 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h
+++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.h
@@ -15,7 +15,7 @@ public:
static ErrorOr<NonnullRefPtr<SVGDecodedImageData>> create(ByteBuffer encoded_svg);
virtual ~SVGDecodedImageData() override;
- virtual RefPtr<Gfx::Bitmap const> bitmap(size_t frame_index) const override;
+ virtual RefPtr<Gfx::Bitmap const> bitmap(size_t frame_index, Gfx::IntSize) const override;
virtual Optional<CSSPixels> intrinsic_width() const override;
virtual Optional<CSSPixels> intrinsic_height() const override;