vl/compositor: make vl_compositor_set_yuv_layer() static
authorLeo Liu <leo.liu@amd.com>
Tue, 29 Aug 2017 01:12:57 +0000 (21:12 -0400)
committerLeo Liu <leo.liu@amd.com>
Thu, 7 Sep 2017 17:32:36 +0000 (13:32 -0400)
Since it's no longer being called outside of compositor

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/auxiliary/vl/vl_compositor.c
src/gallium/auxiliary/vl/vl_compositor.h

index 6963a5650700fb25e2e41a8f77be91263916f471..794c8b5b17c801ef85ec2ff7985139af053adaa7 100644 (file)
@@ -885,6 +885,32 @@ draw_layers(struct vl_compositor *c, struct vl_compositor_state *s, struct u_rec
    }
 }
 
+static void
+set_yuv_layer(struct vl_compositor_state *s, struct vl_compositor *c, unsigned layer,
+              struct pipe_video_buffer *buffer, struct u_rect *src_rect,
+              struct u_rect *dst_rect, bool y)
+{
+   struct pipe_sampler_view **sampler_views;
+   unsigned i;
+
+   assert(s && c && buffer);
+
+   assert(layer < VL_COMPOSITOR_MAX_LAYERS);
+
+   s->used_layers |= 1 << layer;
+   sampler_views = buffer->get_sampler_view_components(buffer);
+   for (i = 0; i < 3; ++i) {
+      s->layers[layer].samplers[i] = c->sampler_linear;
+      pipe_sampler_view_reference(&s->layers[layer].sampler_views[i], sampler_views[i]);
+   }
+
+   calc_src_and_dst(&s->layers[layer], buffer->width, buffer->height,
+                    src_rect ? *src_rect : default_rect(&s->layers[layer]),
+                    dst_rect ? *dst_rect : default_rect(&s->layers[layer]));
+
+   s->layers[layer].fs = (y) ? c->fs_weave_yuv.y : c->fs_weave_yuv.uv;
+}
+
 void
 vl_compositor_reset_dirty_area(struct u_rect *dirty)
 {
@@ -1142,36 +1168,6 @@ vl_compositor_set_layer_rotation(struct vl_compositor_state *s,
    s->layers[layer].rotate = rotate;
 }
 
-void
-vl_compositor_set_yuv_layer(struct vl_compositor_state *s,
-                            struct vl_compositor *c,
-                            unsigned layer,
-                            struct pipe_video_buffer *buffer,
-                            struct u_rect *src_rect,
-                            struct u_rect *dst_rect,
-                            bool y)
-{
-   struct pipe_sampler_view **sampler_views;
-   unsigned i;
-
-   assert(s && c && buffer);
-
-   assert(layer < VL_COMPOSITOR_MAX_LAYERS);
-
-   s->used_layers |= 1 << layer;
-   sampler_views = buffer->get_sampler_view_components(buffer);
-   for (i = 0; i < 3; ++i) {
-      s->layers[layer].samplers[i] = c->sampler_linear;
-      pipe_sampler_view_reference(&s->layers[layer].sampler_views[i], sampler_views[i]);
-   }
-
-   calc_src_and_dst(&s->layers[layer], buffer->width, buffer->height,
-                    src_rect ? *src_rect : default_rect(&s->layers[layer]),
-                    dst_rect ? *dst_rect : default_rect(&s->layers[layer]));
-
-   s->layers[layer].fs = (y) ? c->fs_weave_yuv.y : c->fs_weave_yuv.uv;
-}
-
 void
 vl_compositor_render(struct vl_compositor_state *s,
                      struct vl_compositor       *c,
@@ -1232,14 +1228,14 @@ vl_compositor_yuv_deint(struct vl_compositor_state *s,
    dst_rect.y0 = 0;
    dst_rect.y1 = src->height;
 
-   vl_compositor_set_yuv_layer(s, c, 0, src, NULL, NULL, true);
+   set_yuv_layer(s, c, 0, src, NULL, NULL, true);
    vl_compositor_set_layer_dst_area(s, 0, &dst_rect);
    vl_compositor_render(s, c, dst_surfaces[0], NULL, false);
 
    dst_rect.x1 /= 2;
    dst_rect.y1 /= 2;
 
-   vl_compositor_set_yuv_layer(s, c, 0, src, NULL, NULL, false);
+   set_yuv_layer(s, c, 0, src, NULL, NULL, false);
    vl_compositor_set_layer_dst_area(s, 0, &dst_rect);
    vl_compositor_render(s, c, dst_surfaces[1], NULL, false);
 
index 88a54efdb8277364366d5307728bca9c629376ee..bae856e6c3f809876a3e142edf2892c6108b8f92 100644 (file)
@@ -240,18 +240,6 @@ vl_compositor_set_layer_rotation(struct vl_compositor_state *state,
                                  unsigned layer,
                                  enum vl_compositor_rotation rotate);
 
-/**
- * set a layer of y or uv to render
- */
-void
-vl_compositor_set_yuv_layer(struct vl_compositor_state *s,
-                            struct vl_compositor *c,
-                            unsigned layer,
-                            struct pipe_video_buffer *buffer,
-                            struct u_rect *src_rect,
-                            struct u_rect *dst_rect,
-                            bool y);
-
 /*@}*/
 
 /**