1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:07:35 +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:
Torstennator 2023-08-21 11:15:49 +02:00 committed by Sam Atkins
parent b3a6ccc45b
commit 28cda85f1f
6 changed files with 55 additions and 12 deletions

View file

@ -28,6 +28,7 @@ private:
RefPtr<GUI::ValueSlider> m_gamma_slider = { nullptr };
bool m_did_change = false;
int m_precomputed_color_correction[256];
Optional<Gfx::IntRect> m_masked_area;
ErrorOr<void> ensure_reference_bitmap();
void generate_new_image();