Get rid of duplicate function gfx_display_draw_blend

This commit is contained in:
twinaphex 2020-09-22 04:13:53 +02:00
parent bde4abfe8b
commit 77abaac79c
3 changed files with 3 additions and 27 deletions

View File

@ -734,26 +734,6 @@ void gfx_display_draw(gfx_display_ctx_draw_t *draw,
dispctx->draw(draw, data, video_width, video_height);
}
void gfx_display_draw_blend(
gfx_display_ctx_draw_t *draw,
void *data,
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)
return;
if (draw->height <= 0)
return;
if (draw->width <= 0)
return;
gfx_display_blend_begin(data);
dispctx->draw(draw, data, video_width, video_height);
gfx_display_blend_end(data);
}
void gfx_display_draw_pipeline(
gfx_display_ctx_draw_t *draw,
void *userdata,

View File

@ -278,12 +278,6 @@ void gfx_display_draw(gfx_display_ctx_draw_t *draw,
unsigned video_width,
unsigned video_height);
void gfx_display_draw_blend(
gfx_display_ctx_draw_t *draw,
void *data,
unsigned video_width,
unsigned video_height);
void gfx_display_draw_keyboard(
void *userdata,
unsigned video_width,

View File

@ -692,8 +692,10 @@ static void gfx_widgets_draw_icon_blend(
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
draw.pipeline_id = 0;
gfx_display_draw_blend(&draw, userdata,
gfx_display_blend_begin(userdata);
gfx_display_draw(&draw, userdata,
video_width, video_height);
gfx_display_blend_end(userdata);
}
#endif