1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

PixelPaint: Make "Add Mask" action fallible

This commit is contained in:
Tim Ledbetter 2023-02-23 20:52:32 +00:00 committed by Andreas Kling
parent b548a7b5ea
commit d62c95d779
3 changed files with 10 additions and 4 deletions

View file

@ -309,11 +309,12 @@ void Layer::update_cached_bitmap()
}
}
void Layer::create_mask()
ErrorOr<void> Layer::create_mask()
{
m_mask_bitmap = MUST(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, size()));
m_mask_bitmap = TRY(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, size()));
m_mask_bitmap->fill(Gfx::Color::White);
update_cached_bitmap();
return {};
}
Gfx::Bitmap& Layer::currently_edited_bitmap()