1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:38:10 +00:00

PixelPaint: Allow partial invalidation of Layer and Image

Let's give ourselves the tools needed to update less than the entire
image every time we paint.

This patch adds plumbing so that Layer invalidations have a modified
rect that gets passed on to Image, and then on to ImageEditor.
This commit is contained in:
Andreas Kling 2021-07-06 20:35:19 +02:00
parent b7e551b164
commit f7053059c9
6 changed files with 14 additions and 13 deletions

View file

@ -61,9 +61,9 @@ Layer::Layer(Image& image, NonnullRefPtr<Gfx::Bitmap> bitmap, String name)
{
}
void Layer::did_modify_bitmap()
void Layer::did_modify_bitmap(Gfx::IntRect const& rect)
{
m_image.layer_did_modify_bitmap({}, *this);
m_image.layer_did_modify_bitmap({}, *this, rect);
}
void Layer::set_visible(bool visible)