mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 04:53:48 -07:00
layerSurface: refactor/move to a memory-safe impl
Makes all the pointers smart to avoid memory issues Refactors layerSurface code to live inside desktop/layersurface
This commit is contained in:
@@ -49,11 +49,11 @@ enum AVARDAMAGEPOLICY {
|
||||
};
|
||||
|
||||
class CAnimationManager;
|
||||
struct SLayerSurface;
|
||||
struct SAnimationPropertyConfig;
|
||||
class CHyprRenderer;
|
||||
class CWindow;
|
||||
class CWorkspace;
|
||||
class CLayerSurface;
|
||||
|
||||
// Utility to define a concept as a list of possible type
|
||||
template <class T, class... U>
|
||||
@@ -69,7 +69,7 @@ class CBaseAnimatedVariable {
|
||||
public:
|
||||
CBaseAnimatedVariable(ANIMATEDVARTYPE type);
|
||||
void create(SAnimationPropertyConfig* pAnimConfig, PHLWINDOW pWindow, AVARDAMAGEPOLICY policy);
|
||||
void create(SAnimationPropertyConfig* pAnimConfig, SLayerSurface* pLayer, AVARDAMAGEPOLICY policy);
|
||||
void create(SAnimationPropertyConfig* pAnimConfig, PHLLS pLayer, AVARDAMAGEPOLICY policy);
|
||||
void create(SAnimationPropertyConfig* pAnimConfig, PHLWORKSPACE pWorkspace, AVARDAMAGEPOLICY policy);
|
||||
void create(SAnimationPropertyConfig* pAnimConfig, AVARDAMAGEPOLICY policy);
|
||||
|
||||
@@ -147,7 +147,7 @@ class CBaseAnimatedVariable {
|
||||
protected:
|
||||
PHLWINDOWREF m_pWindow;
|
||||
std::weak_ptr<CWorkspace> m_pWorkspace;
|
||||
void* m_pLayer = nullptr;
|
||||
PHLLSREF m_pLayer;
|
||||
|
||||
SAnimationPropertyConfig* m_pConfig = nullptr;
|
||||
|
||||
@@ -199,7 +199,7 @@ class CBaseAnimatedVariable {
|
||||
|
||||
friend class CAnimationManager;
|
||||
friend class CWorkspace;
|
||||
friend struct SLayerSurface;
|
||||
friend class CLayerSurface;
|
||||
friend class CHyprRenderer;
|
||||
};
|
||||
|
||||
@@ -213,7 +213,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable {
|
||||
m_Value = value;
|
||||
m_Goal = value;
|
||||
}
|
||||
void create(const VarType& value, SAnimationPropertyConfig* pAnimConfig, SLayerSurface* pLayer, AVARDAMAGEPOLICY policy) {
|
||||
void create(const VarType& value, SAnimationPropertyConfig* pAnimConfig, PHLLS pLayer, AVARDAMAGEPOLICY policy) {
|
||||
create(pAnimConfig, pLayer, policy);
|
||||
m_Value = value;
|
||||
m_Goal = value;
|
||||
@@ -304,6 +304,6 @@ class CAnimatedVariable : public CBaseAnimatedVariable {
|
||||
|
||||
friend class CAnimationManager;
|
||||
friend class CWorkspace;
|
||||
friend struct SLayerSurface;
|
||||
friend class CLayerSurface;
|
||||
friend class CHyprRenderer;
|
||||
};
|
||||
|
Reference in New Issue
Block a user