From 809b9b9e78c69c53b62dfc7d5de5c20ff8fe0626 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sun, 5 Apr 2026 20:37:07 +0200 Subject: egl: move over to use hyprgraphics (#12988) use the hyprgraphics helpers instead. --- src/managers/screenshare/CursorshareSession.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/managers/screenshare/CursorshareSession.cpp') diff --git a/src/managers/screenshare/CursorshareSession.cpp b/src/managers/screenshare/CursorshareSession.cpp index a1664487..f093cfd8 100644 --- a/src/managers/screenshare/CursorshareSession.cpp +++ b/src/managers/screenshare/CursorshareSession.cpp @@ -5,7 +5,9 @@ #include "../../render/Renderer.hpp" #include "../../render/pass/ClearPassElement.hpp" #include "../../render/pass/TexPassElement.hpp" +#include +using namespace Hyprgraphics::Egl; using namespace Screenshare; CCursorshareSession::CCursorshareSession(wl_client* client, WP pointer) : m_client(client), m_pointer(pointer) { @@ -164,7 +166,7 @@ bool CCursorshareSession::copy() { callback(RESULT_COPIED); }); } else if (auto attrs = m_pendingFrame.buffer->shm(); attrs.success) { - const auto PFORMAT = NFormatUtils::getPixelFormatFromDRM(m_format); + const auto PFORMAT = getPixelFormatFromDRM(m_format); if (attrs.format != m_format || !PFORMAT) { LOGM(Log::ERR, "Can't copy: invalid format"); @@ -190,11 +192,9 @@ bool CCursorshareSession::copy() { if (glFormat != GL_BGRA_EXT && glFormat != GL_RGB) { if (PFORMAT->swizzle.has_value()) { - std::array RGBA = SWIZZLE_RGBA; - std::array BGRA = SWIZZLE_BGRA; - if (PFORMAT->swizzle == RGBA) + if (PFORMAT->swizzle == SWIZZLE_RGBA) glFormat = GL_RGBA; - else if (PFORMAT->swizzle == BGRA) + else if (PFORMAT->swizzle == SWIZZLE_BGRA) glFormat = GL_BGRA_EXT; else { LOGM(Log::ERR, "Copied frame via shm might be broken or color flipped"); -- cgit v1.2.3