aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/config/ConfigManager.cpp12
-rw-r--r--src/render/OpenGL.cpp34
-rw-r--r--src/render/Renderer.cpp6
3 files changed, 26 insertions, 26 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 820e81af..c4293ffd 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -126,12 +126,12 @@ void CConfigManager::setDefaultVars() {
configValues["debug:manual_crash"].intValue = 0;
configValues["decoration:rounding"].intValue = 0;
- configValues["decoration:blur"].intValue = 1;
- configValues["decoration:blur_size"].intValue = 8;
- configValues["decoration:blur_passes"].intValue = 1;
- configValues["decoration:blur_ignore_opacity"].intValue = 0;
- configValues["decoration:blur_new_optimizations"].intValue = 1;
- configValues["decoration:blur_xray"].intValue = 0;
+ configValues["decoration:blur:enabled"].intValue = 1;
+ configValues["decoration:blur:size"].intValue = 8;
+ configValues["decoration:blur:passes"].intValue = 1;
+ configValues["decoration:blur:ignore_opacity"].intValue = 0;
+ configValues["decoration:blur:new_optimizations"].intValue = 1;
+ configValues["decoration:blur:xray"].intValue = 0;
configValues["decoration:active_opacity"].floatValue = 1;
configValues["decoration:inactive_opacity"].floatValue = 1;
configValues["decoration:fullscreen_opacity"].floatValue = 1;
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 81401727..a36d5ce2 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -801,8 +801,8 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, wlr_box* p
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
// get the config settings
- static auto* const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_size")->intValue;
- static auto* const PBLURPASSES = &g_pConfigManager->getConfigValuePtr("decoration:blur_passes")->intValue;
+ static auto* const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur:size")->intValue;
+ static auto* const PBLURPASSES = &g_pConfigManager->getConfigValuePtr("decoration:blur:passes")->intValue;
// prep damage
CRegion damage{*originalDamage};
@@ -914,9 +914,9 @@ void CHyprOpenGLImpl::markBlurDirtyForMonitor(CMonitor* pMonitor) {
}
void CHyprOpenGLImpl::preRender(CMonitor* pMonitor) {
- static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
- static auto* const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur_xray")->intValue;
- static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
+ static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur:new_optimizations")->intValue;
+ static auto* const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur:xray")->intValue;
+ static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue;
if (!*PBLURNEWOPTIMIZE || !m_mMonitorRenderResources[pMonitor].blurFBDirty || !*PBLUR)
return;
@@ -1012,8 +1012,8 @@ void CHyprOpenGLImpl::preWindowPass() {
}
bool CHyprOpenGLImpl::preBlurQueued() {
- static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
- static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
+ static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur:new_optimizations")->intValue;
+ static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue;
return !(!m_RenderData.pCurrentMonData->blurFBDirty || !*PBLURNEWOPTIMIZE || !*PBLUR || !m_RenderData.pCurrentMonData->blurFBShouldRender);
}
@@ -1021,10 +1021,10 @@ bool CHyprOpenGLImpl::preBlurQueued() {
void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, float a, wlr_surface* pSurface, int round, bool blockBlurOptimization) {
RASSERT(m_RenderData.pMonitor, "Tried to render texture with blur without begin()!");
- static auto* const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
+ static auto* const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue;
static auto* const PNOBLUROVERSIZED = &g_pConfigManager->getConfigValuePtr("decoration:no_blur_on_oversized")->intValue;
- static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
- static auto* const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur_xray")->intValue;
+ static auto* const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur:new_optimizations")->intValue;
+ static auto* const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur:xray")->intValue;
TRACY_GPU_ZONE("RenderTextureWithBlur");
@@ -1098,7 +1098,7 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox,
// stencil done. Render everything.
wlr_box MONITORBOX = {0, 0, m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y};
// render our great blurred FB
- static auto* const PBLURIGNOREOPACITY = &g_pConfigManager->getConfigValuePtr("decoration:blur_ignore_opacity")->intValue;
+ static auto* const PBLURIGNOREOPACITY = &g_pConfigManager->getConfigValuePtr("decoration:blur:ignore_opacity")->intValue;
m_bEndFrame = true; // fix transformed
const auto SAVEDRENDERMODIF = m_RenderData.renderModif;
m_RenderData.renderModif = {}; // fix shit
@@ -1252,8 +1252,8 @@ void CHyprOpenGLImpl::makeRawWindowSnapshot(CWindow* pWindow, CFramebuffer* pFra
// will try to copy the bg to apply blur.
// this isn't entirely correct, but like, oh well.
// small todo: maybe make this correct? :P
- const auto BLURVAL = g_pConfigManager->getInt("decoration:blur");
- g_pConfigManager->setInt("decoration:blur", 0);
+ const auto BLURVAL = g_pConfigManager->getInt("decoration:blur:enabled");
+ g_pConfigManager->setInt("decoration:blur:enabled", 0);
// TODO: how can we make this the size of the window? setting it to window's size makes the entire screen render with the wrong res forever more. odd.
glViewport(0, 0, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y);
@@ -1268,7 +1268,7 @@ void CHyprOpenGLImpl::makeRawWindowSnapshot(CWindow* pWindow, CFramebuffer* pFra
g_pHyprRenderer->renderWindow(pWindow, PMONITOR, &now, false, RENDER_PASS_ALL, true);
- g_pConfigManager->setInt("decoration:blur", BLURVAL);
+ g_pConfigManager->setInt("decoration:blur:enabled", BLURVAL);
// restore original fb
#ifndef GLES2
@@ -1309,8 +1309,8 @@ void CHyprOpenGLImpl::makeWindowSnapshot(CWindow* pWindow) {
// will try to copy the bg to apply blur.
// this isn't entirely correct, but like, oh well.
// small todo: maybe make this correct? :P
- const auto BLURVAL = g_pConfigManager->getInt("decoration:blur");
- g_pConfigManager->setInt("decoration:blur", 0);
+ const auto BLURVAL = g_pConfigManager->getInt("decoration:blur:enabled");
+ g_pConfigManager->setInt("decoration:blur:enabled", 0);
glViewport(0, 0, m_RenderData.pMonitor->vecPixelSize.x, m_RenderData.pMonitor->vecPixelSize.y);
@@ -1326,7 +1326,7 @@ void CHyprOpenGLImpl::makeWindowSnapshot(CWindow* pWindow) {
g_pHyprRenderer->renderWindow(pWindow, PMONITOR, &now, !pWindow->m_bX11DoesntWantBorders, RENDER_PASS_ALL);
- g_pConfigManager->setInt("decoration:blur", BLURVAL);
+ g_pConfigManager->setInt("decoration:blur:enabled", BLURVAL);
// restore original fb
#ifndef GLES2
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index bb1ab511..cf6877f3 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -969,13 +969,13 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
damage = {0, 0, (int)pMonitor->vecTransformedSize.x * 10, (int)pMonitor->vecTransformedSize.y * 10};
pMonitor->lastFrameDamage = damage;
} else {
- static auto* const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
+ static auto* const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue;
// if we use blur we need to expand the damage for proper blurring
if (*PBLURENABLED == 1) {
// TODO: can this be optimized?
- static auto* const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_size")->intValue;
- static auto* const PBLURPASSES = &g_pConfigManager->getConfigValuePtr("decoration:blur_passes")->intValue;
+ static auto* const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur:size")->intValue;
+ static auto* const PBLURPASSES = &g_pConfigManager->getConfigValuePtr("decoration:blur:passes")->intValue;
const auto BLURRADIUS =
*PBLURPASSES > 10 ? pow(2, 15) : std::clamp(*PBLURSIZE, (int64_t)1, (int64_t)40) * pow(2, *PBLURPASSES); // is this 2^pass? I don't know but it works... I think.