aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render
diff options
context:
space:
mode:
authorIkalco <[email protected]>2024-08-31 08:07:52 -0500
committerGitHub <[email protected]>2024-08-31 15:07:52 +0200
commit838ed87d6ffae0dbdc8a3ecaac2c8be006f6d053 (patch)
treed7d37c307663aef82efa7340378d5763542e74cd /src/render
parent76b82fdde7d3f38cb70db0bec3318a7fb6c27a0c (diff)
downloadHyprland-838ed87d6ffae0dbdc8a3ecaac2c8be006f6d053.tar.gz
Hyprland-838ed87d6ffae0dbdc8a3ecaac2c8be006f6d053.zip
renderer: minor direct scanout fixes (#7594)
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Renderer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index c5866e4a..27fde129 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1277,7 +1277,8 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
pMonitor->lastScanout.reset();
// reset DRM format, make sure it's the one we want.
- pMonitor->output->state->setFormat(pMonitor->drmFormat);
+ pMonitor->output->state->setFormat(pMonitor->prevDrmFormat);
+ pMonitor->drmFormat = pMonitor->prevDrmFormat;
}
}
@@ -1978,7 +1979,8 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
pMonitor->currentMode = nullptr;
pMonitor->output->state->setFormat(DRM_FORMAT_XRGB8888);
- pMonitor->drmFormat = DRM_FORMAT_XRGB8888;
+ pMonitor->prevDrmFormat = pMonitor->drmFormat;
+ pMonitor->drmFormat = DRM_FORMAT_XRGB8888;
pMonitor->output->state->resetExplicitFences();
bool autoScale = false;
@@ -2219,7 +2221,8 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
for (auto const& fmt : formats[(int)!RULE->enable10bit]) {
pMonitor->output->state->setFormat(fmt.second);
- pMonitor->drmFormat = fmt.second;
+ pMonitor->prevDrmFormat = pMonitor->drmFormat;
+ pMonitor->drmFormat = fmt.second;
if (!pMonitor->state.test()) {
Debug::log(ERR, "output {} failed basic test on format {}", pMonitor->szName, fmt.first);