Commit 438d8ace authored by Eric Anholt's avatar Eric Anholt

glamor: Move glamor_emit_composite_vert() to traps, where it's used.

It's only used in the nonantialiased, triangle-based trapezoids path.
Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: Markus Wick <markus at selfnet.de>
parent bce5ec4f
......@@ -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,
......
......@@ -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)
{
......
......@@ -189,6 +189,31 @@ point_inside_trapezoid(int point[2], xTrapezoid *trap, xFixed cut_y)
return ret;
}
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment