mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Fix performance problem after viewing an huge sprite
When we were viewing an huge sprite, a temporal buffer (os::Surface*) used to render it would increase its size to the size of the canvas. After that, whatever other sprite that we saw (even for the smallest one) we were unnecessary clearing the entire (huge) internal buffer with os::Surface::clear() on each render. This problem was visible only using the new render engine.
This commit is contained in:
parent
8e193b592a
commit
922505e8af
@ -668,9 +668,6 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& sprite
|
||||
}
|
||||
|
||||
if (tmp->nativeHandle()) {
|
||||
if (newEngine)
|
||||
tmp->clear(); // TODO why we need this?
|
||||
|
||||
convert_image_to_surface(rendered.get(), m_sprite->palette(m_frame),
|
||||
tmp, 0, 0, 0, 0, rc2.w, rc2.h);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user