@ -876,31 +876,6 @@ void wlr_scene_render_output(struct wlr_scene *scene, struct wlr_output *output,
pixman_region32_fini ( & full_region ) ;
}
static void scene_send_frame_done_iterator ( struct wlr_scene_node * node ,
struct wlr_output * output , struct timespec * now ) {
if ( ! node - > state . enabled ) {
return ;
}
if ( node - > type = = WLR_SCENE_NODE_SURFACE ) {
struct wlr_scene_surface * scene_surface =
wlr_scene_surface_from_node ( node ) ;
if ( scene_surface - > primary_output = = output ) {
wlr_surface_send_frame_done ( scene_surface - > surface , now ) ;
}
}
struct wlr_scene_node * child ;
wl_list_for_each ( child , & node - > state . children , state . link ) {
scene_send_frame_done_iterator ( child , output , now ) ;
}
}
void wlr_scene_send_frame_done ( struct wlr_scene * scene ,
struct wlr_output * output , struct timespec * now ) {
scene_send_frame_done_iterator ( & scene - > node , output , now ) ;
}
static void scene_output_handle_destroy ( struct wlr_addon * addon ) {
struct wlr_scene_output * scene_output =
wl_container_of ( addon , scene_output , addon ) ;
@ -1121,6 +1096,32 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) {
return wlr_output_commit ( output ) ;
}
static void scene_output_send_frame_done_iterator ( struct wlr_scene_node * node ,
struct wlr_output * output , struct timespec * now ) {
if ( ! node - > state . enabled ) {
return ;
}
if ( node - > type = = WLR_SCENE_NODE_SURFACE ) {
struct wlr_scene_surface * scene_surface =
wlr_scene_surface_from_node ( node ) ;
if ( scene_surface - > primary_output = = output ) {
wlr_surface_send_frame_done ( scene_surface - > surface , now ) ;
}
}
struct wlr_scene_node * child ;
wl_list_for_each ( child , & node - > state . children , state . link ) {
scene_output_send_frame_done_iterator ( child , output , now ) ;
}
}
void wlr_scene_output_send_frame_done ( struct wlr_scene_output * scene_output ,
struct timespec * now ) {
scene_output_send_frame_done_iterator ( & scene_output - > scene - > node ,
scene_output - > output , now ) ;
}
static void scene_output_for_each_surface ( const struct wlr_box * output_box ,
struct wlr_scene_node * node , int lx , int ly ,
wlr_surface_iterator_func_t user_iterator , void * user_data ) {