summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/Layer.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-06 20:35:19 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-07 13:01:20 +0200
commitf7053059c96d4a84c237b4395fe0a0ba4f3dbafc (patch)
treea5e80c9d9ff87446ab906e8aedb591d01e53ab75 /Userland/Applications/PixelPaint/Layer.cpp
parentb7e551b164ffb4e1de71fb7fe3ca99b6364c728d (diff)
downloadserenity-f7053059c96d4a84c237b4395fe0a0ba4f3dbafc.zip
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.
Diffstat (limited to 'Userland/Applications/PixelPaint/Layer.cpp')
-rw-r--r--Userland/Applications/PixelPaint/Layer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/PixelPaint/Layer.cpp b/Userland/Applications/PixelPaint/Layer.cpp
index 1db8722640..a6d0d4be9e 100644
--- a/Userland/Applications/PixelPaint/Layer.cpp
+++ b/Userland/Applications/PixelPaint/Layer.cpp
@@ -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)