decoration: reduce virtual calls
this shows up as top contender in idle cpu usage, because decos in animations keeps locking weak pointers to shared pointers per window per frame when its not really needed, use weakpointers all the way and it drops to a bottom contender. marginal gains in the big picture. but gains is gains.
This commit is contained in:
parent
c30036bdac
commit
b627885788
5 changed files with 20 additions and 15 deletions
|
|
@ -59,13 +59,13 @@ class CDecorationPositioner {
|
|||
public:
|
||||
CDecorationPositioner();
|
||||
|
||||
Vector2D getEdgeDefinedPoint(uint32_t edges, PHLWINDOW pWindow);
|
||||
Vector2D getEdgeDefinedPoint(uint32_t edges, PHLWINDOWREF pWindow);
|
||||
|
||||
// called on resize, or insert/removal of a new deco
|
||||
void onWindowUpdate(PHLWINDOW pWindow);
|
||||
void uncacheDecoration(IHyprWindowDecoration* deco);
|
||||
SBoxExtents getWindowDecorationReserved(PHLWINDOW pWindow);
|
||||
SBoxExtents getWindowDecorationExtents(PHLWINDOW pWindow, bool inputOnly = false);
|
||||
SBoxExtents getWindowDecorationReserved(PHLWINDOWREF pWindow);
|
||||
SBoxExtents getWindowDecorationExtents(PHLWINDOWREF pWindow, bool inputOnly = false);
|
||||
CBox getBoxWithIncludedDecos(PHLWINDOW pWindow);
|
||||
void repositionDeco(IHyprWindowDecoration* deco);
|
||||
CBox getWindowDecorationBox(IHyprWindowDecoration* deco);
|
||||
|
|
@ -96,4 +96,4 @@ class CDecorationPositioner {
|
|||
void sanitizeDatas();
|
||||
};
|
||||
|
||||
inline UP<CDecorationPositioner> g_pDecorationPositioner;
|
||||
inline UP<CDecorationPositioner> g_pDecorationPositioner;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue