From 10754745a97c99449ef40db58bd425f5a91f9993 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 4 Mar 2026 19:50:28 +0000 Subject: render/cm: add ICC profile pipeline (#12711) Adds an ICC profile pipeline, loading via config and applying via 3D LUTs. --- src/render/OpenGL.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/render/OpenGL.hpp') diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index bc1f5f4d..d801d40b 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -142,7 +142,7 @@ struct SMonitorRenderData { CFramebuffer mirrorFB; // these are used for some effects, CFramebuffer mirrorSwapFB; // etc CFramebuffer offMainFB; - CFramebuffer monitorMirrorFB; // used for mirroring outputs, does not contain artifacts like offloadFB + CFramebuffer monitorMirrorFB; // used for mirroring outputs / screencopy, does not contain artifacts like offloadFB and is in sRGB CFramebuffer blurFB; SP stencilTex = makeShared(); @@ -239,8 +239,9 @@ class CHyprOpenGLImpl { bool noAA = false; bool blockBlurOptimization = false; GLenum wrapX = GL_CLAMP_TO_EDGE, wrapY = GL_CLAMP_TO_EDGE; - bool cmBackToSRGB = false; - SP cmBackToSRGBSource; + bool cmBackToSRGB = false; + bool noCM = false; + bool finalMonitorCM = false; }; struct SBorderRenderData { @@ -261,6 +262,7 @@ class CHyprOpenGLImpl { void renderBorder(const CBox&, const CGradientValueData&, SBorderRenderData data); void renderBorder(const CBox&, const CGradientValueData&, const CGradientValueData&, float lerp, SBorderRenderData data); void renderTextureMatte(SP tex, const CBox& pBox, CFramebuffer& matte); + void renderTexturePrimitive(SP tex, const CBox& box); void pushMonitorTransformEnabled(bool enabled); void popMonitorTransformEnabled(); @@ -300,6 +302,8 @@ class CHyprOpenGLImpl { void renderOffToMain(CFramebuffer* off); void bindBackOnMain(); + bool needsACopyFB(PHLMONITOR mon); + std::string resolveAssetPath(const std::string& file); SP loadAsset(const std::string& file); SP texFromCairo(cairo_surface_t* cairo); @@ -446,7 +450,6 @@ class CHyprOpenGLImpl { void passCMUniforms(WP, const NColorManagement::PImageDescription imageDescription, const NColorManagement::PImageDescription targetImageDescription, bool modifySDR = false, float sdrMinLuminance = -1.0f, int sdrMaxLuminance = -1); void passCMUniforms(WP, const NColorManagement::PImageDescription imageDescription); - void renderTexturePrimitive(SP tex, const CBox& box); void renderSplash(cairo_t* const, cairo_surface_t* const, double offset, const Vector2D& size); void renderRectInternal(const CBox&, const CHyprColor&, const SRectRenderData& data); void renderRectWithBlurInternal(const CBox&, const CHyprColor&, const SRectRenderData& data); -- cgit v1.2.3