mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
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:
parent
8262bbf624
commit
09cba7c780
5 changed files with 13 additions and 22 deletions
|
@ -116,7 +116,7 @@ public:
|
|||
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> scaled(int sx, int sy) const;
|
||||
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> scaled(float sx, float sy) const;
|
||||
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> cropped(Gfx::IntRect) const;
|
||||
[[nodiscard]] RefPtr<Bitmap> to_bitmap_backed_by_anonymous_buffer() const;
|
||||
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> to_bitmap_backed_by_anonymous_buffer() const;
|
||||
[[nodiscard]] ByteBuffer serialize_to_byte_buffer() const;
|
||||
|
||||
[[nodiscard]] ShareableBitmap to_shareable_bitmap() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue