diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-16 23:40:49 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-17 01:27:30 +0200 |
commit | e873d27ab122271758f4b89229278be7b5ddeaca (patch) | |
tree | 63918d6117ffeb2949496b9440b2eb6f70075078 /Userland/Libraries/LibGfx/Bitmap.h | |
parent | 050648b2709a2ee30ec5ea20eb3c72b912fec0fe (diff) | |
download | serenity-e873d27ab122271758f4b89229278be7b5ddeaca.zip |
LibGfx: Switch a bunch of API's from taking StringView to String
These were all getting converted into String internally anyway.
Diffstat (limited to 'Userland/Libraries/LibGfx/Bitmap.h')
-rw-r--r-- | Userland/Libraries/LibGfx/Bitmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/Bitmap.h b/Userland/Libraries/LibGfx/Bitmap.h index 53d3e58598..572ad23824 100644 --- a/Userland/Libraries/LibGfx/Bitmap.h +++ b/Userland/Libraries/LibGfx/Bitmap.h @@ -117,7 +117,7 @@ public: static RefPtr<Bitmap> create_shareable(BitmapFormat, const IntSize&, int intrinsic_scale = 1); static RefPtr<Bitmap> create_purgeable(BitmapFormat, const IntSize&, int intrinsic_scale = 1); static RefPtr<Bitmap> create_wrapper(BitmapFormat, const IntSize&, int intrinsic_scale, size_t pitch, void*); - static RefPtr<Bitmap> load_from_file(const StringView& path, int scale_factor = 1); + static RefPtr<Bitmap> load_from_file(String const& path, int scale_factor = 1); static RefPtr<Bitmap> create_with_anon_fd(BitmapFormat, int anon_fd, const IntSize&, int intrinsic_scale, const Vector<RGBA32>& palette, ShouldCloseAnonymousFile); static RefPtr<Bitmap> create_from_serialized_byte_buffer(ByteBuffer&& buffer); static bool is_path_a_supported_image_format(const StringView& path) @@ -221,7 +221,7 @@ public: bool has_alpha_channel() const { return m_format == BitmapFormat::BGRA8888; } BitmapFormat format() const { return m_format; } - void set_mmap_name(const StringView&); + void set_mmap_name(String const&); static constexpr size_t size_in_bytes(size_t pitch, int physical_height) { return pitch * physical_height; } size_t size_in_bytes() const { return size_in_bytes(m_pitch, physical_height()); } |