Allow a renderer to opt-out of the render thread and use that for SDL on OGL
This commit is contained in:
parent
6783cf57da
commit
859a5a5e0c
17 changed files with 134 additions and 79 deletions
|
|
@ -62,7 +62,7 @@ bool SdlRenderer::prepareDecoderContext(AVCodecContext*)
|
|||
/* Nothing to do */
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Using SDL software renderer");
|
||||
"Using SDL renderer");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -126,6 +126,24 @@ void SdlRenderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
|||
}
|
||||
}
|
||||
|
||||
bool SdlRenderer::isRenderThreadSupported()
|
||||
{
|
||||
SDL_RendererInfo info;
|
||||
SDL_GetRendererInfo(m_Renderer, &info);
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"SDL renderer backend: %s",
|
||||
info.name);
|
||||
|
||||
if (info.name != QString("direct3d")) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"SDL renderer backend requires main thread rendering");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SdlRenderer::initialize(SDL_Window* window,
|
||||
int,
|
||||
int width,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue