From fba7c80b2f7fd134a956aaab4d88b8e7b1b4b294 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 27 May 2022 14:38:42 +1000 Subject: [PATCH] [client] interface: remove needsRender from renderers --- client/include/interface/renderer.h | 7 ++----- client/renderers/EGL/egl.c | 7 ------- client/renderers/OpenGL/opengl.c | 7 ------- client/src/main.c | 3 +-- 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/client/include/interface/renderer.h b/client/include/interface/renderer.h index 10434247..b074e496 100644 --- a/client/include/interface/renderer.h +++ b/client/include/interface/renderer.h @@ -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, diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 4597ac55..94f11011 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -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, diff --git a/client/renderers/OpenGL/opengl.c b/client/renderers/OpenGL/opengl.c index 1f8c7a24..c3c62ce3 100644 --- a/client/renderers/OpenGL/opengl.c +++ b/client/renderers/OpenGL/opengl.c @@ -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, diff --git a/client/src/main.c b/client/src/main.c index edb884fc..2154ad11 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -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();