mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:05:58 +01:00
pointer/hw: extend cursor swapchain to 3
otherwise on some commits we draw twice and we draw over the front buffer
This commit is contained in:
parent
e8374e0792
commit
f17f8b219c
1 changed files with 4 additions and 1 deletions
|
@ -373,7 +373,10 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
|
||||
auto options = state->monitor->cursorSwapchain->currentOptions();
|
||||
options.size = maxSize;
|
||||
options.length = 2;
|
||||
// TODO: this is a band-aid. If the current cursor image has not yet been committed (no rendering has yet been done)
|
||||
// we should revert the swapchain and avoid rendering to the front buffer.
|
||||
// as a band-aid, extend the swapchain to 3 as we sometimes double-render on a cursor shape change.
|
||||
options.length = 3;
|
||||
options.scanout = true;
|
||||
options.cursor = true;
|
||||
options.multigpu = state->monitor->output->getBackend()->preferredAllocator()->drmFD() != g_pCompositor->m_iDRMFD;
|
||||
|
|
Loading…
Reference in a new issue