31 lines
907 B
C++
31 lines
907 B
C++
#pragma once
|
|
|
|
#include <hyprland/src/render/pass/PassElement.hpp>
|
|
|
|
class ChromeDecoration;
|
|
|
|
// EK_CUSTOM render-pass element: blits the decoration's cairo-rendered
|
|
// border frame texture, plus a separate title-text texture positioned over
|
|
// the title bar plateau. Both textures are cached on ChromeDecoration.
|
|
class ChromePassElement : public IPassElement {
|
|
public:
|
|
struct SData {
|
|
ChromeDecoration* decoration = nullptr;
|
|
float alpha = 1.F;
|
|
};
|
|
|
|
ChromePassElement(const SData& data);
|
|
virtual ~ChromePassElement() = default;
|
|
|
|
virtual std::vector<UP<IPassElement>> draw() override;
|
|
virtual bool needsLiveBlur() override;
|
|
virtual bool needsPrecomputeBlur() override;
|
|
virtual std::optional<CBox> boundingBox() override;
|
|
|
|
virtual const char* passName() override { return "ChromePassElement"; }
|
|
virtual ePassElementType type() override { return EK_CUSTOM; }
|
|
|
|
private:
|
|
SData data;
|
|
};
|