From e90464fbac22e89d67f5b79b1358918507477933 Mon Sep 17 00:00:00 2001 From: Craig Holliday Date: Thu, 7 Mar 2024 13:06:41 -0700 Subject: [PATCH] vulkan/context: trying these events for resizing the window --- video/out/vo.c | 3 +++ video/out/vo_gpu_next.c | 7 +++++++ video/out/vulkan/context_moltenvk.m | 1 + 3 files changed, 11 insertions(+) diff --git a/video/out/vo.c b/video/out/vo.c index 50129fb306b36..043990c3cdd2f 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -1340,11 +1340,14 @@ double vo_get_display_fps(struct vo *vo) // vo_query_and_reset_events() can retrieve the events again. void vo_event(struct vo *vo, int event) { + MP_VERBOSE(vo, "### 1343 - vo.c: %d\n", event); struct vo_internal *in = vo->in; mp_mutex_lock(&in->lock); if ((in->queued_events & event & VO_EVENTS_USER) != (event & VO_EVENTS_USER)) + MP_VERBOSE(vo, "### 1347 - vo.c: %d\n", event); wakeup_core(vo); if (event) + MP_VERBOSE(vo, "### 1350 - vo.c: %d\n", event); wakeup_locked(vo); in->queued_events |= event; in->internal_events |= event; diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 1dc1b181ae8c6..cbe10adf62516 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1141,20 +1141,27 @@ static int query_format(struct vo *vo, int format) static void resize(struct vo *vo) { + MP_VERBOSE(vo, "### vo_gpu_next.c 1144: %dx%d)\n", vo->dwidth, vo->dheight); + struct priv *p = vo->priv; struct mp_rect src, dst; struct mp_osd_res osd; vo_get_src_dst_rects(vo, &src, &dst, &osd); if (vo->dwidth && vo->dheight) { + MP_VERBOSE(vo, "### vo_gpu_next.c 1151: %dx%d)\n", vo->dwidth, vo->dheight); gpu_ctx_resize(p->context, vo->dwidth, vo->dheight); vo->want_redraw = true; } + MP_VERBOSE(vo, "### vo_gpu_next.c 1156 - mp_rect_equals(&p->src, &src): %s\n", mp_rect_equals(&p->src, &src) ? "true" : "false"); + MP_VERBOSE(vo, "### vo_gpu_next.c 1156 - mp_rect_equals(&p->dst, &dst): %s\n", mp_rect_equals(&p->dst, &dst) ? "true" : "false"); + MP_VERBOSE(vo, "### vo_gpu_next.c 1156 - osd_res_equals(p->osd_res, osd): %s\n", osd_res_equals(p->osd_res, osd) ? "true" : "false"); if (mp_rect_equals(&p->src, &src) && mp_rect_equals(&p->dst, &dst) && osd_res_equals(p->osd_res, osd)) return; + MP_VERBOSE(vo, "### vo_gpu_next.c 1161: %dx%d)\n", vo->dwidth, vo->dheight); p->osd_sync++; p->osd_res = osd; p->src = src; diff --git a/video/out/vulkan/context_moltenvk.m b/video/out/vulkan/context_moltenvk.m index 777c628487e88..f906076d24776 100644 --- a/video/out/vulkan/context_moltenvk.m +++ b/video/out/vulkan/context_moltenvk.m @@ -113,6 +113,7 @@ static bool moltenvk_reconfig(struct ra_ctx *ctx) vo_event(ctx->vo, VO_EVENT_RESIZE); vo_event(ctx->vo, VO_EVENT_EXPOSE); vo_event(ctx->vo, VO_EVENT_WIN_STATE); + vo_wakeup(ctx->vo); MP_MSG(ctx, MSGL_V, "Width: %f, Height: %f ### Called resize\n", s.width, s.height); return true; }