glamor: Move glamor_emit_composite_vert() to traps, where it's used.
authorEric Anholt <eric@anholt.net>
Thu, 6 Mar 2014 21:29:08 +0000 (13:29 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 10 Mar 2014 20:57:21 +0000 (13:57 -0700)
It's only used in the nonantialiased, triangle-based trapezoids path.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Markus Wick <markus at selfnet.de>
glamor/glamor_priv.h
glamor/glamor_render.c
glamor/glamor_trapezoid.c

index fe4b423..c93f483 100644 (file)
@@ -703,10 +703,6 @@ void glamor_composite_set_shader_blend(glamor_pixmap_private *dest_priv,
                                        struct blendinfo *op_info);
 
 void glamor_setup_composite_vbo(ScreenPtr screen, int n_verts);
-void glamor_emit_composite_vert(ScreenPtr screen,
-                                const float *src_coords,
-                                const float *mask_coords,
-                                const float *dst_coords, int i);
 
 /* glamor_trapezoid.c */
 void glamor_trapezoids(CARD8 op,
index 98343c3..7e25cd5 100644 (file)
@@ -767,31 +767,6 @@ glamor_setup_composite_vbo(ScreenPtr screen, int n_verts)
     glamor_put_context(glamor_priv);
 }
 
-void
-glamor_emit_composite_vert(ScreenPtr screen,
-                           const float *src_coords,
-                           const float *mask_coords,
-                           const float *dst_coords, int i)
-{
-    glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
-    float *vb = (float *) (glamor_priv->vb + glamor_priv->vbo_offset);
-    int j = 0;
-
-    vb[j++] = dst_coords[i * 2 + 0];
-    vb[j++] = dst_coords[i * 2 + 1];
-    if (glamor_priv->has_source_coords) {
-        vb[j++] = src_coords[i * 2 + 0];
-        vb[j++] = src_coords[i * 2 + 1];
-    }
-    if (glamor_priv->has_mask_coords) {
-        vb[j++] = mask_coords[i * 2 + 0];
-        vb[j++] = mask_coords[i * 2 + 1];
-    }
-
-    glamor_priv->render_nr_verts++;
-    glamor_priv->vbo_offset += glamor_priv->vb_stride;
-}
-
 static void
 glamor_flush_composite_rects(ScreenPtr screen)
 {
index 7bc925a..7bbee4b 100644 (file)
@@ -190,6 +190,31 @@ point_inside_trapezoid(int point[2], xTrapezoid *trap, xFixed cut_y)
 }
 
 static void
+glamor_emit_composite_vert(ScreenPtr screen,
+                           const float *src_coords,
+                           const float *mask_coords,
+                           const float *dst_coords, int i)
+{
+    glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+    float *vb = (float *) (glamor_priv->vb + glamor_priv->vbo_offset);
+    int j = 0;
+
+    vb[j++] = dst_coords[i * 2 + 0];
+    vb[j++] = dst_coords[i * 2 + 1];
+    if (glamor_priv->has_source_coords) {
+        vb[j++] = src_coords[i * 2 + 0];
+        vb[j++] = src_coords[i * 2 + 1];
+    }
+    if (glamor_priv->has_mask_coords) {
+        vb[j++] = mask_coords[i * 2 + 0];
+        vb[j++] = mask_coords[i * 2 + 1];
+    }
+
+    glamor_priv->render_nr_verts++;
+    glamor_priv->vbo_offset += glamor_priv->vb_stride;
+}
+
+static void
 glamor_emit_composite_triangle(ScreenPtr screen,
                                const float *src_coords,
                                const float *mask_coords,