output->frame.pending = PEPPER_TRUE;
output->frame.scheduled = PEPPER_FALSE;
- /* TODO: Send frame done to the callback objects of this output. */
+ PEPPER_LIST_FOR_EACH(&output->view_list, l)
+ {
+ /* TODO: Output time stamp and presentation feedback. */
+ pepper_view_t *view = l->item;
+ pepper_surface_send_frame_callback_done(view->surface, 0);
+ }
}
static void
surface->buffer.y += surface->pending.y;
surface->pending.newly_attached = PEPPER_FALSE;
+ surface->pending.buffer = NULL;
/* Attach to all outputs. */
attach_surface_to_outputs(surface);
pepper_surface_schedule_repaint(surface);
}
+void
+pepper_surface_send_frame_callback_done(pepper_surface_t *surface, uint32_t time)
+{
+ struct wl_resource *callback, *next;
+
+ wl_resource_for_each_safe(callback, next, &surface->frame_callbacks)
+ {
+ wl_callback_send_done(callback, time);
+ wl_resource_destroy(callback);
+ }
+}
+
PEPPER_API const char *
pepper_surface_get_role(pepper_surface_t *surface)
{