mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-15 03:40:35 +00:00
Reduce the flipped area on the screen when the editor/brush preview is updated
This patch should increase the macOS performance significantly. The updating process of the screen on macOS is the slowest one, being the argb32_image_mark_rgb32() function the slowest function in the call tree.)
This commit is contained in:
parent
1531d1fadb
commit
559c040f63
@ -831,8 +831,11 @@ void Editor::drawSpriteClipped(const gfx::Region& updateRegion)
|
||||
GraphicsPtr editorGraphics = getGraphics(clientBounds());
|
||||
|
||||
for (const Rect& updateRect : updateRegion) {
|
||||
Rect spriteRectOnScreen = editorToScreen(updateRect);
|
||||
|
||||
for (const Rect& screenRect : screenRegion) {
|
||||
IntersectClip clip(&screenGraphics, screenRect);
|
||||
IntersectClip clip(&screenGraphics,
|
||||
screenRect & spriteRectOnScreen);
|
||||
if (clip)
|
||||
drawSpriteUnclippedRect(editorGraphics.get(), updateRect);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user