summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibGfx/BMPLoader.cpp2
-rw-r--r--Userland/Libraries/LibGfx/BMPLoader.h2
-rw-r--r--Userland/Libraries/LibGfx/Bitmap.cpp6
-rw-r--r--Userland/Libraries/LibGfx/Bitmap.h4
-rw-r--r--Userland/Libraries/LibGfx/BitmapFont.cpp4
-rw-r--r--Userland/Libraries/LibGfx/BitmapFont.h4
-rw-r--r--Userland/Libraries/LibGfx/GIFLoader.cpp2
-rw-r--r--Userland/Libraries/LibGfx/GIFLoader.h2
-rw-r--r--Userland/Libraries/LibGfx/JPGLoader.cpp2
-rw-r--r--Userland/Libraries/LibGfx/JPGLoader.h2
-rw-r--r--Userland/Libraries/LibGfx/PNGLoader.cpp2
-rw-r--r--Userland/Libraries/LibGfx/PNGLoader.h2
12 files changed, 17 insertions, 17 deletions
diff --git a/Userland/Libraries/LibGfx/BMPLoader.cpp b/Userland/Libraries/LibGfx/BMPLoader.cpp
index f009b36e5d..bc2dbf868f 100644
--- a/Userland/Libraries/LibGfx/BMPLoader.cpp
+++ b/Userland/Libraries/LibGfx/BMPLoader.cpp
@@ -186,7 +186,7 @@ struct BMPLoadingContext {
static RefPtr<Bitmap> load_bmp_impl(const u8*, size_t);
-RefPtr<Gfx::Bitmap> load_bmp(const StringView& path)
+RefPtr<Gfx::Bitmap> load_bmp(String const& path)
{
auto file_or_error = MappedFile::map(path);
if (file_or_error.is_error())
diff --git a/Userland/Libraries/LibGfx/BMPLoader.h b/Userland/Libraries/LibGfx/BMPLoader.h
index 92f54e6b5f..649b00d30c 100644
--- a/Userland/Libraries/LibGfx/BMPLoader.h
+++ b/Userland/Libraries/LibGfx/BMPLoader.h
@@ -31,7 +31,7 @@
namespace Gfx {
-RefPtr<Gfx::Bitmap> load_bmp(const StringView& path);
+RefPtr<Gfx::Bitmap> load_bmp(String const& path);
RefPtr<Gfx::Bitmap> load_bmp_from_memory(const u8*, size_t);
struct BMPLoadingContext;
diff --git a/Userland/Libraries/LibGfx/Bitmap.cpp b/Userland/Libraries/LibGfx/Bitmap.cpp
index a105ab44c7..bb9636a60f 100644
--- a/Userland/Libraries/LibGfx/Bitmap.cpp
+++ b/Userland/Libraries/LibGfx/Bitmap.cpp
@@ -143,7 +143,7 @@ RefPtr<Bitmap> Bitmap::create_wrapper(BitmapFormat format, const IntSize& size,
return adopt(*new Bitmap(format, size, scale_factor, pitch, data));
}
-RefPtr<Bitmap> Bitmap::load_from_file(const StringView& path, int scale_factor)
+RefPtr<Bitmap> Bitmap::load_from_file(String const& path, int scale_factor)
{
if (scale_factor > 1 && path.starts_with("/res/")) {
LexicalPath lexical_path { path };
@@ -439,11 +439,11 @@ Bitmap::~Bitmap()
delete[] m_palette;
}
-void Bitmap::set_mmap_name([[maybe_unused]] const StringView& name)
+void Bitmap::set_mmap_name([[maybe_unused]] String const& name)
{
VERIFY(m_needs_munmap);
#ifdef __serenity__
- ::set_mmap_name(m_data, size_in_bytes(), name.to_string().characters());
+ ::set_mmap_name(m_data, size_in_bytes(), name.characters());
#endif
}
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()); }
diff --git a/Userland/Libraries/LibGfx/BitmapFont.cpp b/Userland/Libraries/LibGfx/BitmapFont.cpp
index 84caf7f07a..5fda354fda 100644
--- a/Userland/Libraries/LibGfx/BitmapFont.cpp
+++ b/Userland/Libraries/LibGfx/BitmapFont.cpp
@@ -190,7 +190,7 @@ String BitmapFont::type_name_by_type(FontTypes type)
VERIFY_NOT_REACHED();
}
-RefPtr<BitmapFont> BitmapFont::load_from_file(const StringView& path)
+RefPtr<BitmapFont> BitmapFont::load_from_file(String const& path)
{
if (Core::File::is_device(path))
return nullptr;
@@ -207,7 +207,7 @@ RefPtr<BitmapFont> BitmapFont::load_from_file(const StringView& path)
return font;
}
-bool BitmapFont::write_to_file(const StringView& path)
+bool BitmapFont::write_to_file(String const& path)
{
FontFileHeader header;
memset(&header, 0, sizeof(FontFileHeader));
diff --git a/Userland/Libraries/LibGfx/BitmapFont.h b/Userland/Libraries/LibGfx/BitmapFont.h
index 0636b9b3d1..2471a0134a 100644
--- a/Userland/Libraries/LibGfx/BitmapFont.h
+++ b/Userland/Libraries/LibGfx/BitmapFont.h
@@ -50,8 +50,8 @@ public:
NonnullRefPtr<Font> clone() const;
static NonnullRefPtr<BitmapFont> create(u8 glyph_height, u8 glyph_width, bool fixed, FontTypes type);
- static RefPtr<BitmapFont> load_from_file(const StringView& path);
- bool write_to_file(const StringView& path);
+ static RefPtr<BitmapFont> load_from_file(String const& path);
+ bool write_to_file(String const& path);
~BitmapFont();
diff --git a/Userland/Libraries/LibGfx/GIFLoader.cpp b/Userland/Libraries/LibGfx/GIFLoader.cpp
index db69df4e11..20e141544d 100644
--- a/Userland/Libraries/LibGfx/GIFLoader.cpp
+++ b/Userland/Libraries/LibGfx/GIFLoader.cpp
@@ -104,7 +104,7 @@ struct GIFLoadingContext {
RefPtr<Gfx::Bitmap> prev_frame_buffer;
};
-RefPtr<Gfx::Bitmap> load_gif(const StringView& path)
+RefPtr<Gfx::Bitmap> load_gif(String const& path)
{
auto file_or_error = MappedFile::map(path);
if (file_or_error.is_error())
diff --git a/Userland/Libraries/LibGfx/GIFLoader.h b/Userland/Libraries/LibGfx/GIFLoader.h
index 24be735381..6d60a66203 100644
--- a/Userland/Libraries/LibGfx/GIFLoader.h
+++ b/Userland/Libraries/LibGfx/GIFLoader.h
@@ -31,7 +31,7 @@
namespace Gfx {
-RefPtr<Gfx::Bitmap> load_gif(const StringView& path);
+RefPtr<Gfx::Bitmap> load_gif(String const& path);
RefPtr<Gfx::Bitmap> load_gif_from_memory(const u8*, size_t);
struct GIFLoadingContext;
diff --git a/Userland/Libraries/LibGfx/JPGLoader.cpp b/Userland/Libraries/LibGfx/JPGLoader.cpp
index 8a219ad395..1acd29bc0e 100644
--- a/Userland/Libraries/LibGfx/JPGLoader.cpp
+++ b/Userland/Libraries/LibGfx/JPGLoader.cpp
@@ -1252,7 +1252,7 @@ static RefPtr<Gfx::Bitmap> load_jpg_impl(const u8* data, size_t data_size)
return context.bitmap;
}
-RefPtr<Gfx::Bitmap> load_jpg(const StringView& path)
+RefPtr<Gfx::Bitmap> load_jpg(String const& path)
{
auto file_or_error = MappedFile::map(path);
if (file_or_error.is_error())
diff --git a/Userland/Libraries/LibGfx/JPGLoader.h b/Userland/Libraries/LibGfx/JPGLoader.h
index 67af000882..1eca62cb5c 100644
--- a/Userland/Libraries/LibGfx/JPGLoader.h
+++ b/Userland/Libraries/LibGfx/JPGLoader.h
@@ -33,7 +33,7 @@
namespace Gfx {
-RefPtr<Gfx::Bitmap> load_jpg(const StringView& path);
+RefPtr<Gfx::Bitmap> load_jpg(String const& path);
RefPtr<Gfx::Bitmap> load_jpg_from_memory(const u8* data, size_t length);
struct JPGLoadingContext;
diff --git a/Userland/Libraries/LibGfx/PNGLoader.cpp b/Userland/Libraries/LibGfx/PNGLoader.cpp
index 3ff957bdad..e062b11a53 100644
--- a/Userland/Libraries/LibGfx/PNGLoader.cpp
+++ b/Userland/Libraries/LibGfx/PNGLoader.cpp
@@ -190,7 +190,7 @@ private:
static RefPtr<Gfx::Bitmap> load_png_impl(const u8*, size_t);
static bool process_chunk(Streamer&, PNGLoadingContext& context);
-RefPtr<Gfx::Bitmap> load_png(const StringView& path)
+RefPtr<Gfx::Bitmap> load_png(String const& path)
{
auto file_or_error = MappedFile::map(path);
if (file_or_error.is_error())
diff --git a/Userland/Libraries/LibGfx/PNGLoader.h b/Userland/Libraries/LibGfx/PNGLoader.h
index 2432f231e0..ce0976ddea 100644
--- a/Userland/Libraries/LibGfx/PNGLoader.h
+++ b/Userland/Libraries/LibGfx/PNGLoader.h
@@ -31,7 +31,7 @@
namespace Gfx {
-RefPtr<Gfx::Bitmap> load_png(const StringView& path);
+RefPtr<Gfx::Bitmap> load_png(String const& path);
RefPtr<Gfx::Bitmap> load_png_from_memory(const u8*, size_t);
struct PNGLoadingContext;