mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 12:06:00 +01:00
renderer: block screen shader on screencopy
This commit is contained in:
parent
10146f5ec5
commit
d605e47511
4 changed files with 7 additions and 1 deletions
|
@ -504,6 +504,7 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec*
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
|
||||||
g_pHyprRenderer->endRender();
|
g_pHyprRenderer->endRender();
|
||||||
|
|
||||||
g_pHyprRenderer->makeEGLCurrent();
|
g_pHyprRenderer->makeEGLCurrent();
|
||||||
|
@ -551,6 +552,7 @@ bool CScreencopyProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame) {
|
||||||
g_pHyprOpenGL->setRenderModifEnabled(true);
|
g_pHyprOpenGL->setRenderModifEnabled(true);
|
||||||
g_pHyprOpenGL->setMonitorTransformEnabled(false);
|
g_pHyprOpenGL->setMonitorTransformEnabled(false);
|
||||||
|
|
||||||
|
g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
|
||||||
g_pHyprRenderer->endRender();
|
g_pHyprRenderer->endRender();
|
||||||
|
|
||||||
wlr_texture_destroy(sourceTex);
|
wlr_texture_destroy(sourceTex);
|
||||||
|
|
|
@ -402,6 +402,7 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
|
||||||
g_pHyprRenderer->endRender();
|
g_pHyprRenderer->endRender();
|
||||||
|
|
||||||
g_pHyprRenderer->makeEGLCurrent();
|
g_pHyprRenderer->makeEGLCurrent();
|
||||||
|
@ -441,6 +442,7 @@ bool CToplevelExportProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame, ti
|
||||||
if (frame->overlayCursor)
|
if (frame->overlayCursor)
|
||||||
g_pHyprRenderer->renderSoftwareCursors(PMONITOR, fakeDamage, g_pInputManager->getMouseCoordsInternal() - frame->pWindow->m_vRealPosition.value());
|
g_pHyprRenderer->renderSoftwareCursors(PMONITOR, fakeDamage, g_pInputManager->getMouseCoordsInternal() - frame->pWindow->m_vRealPosition.value());
|
||||||
|
|
||||||
|
g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
|
||||||
g_pHyprRenderer->endRender();
|
g_pHyprRenderer->endRender();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,7 +365,7 @@ void CHyprOpenGLImpl::end() {
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bEndFrame = true;
|
m_bEndFrame = true;
|
||||||
m_bApplyFinalShader = true;
|
m_bApplyFinalShader = !m_RenderData.blockScreenShader;
|
||||||
if (m_RenderData.mouseZoomUseMouse)
|
if (m_RenderData.mouseZoomUseMouse)
|
||||||
m_RenderData.useNearestNeighbor = true;
|
m_RenderData.useNearestNeighbor = true;
|
||||||
|
|
||||||
|
@ -388,6 +388,7 @@ void CHyprOpenGLImpl::end() {
|
||||||
m_RenderData.mouseZoomFactor = 1.f;
|
m_RenderData.mouseZoomFactor = 1.f;
|
||||||
m_RenderData.mouseZoomUseMouse = true;
|
m_RenderData.mouseZoomUseMouse = true;
|
||||||
m_RenderData.forceIntrospection = false;
|
m_RenderData.forceIntrospection = false;
|
||||||
|
m_RenderData.blockScreenShader = false;
|
||||||
m_RenderData.currentFB = nullptr;
|
m_RenderData.currentFB = nullptr;
|
||||||
m_RenderData.mainFB = nullptr;
|
m_RenderData.mainFB = nullptr;
|
||||||
m_RenderData.outFB = nullptr;
|
m_RenderData.outFB = nullptr;
|
||||||
|
|
|
@ -112,6 +112,7 @@ struct SCurrentRenderData {
|
||||||
bool mouseZoomUseMouse = true; // true by default
|
bool mouseZoomUseMouse = true; // true by default
|
||||||
bool useNearestNeighbor = false;
|
bool useNearestNeighbor = false;
|
||||||
bool forceIntrospection = false; // cleaned in ::end()
|
bool forceIntrospection = false; // cleaned in ::end()
|
||||||
|
bool blockScreenShader = false;
|
||||||
|
|
||||||
Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1);
|
Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1);
|
||||||
Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1);
|
Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1);
|
||||||
|
|
Loading…
Reference in a new issue