From 4fb20650617e47ea4134b86a1124f63f515e654a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 23 Sep 2020 21:56:48 +0200 Subject: [PATCH] Get rid of gfx_display_draw_pipeline --- gfx/gfx_display.c | 24 +++--------------------- gfx/gfx_display.h | 6 ------ menu/drivers/xmb.c | 6 ++---- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/gfx/gfx_display.c b/gfx/gfx_display.c index ae12950170..0df40b79ef 100644 --- a/gfx/gfx_display.c +++ b/gfx/gfx_display.c @@ -706,27 +706,9 @@ void gfx_display_draw(gfx_display_ctx_draw_t *draw, { gfx_display_t *p_disp = disp_get_ptr(); gfx_display_ctx_driver_t *dispctx = p_disp->dispctx; - if (!dispctx || !draw || !dispctx->draw) - return; - - 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); + if (draw && draw->height > 0 && draw->width > 0) + if (dispctx && dispctx->draw) + dispctx->draw(draw, data, video_width, video_height); } void gfx_display_draw_bg(gfx_display_ctx_draw_t *draw, diff --git a/gfx/gfx_display.h b/gfx/gfx_display.h index e3d5cad258..48ae66d347 100644 --- a/gfx/gfx_display.h +++ b/gfx/gfx_display.h @@ -283,12 +283,6 @@ void gfx_display_draw_keyboard( char *grid[], unsigned id, 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( gfx_display_ctx_draw_t *draw, void *userdata, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 7f7954e301..820d47021d 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -4083,10 +4083,8 @@ static void xmb_draw_bg( break; } - gfx_display_draw_pipeline(&draw, - userdata, - video_width, - video_height); + if (dispctx && dispctx->draw_pipeline) + dispctx->draw_pipeline(&draw, userdata, video_width, video_height); } else #endif