diff options
Diffstat (limited to 'src/managers')
| -rw-r--r-- | src/managers/screenshare/CursorshareSession.cpp | 10 | ||||
| -rw-r--r-- | src/managers/screenshare/ScreenshareFrame.cpp | 4 |
2 files changed, 8 insertions, 6 deletions
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 <hyprgraphics/egl/Egl.hpp> +using namespace Hyprgraphics::Egl; using namespace Screenshare; CCursorshareSession::CCursorshareSession(wl_client* client, WP<CWLPointerResource> 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<GLint, 4> RGBA = SWIZZLE_RGBA; - std::array<GLint, 4> 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"); diff --git a/src/managers/screenshare/ScreenshareFrame.cpp b/src/managers/screenshare/ScreenshareFrame.cpp index 9f9dffa6..6d110837 100644 --- a/src/managers/screenshare/ScreenshareFrame.cpp +++ b/src/managers/screenshare/ScreenshareFrame.cpp @@ -14,7 +14,9 @@ #include "../../render/pass/RectPassElement.hpp" #include "helpers/cm/ColorManagement.hpp" #include <hyprutils/math/Region.hpp> +#include <hyprgraphics/egl/Egl.hpp> +using namespace Hyprgraphics::Egl; using namespace Screenshare; CScreenshareFrame::CScreenshareFrame(WP<CScreenshareSession> session, bool overlayCursor, bool isFirst) : @@ -395,7 +397,7 @@ bool CScreenshareFrame::copyShm() { auto shm = m_buffer->shm(); - const auto PFORMAT = NFormatUtils::getPixelFormatFromDRM(shm.format); + const auto PFORMAT = getPixelFormatFromDRM(shm.format); if (!PFORMAT) { LOGM(Log::ERR, "Can't copy: failed to find a pixel format"); return false; |
