mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06: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:
parent
b7e551b164
commit
f7053059c9
6 changed files with 14 additions and 13 deletions
|
@ -399,9 +399,9 @@ void ImageEditor::relayout()
|
|||
update();
|
||||
}
|
||||
|
||||
void ImageEditor::image_did_change()
|
||||
void ImageEditor::image_did_change(Gfx::IntRect const& modified_image_rect)
|
||||
{
|
||||
update(m_editor_image_rect);
|
||||
update(m_editor_image_rect.intersected(enclosing_int_rect(image_rect_to_editor_rect(modified_image_rect))));
|
||||
}
|
||||
|
||||
void ImageEditor::image_did_change_title(String const& path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue