[client] interface: remove needsRender from renderers

This commit is contained in:
Geoffrey McRae 2022-05-27 14:38:42 +10:00
parent a4f5bc7320
commit fba7c80b2f
4 changed files with 3 additions and 21 deletions

View File

@ -36,8 +36,9 @@
(x)->onMouseShape && \
(x)->onMouseEvent && \
(x)->renderStartup && \
(x)->needsRender && \
(x)->render && \
(x)->createTexture && \
(x)->freeTexture && \
(x)->spiceConfigure && \
(x)->spiceDrawFill && \
(x)->spiceDrawBitmap && \
@ -162,10 +163,6 @@ typedef struct LG_RendererOps
* Context: renderThread */
bool (*renderStartup)(LG_Renderer * renderer, bool useDMA);
/* returns if the render method must be called even if nothing has changed.
* Context: renderThread */
bool (*needsRender)(LG_Renderer * renderer);
/* called to render the scene
* Context: renderThread */
bool (*render)(LG_Renderer * renderer, LG_RendererRotate rotate,

View File

@ -936,12 +936,6 @@ static bool egl_renderStartup(LG_Renderer * renderer, bool useDMA)
return true;
}
static bool egl_needsRender(LG_Renderer * renderer)
{
//struct Inst * this = UPCAST(struct Inst, renderer);
return false;
}
inline static EGLint egl_bufferAge(struct Inst * this)
{
if (!this->hasBufferAge)
@ -1235,7 +1229,6 @@ struct LG_RendererOps LGR_EGL =
.onFrameFormat = egl_onFrameFormat,
.onFrame = egl_onFrame,
.renderStartup = egl_renderStartup,
.needsRender = egl_needsRender,
.render = egl_render,
.createTexture = egl_createTexture,
.freeTexture = egl_freeTexture,

View File

@ -473,12 +473,6 @@ bool opengl_renderStartup(LG_Renderer * renderer, bool useDMA)
return true;
}
static bool opengl_needsRender(LG_Renderer * renderer)
{
// struct Inst * this = UPCAST(struct Inst, renderer);
return false;
}
bool opengl_render(LG_Renderer * renderer, LG_RendererRotate rotate, const bool newFrame,
const bool invalidateWindow, void (*preSwap)(void * udata), void * udata)
{
@ -694,7 +688,6 @@ const LG_RendererOps LGR_OpenGL =
.onFrameFormat = opengl_onFrameFormat,
.onFrame = opengl_onFrame,
.renderStartup = opengl_renderStartup,
.needsRender = opengl_needsRender,
.render = opengl_render,
.createTexture = opengl_createTexture,
.freeTexture = opengl_freeTexture,

View File

@ -223,8 +223,7 @@ static int renderThread(void * unused)
if (!lgResetEvent(g_state.frameEvent)
&& !forceRender
&& !pending
&& !app_overlayNeedsRender()
&& !RENDERER(needsRender))
&& !app_overlayNeedsRender())
{
if (g_state.ds->skipFrame)
g_state.ds->skipFrame();