dsa.alpha.ref_value = 0;
c->dsa = c->pipe->create_depth_stencil_alpha_state(c->pipe, &dsa);
c->pipe->bind_depth_stencil_alpha_state(c->pipe, c->dsa);
+
return true;
}
PIPE_USAGE_STREAM,
sizeof(struct vertex4f) * VL_COMPOSITOR_MAX_LAYERS * 4
);
+
return c->vertex_buf.buffer != NULL;
}
pipe_buffer_map(c->pipe, c->csc_matrix,
PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
&buf_transfer),
- matrix,
- sizeof(csc_matrix)
+ matrix,
+ sizeof(csc_matrix)
);
pipe_buffer_unmap(c->pipe, buf_transfer);
calc_src_and_dst(&c->layers[layer], indexes->texture->width0, indexes->texture->height0,
src_rect ? *src_rect : default_rect(&c->layers[layer]),
dst_rect ? *dst_rect : default_rect(&c->layers[layer]));
-
}
void
}
void
-vl_compositor_render(struct vl_compositor *c,
- struct pipe_surface *dst_surface,
- struct pipe_video_rect *dst_area,
- struct pipe_video_rect *dst_clip,
+vl_compositor_render(struct vl_compositor *c,
+ struct pipe_surface *dst_surface,
+ struct pipe_video_rect *dst_area,
+ struct pipe_video_rect *dst_clip,
bool clear_dirty_area)
{
struct pipe_scissor_state scissor;
cleanup_pipe_state(c);
return false;
}
+
if (!init_buffers(c)) {
cleanup_shaders(c);
cleanup_pipe_state(c);
* render the layers to the frontbuffer
*/
void
-vl_compositor_render(struct vl_compositor *compositor,
- struct pipe_surface *dst_surface,
- struct pipe_video_rect *dst_area,
- struct pipe_video_rect *dst_clip,
+vl_compositor_render(struct vl_compositor *compositor,
+ struct pipe_surface *dst_surface,
+ struct pipe_video_rect *dst_area,
+ struct pipe_video_rect *dst_clip,
bool clear_dirty_area);
/**
-* destroy this compositor
-*/
+ * destroy this compositor
+ */
void
vl_compositor_cleanup(struct vl_compositor *compositor);
if (!resource_formats)
return false;
- for(i = 0; i < VL_MAX_PLANES; ++i) {
+ for (i = 0; i < VL_MAX_PLANES; ++i) {
if (!resource_formats[i])
continue;
*
**************************************************************************/
-#ifndef vl_ycbcr_buffer_h
-#define vl_ycbcr_buffer_h
+#ifndef vl_video_buffer_h
+#define vl_video_buffer_h
#include "pipe/p_context.h"
#include "pipe/p_video_decoder.h"
vl_video_buffer_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile);
-
+
/**
* creates a video buffer, can be used as a standard implementation for pipe->create_video_buffer
*/
const enum pipe_format resource_formats[VL_MAX_PLANES],
unsigned usage);
-#endif /* vl_ycbcr_buffer_h */
+#endif /* vl_video_buffer_h */