mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
LibGfx: Short-circuit ShareableBitmap construction in IPC decoder
When decoding a ShareableBitmap that came over IPC, it's safe to assume that it's backed by an anonymous file (since we just decoded it.)
This commit is contained in:
parent
f18d89b36d
commit
58b435f49e
2 changed files with 11 additions and 1 deletions
|
@ -37,6 +37,9 @@ public:
|
|||
ShareableBitmap() { }
|
||||
explicit ShareableBitmap(const Gfx::Bitmap&);
|
||||
|
||||
enum Tag { ConstructWithKnownGoodBitmap };
|
||||
ShareableBitmap(NonnullRefPtr<Gfx::Bitmap>, Tag);
|
||||
|
||||
bool is_valid() const { return m_bitmap; }
|
||||
|
||||
const Bitmap* bitmap() const { return m_bitmap; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue