diff options
author | Emeric Grange <[email protected]> | 2011-09-12 23:39:25 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-09-14 15:49:15 +0200 |
commit | 02e191cb6aa13286fff956a7929959d7cee7241d (patch) | |
tree | 639110e12459bb1dcb86c47c93f06505a5b82aff | |
parent | 81a86aea4f0990a1b8795f9e00e7a6c4ba368281 (diff) |
g3dvl: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 16 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.h | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.h | 8 |
4 files changed, 20 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 76106ca2634..eac101f3aa7 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -323,6 +323,7 @@ init_pipe_state(struct vl_compositor *c) 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; } @@ -355,6 +356,7 @@ create_vertex_buffer(struct vl_compositor *c) PIPE_USAGE_STREAM, sizeof(struct vertex4f) * VL_COMPOSITOR_MAX_LAYERS * 4 ); + return c->vertex_buf.buffer != NULL; } @@ -601,8 +603,8 @@ vl_compositor_set_csc_matrix(struct vl_compositor *c, const float matrix[16]) 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); @@ -676,7 +678,6 @@ vl_compositor_set_palette_layer(struct vl_compositor *c, 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 @@ -704,10 +705,10 @@ vl_compositor_set_rgba_layer(struct vl_compositor *c, } 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; @@ -779,6 +780,7 @@ vl_compositor_init(struct vl_compositor *c, struct pipe_context *pipe) cleanup_pipe_state(c); return false; } + if (!init_buffers(c)) { cleanup_shaders(c); cleanup_pipe_state(c); diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h index 6c7e1d4ae77..73d38c96ba8 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.h +++ b/src/gallium/auxiliary/vl/vl_compositor.h @@ -168,15 +168,15 @@ vl_compositor_set_rgba_layer(struct vl_compositor *compositor, * 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); diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index ae15c15c3ae..6d714d49f4a 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -77,7 +77,7 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen, 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; diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.h b/src/gallium/auxiliary/vl/vl_video_buffer.h index c4c139c1ed3..8c80b36fbf2 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.h +++ b/src/gallium/auxiliary/vl/vl_video_buffer.h @@ -25,8 +25,8 @@ * **************************************************************************/ -#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" @@ -68,7 +68,7 @@ boolean 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 */ @@ -88,4 +88,4 @@ vl_video_buffer_create_ex(struct pipe_context *pipe, const enum pipe_format resource_formats[VL_MAX_PLANES], unsigned usage); -#endif /* vl_ycbcr_buffer_h */ +#endif /* vl_video_buffer_h */ |