mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 16:41:53 -07:00
internal: optimize cursor move a bit (#8264)
* window: inline and const getWindowMainSurfaceBox getWindowMainSurfaceBox gets called a lot of times from deep down from mousemoveunified, profiling mousemoveunified it spends quite a lot of cpu time in here, let the compiler optimize the call to getWindowMainSurfaceBox by inlining and making it const. reducing the overhead. * inputmgr: return early and use std::any_of return early in mousemoveunified to reduce the amount of unnecessery calls to various pointers when not needed, also make isconstrained use std::any_of instead of for loop to use the STL optimized paths with hopes and dreams marginally faster. * decoration: return early, reduce temporar copy return earlier and reduce the temp copies by using one .lock instead of two
This commit is contained in:
@@ -240,10 +240,6 @@ CBox CWindow::getWindowBoxUnified(uint64_t properties) {
|
||||
return box;
|
||||
}
|
||||
|
||||
CBox CWindow::getWindowMainSurfaceBox() {
|
||||
return {m_vRealPosition.value().x, m_vRealPosition.value().y, m_vRealSize.value().x, m_vRealSize.value().y};
|
||||
}
|
||||
|
||||
SBoxExtents CWindow::getFullWindowReservedArea() {
|
||||
return g_pDecorationPositioner->getWindowDecorationReserved(m_pSelf.lock());
|
||||
}
|
||||
|
Reference in New Issue
Block a user