The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/multi: Implement xrt_multi_compositor_control::notify_surface_lost

authored by

Jarvis Huang and committed by
Jakob Bornecrantz
971947f7 aa9c559f

+35
+35
src/xrt/compositor/multi/comp_multi_system.c
··· 591 591 return XRT_SUCCESS; 592 592 } 593 593 594 + static xrt_result_t 595 + system_compositor_notify_loss_pending(struct xrt_system_compositor *xsc, 596 + struct xrt_compositor *xc, 597 + uint64_t loss_time_ns) 598 + { 599 + struct multi_system_compositor *msc = multi_system_compositor(xsc); 600 + struct multi_compositor *mc = multi_compositor(xc); 601 + (void)msc; 602 + 603 + union xrt_compositor_event xce = XRT_STRUCT_INIT; 604 + xce.type = XRT_COMPOSITOR_EVENT_LOSS_PENDING; 605 + xce.loss_pending.loss_time_ns = loss_time_ns; 606 + 607 + multi_compositor_push_event(mc, &xce); 608 + 609 + return XRT_SUCCESS; 610 + } 611 + 612 + static xrt_result_t 613 + system_compositor_notify_lost(struct xrt_system_compositor *xsc, struct xrt_compositor *xc) 614 + { 615 + struct multi_system_compositor *msc = multi_system_compositor(xsc); 616 + struct multi_compositor *mc = multi_compositor(xc); 617 + (void)msc; 618 + 619 + union xrt_compositor_event xce = XRT_STRUCT_INIT; 620 + xce.type = XRT_COMPOSITOR_EVENT_LOST; 621 + 622 + multi_compositor_push_event(mc, &xce); 623 + 624 + return XRT_SUCCESS; 625 + } 626 + 594 627 595 628 /* 596 629 * ··· 664 697 msc->xmcc.set_state = system_compositor_set_state; 665 698 msc->xmcc.set_z_order = system_compositor_set_z_order; 666 699 msc->xmcc.set_main_app_visibility = system_compositor_set_main_app_visibility; 700 + msc->xmcc.notify_loss_pending = system_compositor_notify_loss_pending; 701 + msc->xmcc.notify_lost = system_compositor_notify_lost; 667 702 msc->base.xmcc = &msc->xmcc; 668 703 msc->base.info = *xsci; 669 704 msc->upaf = upaf;