LibGfx: Use ErrorOr<T> for Bitmap infrastructure used by ShareableBitmap

This also allows us to get rid of the ShareableBitmap(Bitmap)
constructor which was easy to misuse. Everyone now uses Bitmap's
to_shareable_bitmap() helper instead.
This commit is contained in:
Andreas Kling 2021-11-06 13:15:43 +01:00
commit 09cba7c780
Notes: sideshowbarker 2024-07-18 01:24:34 +09:00
5 changed files with 13 additions and 22 deletions

View file

@ -13,11 +13,6 @@
namespace Gfx {
ShareableBitmap::ShareableBitmap(const Bitmap& bitmap)
: m_bitmap(bitmap.to_bitmap_backed_by_anonymous_buffer())
{
}
ShareableBitmap::ShareableBitmap(NonnullRefPtr<Bitmap> bitmap, Tag)
: m_bitmap(move(bitmap))
{