[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:
David Capello 2024-06-14 21:01:25 -03:00
parent 2c7fc767bf
commit 84942175ca

View File

@ -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) {