Skip to content

Commit e710c4a

Browse files
committed
vulkan: re-render last frame
When no video is arriving, the resized window doesn't have defined content. Moreover, if using Wayland, the window change of fullscreen is not applied at until next refresh (new frame in this case).
1 parent c69d5e3 commit e710c4a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/video_display/vulkan/vulkan_display.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,15 @@ void VulkanDisplay::window_parameters_changed(WindowParameters new_parameters) {
652652
auto render_area_size = context.get_render_area_size();
653653
render_pipeline.update_render_area(render_area_size, current_image_description.size);
654654
}
655+
656+
// re-render some recent image for the case that no video is arriving:
657+
// 1. to have defined content
658+
// 2. with Wayland, to perform the changes (without content refresh, the
659+
// window isn't resized)
660+
auto *last_image = available_img_queue.try_pop();
661+
if (last_image != nullptr) {
662+
queue_image(TransferImage{ *last_image }, true);
663+
}
655664
}
656665

657666
std::string

0 commit comments

Comments
 (0)