diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-16 19:47:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-16 19:47:53 +0100 |
| commit | b5ea887f072fa055cf23ec389ed81e3ee4c5319a (patch) | |
| tree | 7e160c3677e9829aa247a56dbc05df98fe084cea /src/debug/HyprDebugOverlay.hpp | |
| parent | 66ea2e2c9ed4e9257521e6706fbd21feb7e3cc5b (diff) | |
debug/overlay: optimize rendering, cleanup and nicetify (#14097)
optimizes the rendering, drops direct cairo, fixes up api.
Also improves the visuals etc of the overlay
Diffstat (limited to 'src/debug/HyprDebugOverlay.hpp')
| -rw-r--r-- | src/debug/HyprDebugOverlay.hpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/debug/HyprDebugOverlay.hpp b/src/debug/HyprDebugOverlay.hpp deleted file mode 100644 index 375ecc2c..00000000 --- a/src/debug/HyprDebugOverlay.hpp +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#include "../defines.hpp" -#include "../render/Texture.hpp" -#include <cairo/cairo.h> -#include <map> -#include <deque> - -namespace Render { - class IHyprRenderer; -} - -class CHyprMonitorDebugOverlay { - public: - int draw(int offset); - - void renderData(PHLMONITOR pMonitor, float durationUs); - void renderDataNoOverlay(PHLMONITOR pMonitor, float durationUs); - void frameData(PHLMONITOR pMonitor); - - private: - std::deque<float> m_lastFrametimes; - std::deque<float> m_lastRenderTimes; - std::deque<float> m_lastRenderTimesNoOverlay; - std::deque<float> m_lastAnimationTicks; - std::chrono::high_resolution_clock::time_point m_lastFrame; - PHLMONITORREF m_monitor; - CBox m_lastDrawnBox; - - friend class Render::IHyprRenderer; -}; - -class CHyprDebugOverlay { - public: - CHyprDebugOverlay(); - void draw(); - void renderData(PHLMONITOR, float durationUs); - void renderDataNoOverlay(PHLMONITOR, float durationUs); - void frameData(PHLMONITOR); - - private: - std::map<PHLMONITORREF, CHyprMonitorDebugOverlay> m_monitorOverlays; - - cairo_surface_t* m_cairoSurface = nullptr; - cairo_t* m_cairo = nullptr; - - SP<Render::ITexture> m_texture; - - friend class CHyprMonitorDebugOverlay; - friend class Render::IHyprRenderer; -}; - -inline UP<CHyprDebugOverlay> g_pDebugOverlay; |
