Don't implement bind_block/flush_block for drivers that

don't implement it
This commit is contained in:
twinaphex 2018-07-15 20:16:09 +02:00
parent 5159f71cf5
commit eb345019c2
11 changed files with 13 additions and 77 deletions

View File

@ -129,18 +129,13 @@ static void caca_render_msg(video_frame_info_t *video_info,
caca_refresh_display(*font->caca->caca_display);
}
static void caca_font_bind_block(void* data, void* userdata)
{
(void)data;
}
font_renderer_t caca_font = {
caca_init_font,
caca_render_free_font,
caca_render_msg,
"caca font",
caca_font_get_glyph, /* get_glyph */
caca_font_bind_block, /* bind_block */
NULL, /* bind_block */
NULL, /* flush */
caca_get_message_width /* get_message_width */
};

View File

@ -447,12 +447,6 @@ static const struct font_glyph* ctr_font_get_glyph(
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void ctr_font_bind_block(void* data, void* userdata)
{
(void)data;
}
font_renderer_t ctr_font =
{
ctr_font_init_font,
@ -460,7 +454,7 @@ font_renderer_t ctr_font =
ctr_font_render_msg,
"ctrfont",
ctr_font_get_glyph,
ctr_font_bind_block,
NULL, /* bind_block */
NULL, /* flush_block */
ctr_font_get_message_width,
};

View File

@ -362,18 +362,13 @@ static const struct font_glyph* d3d10_font_get_glyph(void *data, uint32_t code)
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void d3d10_font_bind_block(void* data, void *userdata)
{
(void)data;
}
font_renderer_t d3d10_font = {
d3d10_font_init_font,
d3d10_font_free_font,
d3d10_font_render_msg,
"d3d10font",
d3d10_font_get_glyph,
d3d10_font_bind_block,
NULL, /* bind_block */
NULL, /* flush */
d3d10_font_get_message_width,
};

View File

@ -359,18 +359,13 @@ static const struct font_glyph* d3d11_font_get_glyph(void *data, uint32_t code)
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void d3d11_font_bind_block(void* data, void *userdata)
{
(void)data;
}
font_renderer_t d3d11_font = {
d3d11_font_init_font,
d3d11_font_free_font,
d3d11_font_render_msg,
"d3d11font",
d3d11_font_get_glyph,
d3d11_font_bind_block,
NULL, /* bind_block */
NULL, /* flush */
d3d11_font_get_message_width,
};

View File

@ -376,18 +376,13 @@ static const struct font_glyph* d3d12_font_get_glyph(
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void d3d12_font_bind_block(void* data, void* userdata)
{
(void)data;
}
font_renderer_t d3d12_font = {
d3d12_font_init_font,
d3d12_font_free_font,
d3d12_font_render_msg,
"d3d12font",
d3d12_font_get_glyph,
d3d12_font_bind_block,
NULL, /* bind_block */
NULL, /* flush */
d3d12_font_get_message_width,
};

View File

@ -529,7 +529,7 @@ static const struct font_glyph *metal_raster_font_get_glyph(
}
static void metal_raster_font_flush_block(unsigned width, unsigned height,
void *data, video_frame_info_t *video_info)
void *data, video_frame_info_t *video_info)
{
(void)data;
}

View File

@ -127,24 +127,13 @@ static void sixel_render_msg(video_frame_info_t *video_info,
/* FIXME: add text drawing support */
}
static void sixel_font_flush_block(unsigned width, unsigned height,
void* data)
{
(void)data;
}
static void sixel_font_bind_block(void* data, void* userdata)
{
(void)data;
}
font_renderer_t sixel_font = {
sixel_init_font,
sixel_render_free_font,
sixel_render_msg,
"sixel font",
sixel_font_get_glyph, /* get_glyph */
sixel_font_bind_block, /* bind_block */
sixel_font_flush_block, /* flush */
NULL, /* bind_block */
NULL, /* flush */
sixel_get_message_width /* get_message_width */
};

View File

@ -126,18 +126,13 @@ static void vga_render_msg(video_frame_info_t *video_info,
}
}
static void vga_font_bind_block(void* data, void* userdata)
{
(void)data;
}
font_renderer_t vga_font = {
vga_init_font,
vga_render_free_font,
vga_render_msg,
"vga font",
vga_font_get_glyph, /* get_glyph */
vga_font_bind_block, /* bind_block */
NULL, /* bind_block */
NULL, /* flush */
vga_get_message_width /* get_message_width */
};

View File

@ -347,18 +347,13 @@ static const struct font_glyph *vita2d_font_get_glyph(
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void vita2d_font_bind_block(void *data, void *userdata)
{
(void)data;
}
font_renderer_t vita2d_vita_font = {
vita2d_font_init_font,
vita2d_font_free_font,
vita2d_font_render_msg,
"vita2dfont",
vita2d_font_get_glyph,
vita2d_font_bind_block,
NULL, /* bind_block */
NULL, /* flush */
vita2d_font_get_message_width,
};

View File

@ -436,24 +436,13 @@ static const struct font_glyph *vulkan_raster_font_get_glyph(
return glyph;
}
static void vulkan_raster_font_flush_block(unsigned width, unsigned height,
void *data, video_frame_info_t *video_info)
{
(void)data;
}
static void vulkan_raster_font_bind_block(void *data, void *userdata)
{
(void)data;
}
font_renderer_t vulkan_raster_font = {
vulkan_raster_font_init_font,
vulkan_raster_font_free_font,
vulkan_raster_font_render_msg,
"Vulkan raster",
vulkan_raster_font_get_glyph,
vulkan_raster_font_bind_block,
vulkan_raster_font_flush_block,
NULL, /* bind_block */
NULL, /* flush_block */
vulkan_get_message_width
};

View File

@ -377,12 +377,6 @@ static const struct font_glyph* wiiu_font_get_glyph(
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void wiiu_font_bind_block(void* data, void* userdata)
{
(void)data;
}
font_renderer_t wiiu_font =
{
wiiu_font_init_font,
@ -390,7 +384,7 @@ font_renderer_t wiiu_font =
wiiu_font_render_msg,
"wiiufont",
wiiu_font_get_glyph,
wiiu_font_bind_block,
NULL, /* bind_block */
NULL, /* flush */
wiiu_font_get_message_width,
};