diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-01-20 20:06:05 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-26 20:24:37 +0000 |
commit | 82a152b69602de05a28034864185545207639a8c (patch) | |
tree | 308eb816ef76a6579934786822d39f186bad385b /Ports/SDL2/patches | |
parent | 1971bff31455306b6976fe7e69db851c94a30794 (diff) | |
download | serenity-82a152b69602de05a28034864185545207639a8c.zip |
LibGfx: Remove `try_` prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
Diffstat (limited to 'Ports/SDL2/patches')
-rw-r--r-- | Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch index 1277e630b6..bc205082f7 100644 --- a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch +++ b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch @@ -1318,7 +1318,7 @@ index 0000000000000000000000000000000000000000..9c7d4f3f5cedf86ae885330aaf6fae7e + +static RefPtr<Gfx::Bitmap> create_bitmap_from_surface(SDL_Surface& icon) +{ -+ auto bitmap_or_error = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, {icon.w, icon.h}); ++ auto bitmap_or_error = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, {icon.w, icon.h}); + if (bitmap_or_error.is_error()) + return {}; + auto bitmap = bitmap_or_error.release_value(); @@ -1372,7 +1372,7 @@ index 0000000000000000000000000000000000000000..9c7d4f3f5cedf86ae885330aaf6fae7e + dbgln("{}: Creating a new framebuffer of size {}x{}", __FUNCTION__, window->w, window->h); + auto win = SerenityPlatformWindow::from_sdl_window(window); + *format = SDL_PIXELFORMAT_RGB888; -+ auto bitmap_or_error = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, {window->w, window->h}); ++ auto bitmap_or_error = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, {window->w, window->h}); + if (bitmap_or_error.is_error()) + return SDL_OutOfMemory(); + win->widget()->m_buffer = bitmap_or_error.release_value(); |