Get rid of gfx_display_draw_pipeline

This commit is contained in:
twinaphex 2020-09-23 21:56:48 +02:00
parent 557b445b27
commit 4fb2065061
3 changed files with 5 additions and 31 deletions

View File

@ -706,27 +706,9 @@ void gfx_display_draw(gfx_display_ctx_draw_t *draw,
{ {
gfx_display_t *p_disp = disp_get_ptr(); gfx_display_t *p_disp = disp_get_ptr();
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx; gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
if (!dispctx || !draw || !dispctx->draw) if (draw && draw->height > 0 && draw->width > 0)
return; if (dispctx && dispctx->draw)
dispctx->draw(draw, data, video_width, video_height);
if (draw->height <= 0)
return;
if (draw->width <= 0)
return;
dispctx->draw(draw, data, video_width, video_height);
}
void gfx_display_draw_pipeline(
gfx_display_ctx_draw_t *draw,
void *userdata,
unsigned video_width,
unsigned video_height)
{
gfx_display_t *p_disp = disp_get_ptr();
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
if (dispctx && draw && dispctx->draw_pipeline)
dispctx->draw_pipeline(draw, userdata,
video_width, video_height);
} }
void gfx_display_draw_bg(gfx_display_ctx_draw_t *draw, void gfx_display_draw_bg(gfx_display_ctx_draw_t *draw,

View File

@ -283,12 +283,6 @@ void gfx_display_draw_keyboard(
char *grid[], unsigned id, char *grid[], unsigned id,
unsigned text_color); unsigned text_color);
void gfx_display_draw_pipeline(
gfx_display_ctx_draw_t *draw,
void *userdata,
unsigned video_width,
unsigned video_height);
void gfx_display_draw_bg( void gfx_display_draw_bg(
gfx_display_ctx_draw_t *draw, gfx_display_ctx_draw_t *draw,
void *userdata, void *userdata,

View File

@ -4083,10 +4083,8 @@ static void xmb_draw_bg(
break; break;
} }
gfx_display_draw_pipeline(&draw, if (dispctx && dispctx->draw_pipeline)
userdata, dispctx->draw_pipeline(&draw, userdata, video_width, video_height);
video_width,
video_height);
} }
else else
#endif #endif