diff options
Diffstat (limited to 'src/glamor_trapezoid.c')
-rw-r--r-- | src/glamor_trapezoid.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/glamor_trapezoid.c b/src/glamor_trapezoid.c index 7bb75f5..57a178c 100644 --- a/src/glamor_trapezoid.c +++ b/src/glamor_trapezoid.c @@ -81,12 +81,16 @@ _glamor_lines_crossfixedY (xLineFixed *l, xLineFixed *r) xFixed dy2 = r->p2.y - r->p1.y; xFixed_32_32 tmp = (xFixed_32_32) dy2 * dy1; xFixed_32_32 dividend1 = (tmp >> 32) * (l->p1.x - r->p1.x); + xFixed_32_32 dividend2; + xFixed_32_32 dividend3; + xFixed_32_32 divisor; + tmp = (xFixed_32_32) dx1 * dy2; - xFixed_32_32 dividend2 = (tmp >> 32) * l->p1.y; + dividend2 = (tmp >> 32) * l->p1.y; tmp = (xFixed_32_32) dy1 * dx2; - xFixed_32_32 dividend3 = (tmp >> 32) * r->p1.y; - xFixed_32_32 divisor = ((xFixed_32_32) dx1 * (xFixed_32_32) dy2 - - (xFixed_32_32) dy1 * (xFixed_32_32) dx2) >> 32; + dividend3 = (tmp >> 32) * r->p1.y; + divisor = ((xFixed_32_32) dx1 * (xFixed_32_32) dy2 + - (xFixed_32_32) dy1 * (xFixed_32_32) dx2) >> 32; if (divisor) return (xFixed)((dividend2 - dividend1 - dividend3) / divisor); @@ -1363,7 +1367,6 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture, glamor_pixmap_private *pixmap_priv; PixmapPtr pixmap = NULL; GLint trapezoid_prog; - float width, height; GLfloat xscale, yscale; float left_slope, right_slope; xTrapezoid *ptrap; @@ -1399,9 +1402,6 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture, pixmap_priv_get_dest_scale(pixmap_priv, (&xscale), (&yscale)); - width = (float)(bounds->x2 - bounds->x1); - height = (float)(bounds->y2 - bounds->y1); - dispatch->glBindBuffer(GL_ARRAY_BUFFER, 0); dispatch->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); @@ -1604,11 +1604,11 @@ glamor_create_mask_picture(ScreenPtr screen, static int _glamor_trapezoid_bounds (int ntrap, xTrapezoid *traps, BoxPtr box) { + int has_large_trapezoid = 0; box->y1 = MAXSHORT; box->y2 = MINSHORT; box->x1 = MAXSHORT; box->x2 = MINSHORT; - int has_large_trapezoid = 0; for (; ntrap; ntrap--, traps++) { INT16 x1, y1, x2, y2; |