This commit is contained in:
Vaxry 2023-11-23 22:30:52 +00:00
parent 5265ce05d5
commit edb3ee4566
2 changed files with 12 additions and 2 deletions

View file

@ -118,6 +118,8 @@ GLuint CHyprOpenGLImpl::compileShader(const GLuint& type, std::string src, bool
void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, bool fake) {
m_RenderData.pMonitor = pMonitor;
static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue;
TRACY_GPU_ZONE("RenderBegin");
glViewport(0, 0, pMonitor->vecPixelSize.x, pMonitor->vecPixelSize.y);
@ -160,7 +162,8 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, bool fake) {
const auto PRBO = g_pHyprRenderer->getCurrentRBO();
if (m_sFinalScreenShader.program > 0 || m_bFakeFrame || m_RenderData.mouseZoomFactor != 1.0 || pMonitor->vecPixelSize != PRBO->getFB()->m_vSize) {
if (m_sFinalScreenShader.program > 0 || m_bFakeFrame || m_RenderData.mouseZoomFactor != 1.0 || pMonitor->vecPixelSize != PRBO->getFB()->m_vSize ||
*PBLUR != 0 /* TODO: revisit when possible */) {
// we have to offload
// bind the primary Hypr Framebuffer
m_RenderData.pCurrentMonData->offloadFB.bind();

View file

@ -1063,7 +1063,14 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
g_pHyprOpenGL->m_RenderData.useNearestNeighbor = false;
}
beginRender(pMonitor, damage, RENDER_MODE_NORMAL);
if (!beginRender(pMonitor, damage, RENDER_MODE_NORMAL)) {
Debug::log(ERR, "renderer: couldn't beginRender()!");
if (UNLOCK_SC)
wlr_output_lock_software_cursors(pMonitor->output, false);
return;
}
EMIT_HOOK_EVENT("render", RENDER_BEGIN);