diff options
author | Junyan He <junyan.he@linux.intel.com> | 2012-06-04 07:22:27 +0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-12-18 11:23:52 -0800 |
commit | 5f1560c84aa386bb12dc6ec3daeb93e0f63c09c2 (patch) | |
tree | 774f0413a9886bdab8fc9f2c290f6bb5732daa0c /glamor/glamor_trapezoid.c | |
parent | 0b0391765f3ca0192b00f4970c9453934d529397 (diff) |
Modilfy the composite logic to two phases
We seperate the composite to two phases, firstly to
select the shader according to source type and logic
op, setting the right parameters. Then we emit the
vertex array to generate the dest result.
The reason why we do this is that the shader may be
used to composite no only rect, trapezoid and triangle
render function can also use it to render triangles and
polygens. The old function glamor_composite_with_shader
do the whole two phases work and can not match the
new request.
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Diffstat (limited to 'glamor/glamor_trapezoid.c')
-rw-r--r-- | glamor/glamor_trapezoid.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/glamor/glamor_trapezoid.c b/glamor/glamor_trapezoid.c index e65f7e39b..f0c0b8b2b 100644 --- a/glamor/glamor_trapezoid.c +++ b/glamor/glamor_trapezoid.c @@ -395,7 +395,6 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture, BoxRec one_trap_bound; float vertices[8]; float tex_vertices[8]; - float tmp; int i; glamor_priv = glamor_get_screen_private(screen); @@ -410,8 +409,8 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture, } /* First, clear all to zero */ - if (!glamor_solid(pixmap, 0, 0, pixmap_priv->container->drawable.width, - pixmap_priv->container->drawable.height, + if (!glamor_solid(pixmap, 0, 0, pixmap_priv->base.pixmap->drawable.width, + pixmap_priv->base.pixmap->drawable.height, GXclear, 0xFFFFFFFF, 0)) { DEBUGF("glamor_solid failed, fallback\n"); return FALSE; @@ -490,8 +489,8 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture, xFixedToInt(ptrap->right.p2.y), ptrap->right.p2.y); miTrapezoidBounds(1, ptrap, &one_trap_bound); - glamor_set_tcoords_tri_strip((pixmap_priv->container->drawable.width), - (pixmap_priv->container->drawable.height), + glamor_set_tcoords_tri_strip((pixmap_priv->base.pixmap->drawable.width), + (pixmap_priv->base.pixmap->drawable.height), (one_trap_bound.x1), (one_trap_bound.y1), (one_trap_bound.x2), |