[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)->onMouseShape && \
(x)->onMouseEvent && \ (x)->onMouseEvent && \
(x)->renderStartup && \ (x)->renderStartup && \
(x)->needsRender && \
(x)->render && \ (x)->render && \
(x)->createTexture && \
(x)->freeTexture && \
(x)->spiceConfigure && \ (x)->spiceConfigure && \
(x)->spiceDrawFill && \ (x)->spiceDrawFill && \
(x)->spiceDrawBitmap && \ (x)->spiceDrawBitmap && \
@ -162,10 +163,6 @@ typedef struct LG_RendererOps
* Context: renderThread */ * Context: renderThread */
bool (*renderStartup)(LG_Renderer * renderer, bool useDMA); 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 /* called to render the scene
* Context: renderThread */ * Context: renderThread */
bool (*render)(LG_Renderer * renderer, LG_RendererRotate rotate, 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; 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) inline static EGLint egl_bufferAge(struct Inst * this)
{ {
if (!this->hasBufferAge) if (!this->hasBufferAge)
@ -1235,7 +1229,6 @@ struct LG_RendererOps LGR_EGL =
.onFrameFormat = egl_onFrameFormat, .onFrameFormat = egl_onFrameFormat,
.onFrame = egl_onFrame, .onFrame = egl_onFrame,
.renderStartup = egl_renderStartup, .renderStartup = egl_renderStartup,
.needsRender = egl_needsRender,
.render = egl_render, .render = egl_render,
.createTexture = egl_createTexture, .createTexture = egl_createTexture,
.freeTexture = egl_freeTexture, .freeTexture = egl_freeTexture,

View file

@ -473,12 +473,6 @@ bool opengl_renderStartup(LG_Renderer * renderer, bool useDMA)
return true; 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, bool opengl_render(LG_Renderer * renderer, LG_RendererRotate rotate, const bool newFrame,
const bool invalidateWindow, void (*preSwap)(void * udata), void * udata) const bool invalidateWindow, void (*preSwap)(void * udata), void * udata)
{ {
@ -694,7 +688,6 @@ const LG_RendererOps LGR_OpenGL =
.onFrameFormat = opengl_onFrameFormat, .onFrameFormat = opengl_onFrameFormat,
.onFrame = opengl_onFrame, .onFrame = opengl_onFrame,
.renderStartup = opengl_renderStartup, .renderStartup = opengl_renderStartup,
.needsRender = opengl_needsRender,
.render = opengl_render, .render = opengl_render,
.createTexture = opengl_createTexture, .createTexture = opengl_createTexture,
.freeTexture = opengl_freeTexture, .freeTexture = opengl_freeTexture,

View file

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