Fix render worker reuse and stabilize out-of-process video rendering
This commit is contained in:
@@ -97,7 +97,12 @@ bool DynamicRenderer::Load()
|
||||
return false;
|
||||
}
|
||||
|
||||
handle_ = create_(this->parent());
|
||||
// Pass this (rather than this->parent()) so the backend renderer becomes a
|
||||
// child QObject of the adapter. That ensures it follows DynamicRenderer when
|
||||
// the latter is moved to the render thread; otherwise it stays in the thread
|
||||
// where Load() was called and every GL operation is rejected as "wrong
|
||||
// thread", producing a black screen.
|
||||
handle_ = create_(this);
|
||||
if (!handle_) {
|
||||
library_.unload();
|
||||
return false;
|
||||
@@ -319,6 +324,11 @@ bool DynamicRenderer::IsOpenGL() const
|
||||
return backend_ == QStringLiteral("opengl");
|
||||
}
|
||||
|
||||
bool DynamicRenderer::IsVulkan() const
|
||||
{
|
||||
return backend_ == QStringLiteral("vulkan");
|
||||
}
|
||||
|
||||
// Dispatches a shader blit to the loaded backend.
|
||||
void DynamicRenderer::Blit(QVariant shader, AcceleratedJob &job,
|
||||
Texture *destination, VideoParams destination_params,
|
||||
|
||||
Reference in New Issue
Block a user