* compositor: reduce amount of window box copies mousemoveunified can call this very frequently, the cbox copying actually shows up as an impact in such cases, move it down in the scope and only do it when necessery. * core: constify and reference frequent calls profiling shows these as frequent called functions try to reduce the amount of copies with references and const the variables. * pointermgr: remove not used local copy, const ref remove unneded local copies and const ref cursorsize. * inputmgr: reduce amount of calls to vectortowindow the amount of calls to g_pCompositor->vectorToWindowUnified fast ramps up in cpu usage with enough windows existing and moving the mouse, move the PWINDOWIDEAL up and reuse it if its already the same. * protocol: compositor remove unused local copy remove unused local copy of accumulateCurrentBufferDamage and const previousBuffer. * renderer: reduce scope of variables and refactor move a few variables down in their scopes to reduce the amount of calls and copies when not needed, also add one more for loop in renderWorkspaceWindows and store the windows in a vector with weakpointers that should be rendered, this adds a loop but reduces the amount of repeated calls to shouldRenderWindow and also makes the rest of the loops go over way smaller vector when many windows exist.
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "IHyprWindowDecoration.hpp"
|
|
|
|
class CHyprBorderDecoration : public IHyprWindowDecoration {
|
|
public:
|
|
CHyprBorderDecoration(PHLWINDOW);
|
|
virtual ~CHyprBorderDecoration();
|
|
|
|
virtual SDecorationPositioningInfo getPositioningInfo();
|
|
|
|
virtual void onPositioningReply(const SDecorationPositioningReply& reply);
|
|
|
|
virtual void draw(PHLMONITOR, float const& a);
|
|
|
|
virtual eDecorationType getDecorationType();
|
|
|
|
virtual void updateWindow(PHLWINDOW);
|
|
|
|
virtual void damageEntire();
|
|
|
|
virtual eDecorationLayer getDecorationLayer();
|
|
|
|
virtual uint64_t getDecorationFlags();
|
|
|
|
virtual std::string getDisplayName();
|
|
|
|
private:
|
|
SBoxExtents m_seExtents;
|
|
SBoxExtents m_seReportedExtents;
|
|
|
|
PHLWINDOWREF m_pWindow;
|
|
|
|
Vector2D m_vLastWindowPos;
|
|
Vector2D m_vLastWindowSize;
|
|
|
|
CBox m_bAssignedGeometry = {0};
|
|
|
|
int m_iLastBorderSize = -1;
|
|
|
|
CBox assignedBoxGlobal();
|
|
bool doesntWantBorders();
|
|
};
|