if (!pq)
return VDP_STATUS_RESOURCES;
- pq->device = dev;
+ DeviceReference(&pq->device, dev);
pq->drawable = pqt->drawable;
pipe_mutex_lock(dev->mutex);
no_handle:
no_compositor:
+ DeviceReference(&pq->device, NULL);
FREE(pq);
return ret;
}
pipe_mutex_unlock(pq->device->mutex);
vlRemoveDataHTAB(presentation_queue);
+ DeviceReference(&pq->device, NULL);
FREE(pq);
return VDP_STATUS_OK;
return VDP_STATUS_INVALID_HANDLE;
pipe_mutex_lock(pq->device->mutex);
- *current_time = vl_screen_get_timestamp(pq->device->vscreen, pq->drawable);
+ *current_time = pq->device->vscreen->get_timestamp(pq->device->vscreen,
+ (void *)pq->drawable);
pipe_mutex_unlock(pq->device->mutex);
return VDP_STATUS_OK;
struct vl_compositor *compositor;
struct vl_compositor_state *cstate;
+ struct vl_screen *vscreen;
pq = vlGetDataHTAB(presentation_queue);
if (!pq)
pipe = pq->device->context;
compositor = &pq->device->compositor;
cstate = &pq->cstate;
+ vscreen = pq->device->vscreen;
pipe_mutex_lock(pq->device->mutex);
- tex = vl_screen_texture_from_drawable(pq->device->vscreen, pq->drawable);
+ tex = vscreen->texture_from_drawable(vscreen, (void *)pq->drawable);
if (!tex) {
pipe_mutex_unlock(pq->device->mutex);
return VDP_STATUS_INVALID_HANDLE;
}
- dirty_area = vl_screen_get_dirty_area(pq->device->vscreen);
+ dirty_area = vscreen->get_dirty_area(vscreen);
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = tex->format;
vl_compositor_render(cstate, compositor, surf_draw, dirty_area, true);
}
- vl_screen_set_next_timestamp(pq->device->vscreen, earliest_presentation_time);
- pipe->screen->flush_frontbuffer
- (
- pipe->screen, tex, 0, 0,
- vl_screen_get_private(pq->device->vscreen), NULL
- );
+ vscreen->set_next_timestamp(vscreen, earliest_presentation_time);
+ pipe->screen->flush_frontbuffer(pipe->screen, tex, 0, 0,
+ vscreen->get_private(vscreen), NULL);
pipe->screen->fence_reference(pipe->screen, &surf->fence, NULL);
pipe->flush(pipe, &surf->fence, 0);
} else {
pipe_mutex_lock(pq->device->mutex);
screen = pq->device->vscreen->pscreen;
- if (screen->fence_signalled(screen, surf->fence)) {
+ if (screen->fence_finish(screen, surf->fence, 0)) {
screen->fence_reference(screen, &surf->fence, NULL);
*status = VDP_PRESENTATION_QUEUE_STATUS_VISIBLE;
pipe_mutex_unlock(pq->device->mutex);