diff options
-rw-r--r-- | src/plugins/renderers/rhi/renderer/renderer.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/plugins/renderers/rhi/renderer/renderer.cpp b/src/plugins/renderers/rhi/renderer/renderer.cpp index 81d1194f3..aa18f093e 100644 --- a/src/plugins/renderers/rhi/renderer/renderer.cpp +++ b/src/plugins/renderers/rhi/renderer/renderer.cpp @@ -680,17 +680,7 @@ void Renderer::render(bool swapBuffers) rhiPassesInfo = prepareCommandsSubmission(renderViews); // 2) Update Pipelines and copy data into commands to allow concurrent submission - bool hasCommands = false; - for (const RenderView *rv : renderViews) { - // TODO find a way to break earlier with this pattern. - rv->forEachCommand([&] (const RenderCommand &cmd) { - hasCommands |= cmd.isValid(); - }); - if (hasCommands) - break; - } - - if (hasCommands) { + { // Scoped to destroy surfaceLock SurfaceLocker surfaceLock(surface); const bool surfaceIsValid = (surface && surfaceLock.isSurfaceValid()); |