mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-14 03:40:55 +00:00
[gpu] Avoid reading pixels from a GPU surface to move a window
On CPU we might try to blit the old content of the window in a new location, but with a GPU this operation is super slow, it's fast just to draw everything again.
This commit is contained in:
parent
2c7fc767bf
commit
84942175ca
@ -845,6 +845,13 @@ void Window::moveWindow(const gfx::Rect& rect, bool use_blit)
|
||||
|
||||
// In second place, we have to setup the window invalid region...
|
||||
|
||||
// If the GPU acceleration is enabled on this window we avoid
|
||||
// copying regions of pixels as it's super slow to read GPU
|
||||
// surfaces.
|
||||
if (display()->nativeWindow()->gpuAcceleration()) {
|
||||
use_blit = false;
|
||||
}
|
||||
|
||||
// If "use_blit" isn't activated, we have to redraw the whole window
|
||||
// (sending kPaintMessage messages) in the new drawable region
|
||||
if (!use_blit) {
|
||||
|
Loading…
Reference in New Issue
Block a user