summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authornmzik <Nmzik@mail.ru>2023-12-10 17:53:08 +0100
committerGitHub <noreply@github.com>2023-12-10 16:53:08 +0000
commitefdf07e295d00cf5391a8c0089967a69a76d9b08 (patch)
tree9877f77bd950278fba95ae863c2db0504db7c29a /src/render/OpenGL.cpp
parent0c10b8ab2dad9851b00c0e99bb1fde3f01d5478c (diff)
renderer: Allocate background texture only if required (#4111)
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 845b3caa..da348a0f 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -1897,12 +1897,16 @@ void CHyprOpenGLImpl::renderSplash(cairo_t* const CAIRO, cairo_surface_t* const
void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
RASSERT(m_RenderData.pMonitor, "Tried to createBGTex without begin()!");
+ static auto* const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("misc:disable_hyprland_logo")->intValue;
static auto* const PNOSPLASH = &g_pConfigManager->getConfigValuePtr("misc:disable_splash_rendering")->intValue;
static auto* const PFORCEHYPRCHAN = &g_pConfigManager->getConfigValuePtr("misc:force_hypr_chan")->intValue;
static auto* const PFORCEWALLPAPER = &g_pConfigManager->getConfigValuePtr("misc:force_default_wallpaper")->intValue;
const auto FORCEWALLPAPER = std::clamp(*PFORCEWALLPAPER, static_cast<int64_t>(-1L), static_cast<int64_t>(2L));
+ if (*PRENDERTEX)
+ return;
+
// release the last tex if exists
const auto PTEX = &m_mMonitorBGTextures[pMonitor];
PTEX->destroyTexture();