Lines Matching defs:vlsurface
57 vlVdpOutputSurface *vlsurface = NULL;
70 vlsurface = CALLOC(1, sizeof(vlVdpOutputSurface));
71 if (!vlsurface)
74 DeviceReference(&vlsurface->device, dev);
83 vlsurface->send_to_X = dev->vscreen->color_depth == 24 &&
106 vlsurface->sampler_view = pipe->create_sampler_view(pipe, res, &sv_templ);
107 if (!vlsurface->sampler_view)
112 vlsurface->surface = pipe->create_surface(pipe, res, &surf_templ);
113 if (!vlsurface->surface)
116 *surface = vlAddDataHTAB(vlsurface);
122 if (!vl_compositor_init_state(&vlsurface->cstate, pipe))
125 vl_compositor_reset_dirty_area(&vlsurface->dirty_area);
131 pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
132 pipe_surface_reference(&vlsurface->surface, NULL);
136 DeviceReference(&vlsurface->device, NULL);
137 FREE(vlsurface);
147 vlVdpOutputSurface *vlsurface;
150 vlsurface = vlGetDataHTAB(surface);
151 if (!vlsurface)
154 pipe = vlsurface->device->context;
156 mtx_lock(&vlsurface->device->mutex);
158 pipe_surface_reference(&vlsurface->surface, NULL);
159 pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
160 pipe->screen->fence_reference(pipe->screen, &vlsurface->fence, NULL);
161 vl_compositor_cleanup_state(&vlsurface->cstate);
162 mtx_unlock(&vlsurface->device->mutex);
165 DeviceReference(&vlsurface->device, NULL);
166 FREE(vlsurface);
179 vlVdpOutputSurface *vlsurface;
181 vlsurface = vlGetDataHTAB(surface);
182 if (!vlsurface)
185 *rgba_format = PipeToFormatRGBA(vlsurface->sampler_view->texture->format);
186 *width = vlsurface->sampler_view->texture->width0;
187 *height = vlsurface->sampler_view->texture->height0;
202 vlVdpOutputSurface *vlsurface;
209 vlsurface = vlGetDataHTAB(surface);
210 if (!vlsurface)
213 pipe = vlsurface->device->context;
220 mtx_lock(&vlsurface->device->mutex);
222 res = vlsurface->sampler_view->texture;
226 mtx_unlock(&vlsurface->device->mutex);
234 mtx_unlock(&vlsurface->device->mutex);
249 vlVdpOutputSurface *vlsurface;
253 vlsurface = vlGetDataHTAB(surface);
254 if (!vlsurface)
257 pipe = vlsurface->device->context;
264 mtx_lock(&vlsurface->device->mutex);
266 dst_box = RectToPipeBox(destination_rect, vlsurface->sampler_view->texture);
270 mtx_unlock(&vlsurface->device->mutex);
274 pipe->texture_subdata(pipe, vlsurface->sampler_view->texture, 0,
277 mtx_unlock(&vlsurface->device->mutex);
295 vlVdpOutputSurface *vlsurface;
310 vlsurface = vlGetDataHTAB(surface);
311 if (!vlsurface)
314 context = vlsurface->device->context;
315 compositor = &vlsurface->device->compositor;
316 cstate = &vlsurface->cstate;
343 res_tmpl.width0 = vlsurface->surface->texture->width0;
344 res_tmpl.height0 = vlsurface->surface->texture->height0;
351 mtx_lock(&vlsurface->device->mutex);
413 vl_compositor_render(cstate, compositor, vlsurface->surface, &vlsurface->dirty_area, false);
417 mtx_unlock(&vlsurface->device->mutex);
424 mtx_unlock(&vlsurface->device->mutex);
440 vlVdpOutputSurface *vlsurface;
452 vlsurface = vlGetDataHTAB(surface);
453 if (!vlsurface)
457 pipe = vlsurface->device->context;
458 compositor = &vlsurface->device->compositor;
459 cstate = &vlsurface->cstate;
468 mtx_lock(&vlsurface->device->mutex);
479 vtmpl.width = vlsurface->surface->texture->width0;
480 vtmpl.height = vlsurface->surface->texture->height0;
485 mtx_unlock(&vlsurface->device->mutex);
492 mtx_unlock(&vlsurface->device->mutex);
522 vl_compositor_render(cstate, compositor, vlsurface->surface, &vlsurface->dirty_area, false);
525 mtx_unlock(&vlsurface->device->mutex);
530 mtx_unlock(&vlsurface->device->mutex);
783 vlVdpOutputSurface *vlsurface;
785 vlsurface = vlGetDataHTAB(surface);
786 if (!vlsurface || !vlsurface->surface)
789 mtx_lock(&vlsurface->device->mutex);
790 vlsurface->device->context->flush(vlsurface->device->context, NULL, 0);
791 mtx_unlock(&vlsurface->device->mutex);
793 return vlsurface->surface->texture;
799 vlVdpOutputSurface *vlsurface;
806 vlsurface = vlGetDataHTAB(surface);
807 if (!vlsurface || !vlsurface->surface)
810 mtx_lock(&vlsurface->device->mutex);
811 vlsurface->device->context->flush(vlsurface->device->context, NULL, 0);
816 pscreen = vlsurface->surface->texture->screen;
817 if (!pscreen->resource_get_handle(pscreen, vlsurface->device->context,
818 vlsurface->surface->texture, &whandle,
820 mtx_unlock(&vlsurface->device->mutex);
824 mtx_unlock(&vlsurface->device->mutex);
827 result->width = vlsurface->surface->width;
828 result->height = vlsurface->surface->height;
831 result->format = PipeToFormatRGBA(vlsurface->surface->format);