Hyprland/src/render/pass/Pass.hpp
Tom Englund f5af40afce renderpass: use unique ptr instead of shared ptr
lets use unique ptrs instead of refcounting shared ptr when its not
needed, use rvalue reference to construct in vector directly.
2025-07-10 14:09:00 +02:00

43 lines
1 KiB
C++

#pragma once
#include "../../defines.hpp"
#include "PassElement.hpp"
class CGradientValueData;
class CTexture;
class CRenderPass {
public:
bool empty() const;
bool single() const;
void add(UP<IPassElement>&& elem);
void clear();
void removeAllOfType(const std::string& type);
CRegion render(const CRegion& damage_);
private:
CRegion m_damage;
std::vector<CRegion> m_occludedRegions;
CRegion m_totalLiveBlurRegion;
struct SPassElementData {
CRegion elementDamage;
UP<IPassElement> element;
bool discard = false;
};
std::vector<UP<SPassElementData>> m_passElements;
void simplify();
float oneBlurRadius();
void renderDebugData();
struct {
bool present = false;
SP<CTexture> keyboardFocusText, pointerFocusText, lastWindowText;
} m_debugData;
friend class CHyprOpenGLImpl;
};