mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
PixelPaint: Editing mask optimization
This patch introduces a new function "Layer::editin_mask_bounding_rect" that is used within the LevelsDialog, Luminosity and Colormasking to process only the area where a mask was applied. Therefore we can greatly reduce the amount of processed pixels if only a small portion of the image was masked.
This commit is contained in:
parent
b3a6ccc45b
commit
28cda85f1f
6 changed files with 55 additions and 12 deletions
|
@ -82,6 +82,7 @@ public:
|
|||
ErrorOr<void> scale(Gfx::IntRect const& new_rect, Gfx::Painter::ScalingMode scaling_mode, NotifyClients notify_clients = NotifyClients::Yes);
|
||||
|
||||
Optional<Gfx::IntRect> nonempty_content_bounding_rect() const;
|
||||
Optional<Gfx::IntRect> editing_mask_bounding_rect() const;
|
||||
|
||||
ErrorOr<void> set_bitmaps(NonnullRefPtr<Gfx::Bitmap> content, RefPtr<Gfx::Bitmap> mask);
|
||||
|
||||
|
@ -103,7 +104,7 @@ public:
|
|||
void erase_selection(Selection const&);
|
||||
|
||||
bool is_masked() const { return !m_mask_bitmap.is_null(); }
|
||||
MaskType mask_type();
|
||||
MaskType mask_type() const;
|
||||
|
||||
enum class EditMode {
|
||||
Content,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue