Queries the live swapchain format and caches surface traits. Throws std::invalid_argument if container is not a WindowContainer.
15{
16 auto wc = std::dynamic_pointer_cast<WindowContainer>(container);
17 if (!wc) {
18 error<std::invalid_argument>(
21 std::source_location::current(),
22 "WindowAccessProcessor requires a WindowContainer");
23 }
24
25 const auto& s = wc->get_structure();
26 m_width =
static_cast<uint32_t
>(s.get_width());
27 m_height =
static_cast<uint32_t
>(s.get_height());
28
30
32 wc->get_window()->set_capture_enabled(true);
34 "WindowAccessProcessor: capture was not enabled for '{}'; enabling now",
35 wc->get_window()->get_create_info().title);
36 }
37
39
42
43 container->mark_ready_for_processing(true);
44
46 "WindowAccessProcessor attached: {}x{} format={} bpp={}",
49 bpp);
50}
#define MF_INFO(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
Core::GraphicsSurfaceInfo::SurfaceFormat m_surface_format
bool m_previous_window_capture_supported
vk::Format to_vk_format(GraphicsSurfaceInfo::SurfaceFormat fmt)
uint32_t vk_format_bytes_per_pixel(vk::Format fmt)
Byte width of a single pixel for a given Vulkan format.
@ ContainerProcessing
Container operations (Kakshya - file/stream/region processing)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.
Core::GraphicsSurfaceInfo::SurfaceFormat query_surface_format(const std::shared_ptr< Core::Window > &window)
Query the actual vk::Format in use by the window's live swapchain, translated back to the MayaFlux su...