summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/ShareableBitmap.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-06 13:15:43 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 00:35:27 +0100
commit09cba7c7809052185818f41febc71ef74df0857e (patch)
tree0aee3defb8a32d429f0e441e145ae002fa0ceec2 /Userland/Libraries/LibGfx/ShareableBitmap.h
parent8262bbf624624136fa55bcc81c4bd2fd71408eb3 (diff)
downloadserenity-09cba7c7809052185818f41febc71ef74df0857e.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGfx/ShareableBitmap.h')
-rw-r--r--Userland/Libraries/LibGfx/ShareableBitmap.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/ShareableBitmap.h b/Userland/Libraries/LibGfx/ShareableBitmap.h
index 6b8e208fb0..e9616102dd 100644
--- a/Userland/Libraries/LibGfx/ShareableBitmap.h
+++ b/Userland/Libraries/LibGfx/ShareableBitmap.h
@@ -15,7 +15,6 @@ namespace Gfx {
class ShareableBitmap {
public:
ShareableBitmap() { }
- explicit ShareableBitmap(const Gfx::Bitmap&);
enum Tag { ConstructWithKnownGoodBitmap };
ShareableBitmap(NonnullRefPtr<Gfx::Bitmap>, Tag);
@@ -26,6 +25,8 @@ public:
Bitmap* bitmap() { return m_bitmap; }
private:
+ friend class Bitmap;
+
RefPtr<Bitmap> m_bitmap;
};