[client] renderers: add new needs_render method to the interface

With jitRender the renderer needs to tell the main application if it
needs to be rendererd, such as during the initial splash screen fade
out.
This commit is contained in:
Geoffrey McRae
2021-08-01 18:18:08 +10:00
parent 2d74c93232
commit f8e1ab8f31
3 changed files with 17 additions and 0 deletions

View File

@@ -805,6 +805,12 @@ static bool egl_render_startup(void * opaque)
return true;
}
static bool egl_needs_render(void * opaque)
{
struct Inst * this = (struct Inst *)opaque;
return !this->waitDone;
}
static bool egl_render(void * opaque, LG_RendererRotate rotate, const bool newFrame,
const bool invalidateWindow)
{
@@ -1007,5 +1013,6 @@ struct LG_Renderer LGR_EGL =
.on_frame_format = egl_on_frame_format,
.on_frame = egl_on_frame,
.render_startup = egl_render_startup,
.needs_render = egl_needs_render,
.render = egl_render
};