mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 15:45:08 +00:00
WindowServer: Fix flickering
Rather than blitting and rendering each window every time, only render what actually changed. And while doing so, only render the portions that are visible on the screen. This avoids flickering because flipping framebuffers isn't always perfectly in sync with the code, so it's possible that the flip happens slightly delayed and we can briefly see the next iteration having partially completed. Also, avoid touching the mouse cursor unless it is in an area that needs updating. This reduces flickering unless it is over an area that is updated often. And because we no longer render the entire screen, we'll save the contents below the cursor so that we can hide it before touching that area. Fixes #2981
This commit is contained in:
parent
f8903acea2
commit
a698a58d3c
11 changed files with 679 additions and 186 deletions
|
@ -584,7 +584,7 @@ OwnPtr<Messages::WindowServer::SetWindowBackingStoreResponse> ClientConnection::
|
|||
}
|
||||
|
||||
if (message.flush_immediately())
|
||||
window.invalidate();
|
||||
window.invalidate(false);
|
||||
|
||||
return make<Messages::WindowServer::SetWindowBackingStoreResponse>();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue