aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/Renderer.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-12-22 17:12:09 +0100
committerGitHub <[email protected]>2024-12-22 17:12:09 +0100
commite536b02248f370971716b744968776f6880528be (patch)
tree5e5755b7894eb44f9259cfe0e1d97899148a8a60 /src/render/Renderer.hpp
parent1cc1a46c2e154a27750b81307040d3bf7ff0f64f (diff)
downloadHyprland-e536b02248f370971716b744968776f6880528be.tar.gz
Hyprland-e536b02248f370971716b744968776f6880528be.zip
Renderer: rewrite render scheduling (#8683)
This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
Diffstat (limited to 'src/render/Renderer.hpp')
-rw-r--r--src/render/Renderer.hpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/render/Renderer.hpp b/src/render/Renderer.hpp
index 717a3285..054f0eea 100644
--- a/src/render/Renderer.hpp
+++ b/src/render/Renderer.hpp
@@ -67,9 +67,6 @@ class CHyprRenderer {
bool fixMisalignedFSV1 = false);
std::tuple<float, float, float> getRenderTimes(PHLMONITOR pMonitor); // avg max min
void renderLockscreen(PHLMONITOR pMonitor, timespec* now, const CBox& geometry);
- void setOccludedForBackLayers(CRegion& region, PHLWORKSPACE pWorkspace);
- void setOccludedForMainWorkspace(CRegion& region, PHLWORKSPACE pWorkspace); // TODO: merge occlusion methods
- bool canSkipBackBufferClear(PHLMONITOR pMonitor);
void recheckSolitaryForMonitor(PHLMONITOR pMonitor);
void setCursorSurface(SP<CWLSurface> surf, int hotspotX, int hotspotY, bool force = false);
void setCursorFromName(const std::string& name, bool force = false);
@@ -80,6 +77,11 @@ class CHyprRenderer {
void unsetEGL();
SExplicitSyncSettings getExplicitSyncSettings();
void addWindowToRenderUnfocused(PHLWINDOW window);
+ void makeWindowSnapshot(PHLWINDOW);
+ void makeRawWindowSnapshot(PHLWINDOW, CFramebuffer*);
+ void makeLayerSnapshot(PHLLS);
+ void renderSnapshot(PHLWINDOW);
+ void renderSnapshot(PHLLS);
// if RENDER_MODE_NORMAL, provided damage will be written to.
// otherwise, it will be the one used.
@@ -110,6 +112,8 @@ class CHyprRenderer {
std::string name;
} m_sLastCursorData;
+ CRenderPass m_sRenderPass = {};
+
private:
void arrangeLayerArray(PHLMONITOR, const std::vector<PHLLSREF>&, bool, CBox*);
void renderWorkspaceWindowsFullscreen(PHLMONITOR, PHLWORKSPACE, timespec*); // renders workspace windows (fullscreen) (tiled, floating, pinned, but no special)
@@ -129,10 +133,9 @@ class CHyprRenderer {
bool m_bCursorHidden = false;
bool m_bCursorHasSurface = false;
SP<CRenderbuffer> m_pCurrentRenderbuffer = nullptr;
- SP<Aquamarine::IBuffer> m_pCurrentBuffer;
- eRenderMode m_eRenderMode = RENDER_MODE_NORMAL;
-
- bool m_bNvidia = false;
+ SP<Aquamarine::IBuffer> m_pCurrentBuffer = nullptr;
+ eRenderMode m_eRenderMode = RENDER_MODE_NORMAL;
+ bool m_bNvidia = false;
struct {
bool hiddenOnTouch = false;