(Metal raster font) remove video_frame_info dep

This commit is contained in:
twinaphex 2020-03-10 02:02:19 +01:00
parent 083a0453c6
commit f2df63e246
2 changed files with 7 additions and 5 deletions

View File

@ -89,9 +89,10 @@ static void *metal_init(
}
static bool metal_frame(void *data, const void *frame,
unsigned frame_width, unsigned frame_height,
uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
unsigned frame_width, unsigned frame_height,
uint64_t frame_count,
unsigned pitch, const char *msg,
video_frame_info_t *video_info)
{
MetalDriver *md = (__bridge MetalDriver *)data;
return [md renderFrame:frame

View File

@ -524,8 +524,9 @@ static void metal_raster_font_render_msg(
const struct font_params *params)
{
MetalRaster *r = (__bridge MetalRaster *)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
MetalDriver *md = (__bridge MetalDriver *)r->_driver;
unsigned width = md->_viewport->full_width;
unsigned height = md->_viewport->full_height;
[r renderMessage:msg width:width height:height params:params];
}