Skip to content

Commit

Permalink
drm: moved null check for renderer to shouldBlit() (hyprwm#109) (hypr…
Browse files Browse the repository at this point in the history
  • Loading branch information
richen604 authored and UjinT34 committed Jan 7, 2025
1 parent 65cb916 commit ed142be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/backend/drm/DRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1419,11 +1419,6 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) {
return false;
}

if (!backend->rendererState.renderer) {
backend->backend->log(AQ_LOG_ERROR, "drm: No renderer attached to backend");
return false;
}

const auto& STATE = state->state();
const uint32_t COMMITTED = STATE.committed;

Expand Down Expand Up @@ -1522,6 +1517,11 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) {
SP<CDRMFB> drmFB;

if (backend->shouldBlit()) {
if (!backend->rendererState.renderer) {
backend->backend->log(AQ_LOG_ERROR, "drm: No renderer attached to backend when required for blitting");
return false;
}

TRACE(backend->backend->log(AQ_LOG_TRACE, "drm: Backend requires blit, blitting"));

if (!mgpu.swapchain) {
Expand Down

0 comments on commit ed142be

Please sign in to comment.