mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-27 02:37:16 +00:00
Reduce the case where we've to invalidate the whole dstImage
This commit is contained in:
parent
b32db39aa2
commit
9e0d732959
@ -206,8 +206,15 @@ void ToolLoopManager::doLoopStep(bool lastStep)
|
||||
// freehand algorithm needs this trace policy to redraw only the
|
||||
// last dirty area, which can vary in one pixel from the previous
|
||||
// tool loop cycle).
|
||||
m_toolLoop->invalidateDstImage();
|
||||
m_toolLoop->validateDstImage(gfx::Region(m_toolLoop->getDstImage()->bounds()));
|
||||
if (m_toolLoop->getBrush()->type() != kImageBrushType) {
|
||||
m_toolLoop->invalidateDstImage(m_dirtyArea);
|
||||
}
|
||||
// For custom brush we revalidate the whole destination area so
|
||||
// the whole trace is redrawn from scratch.
|
||||
else {
|
||||
m_toolLoop->invalidateDstImage();
|
||||
m_toolLoop->validateDstImage(gfx::Region(m_toolLoop->getDstImage()->bounds()));
|
||||
}
|
||||
}
|
||||
|
||||
m_toolLoop->validateDstImage(m_dirtyArea);
|
||||
|
Loading…
x
Reference in New Issue
Block a user