Commit | Line | Data |
---|---|---|
7217e0ca ML |
1 | --- a/exa/exa_render.c |
2 | +++ b/exa/exa_render.c | |
4db25562 | 3 | @@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, |
7217e0ca ML |
4 | |
5 | exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); | |
6 | for (; ntrap; ntrap--, traps++) | |
7 | - (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); | |
8 | + if (xTrapezoidValid(traps)) | |
9 | + (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); | |
10 | exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); | |
11 | ||
12 | xRel = bounds.x1 + xSrc - xDst; | |
7217e0ca ML |
13 | --- a/render/picture.h |
14 | +++ b/render/picture.h | |
15 | @@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed; | |
16 | /* whether 't' is a well defined not obviously empty trapezoid */ | |
17 | #define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \ | |
18 | (t)->right.p1.y != (t)->right.p2.y && \ | |
19 | - (int) ((t)->bottom - (t)->top) > 0) | |
20 | + (t)->bottom > 0 && (int) ((t)->bottom - (t)->top) > 0) | |
21 | ||
22 | /* | |
23 | * Standard NTSC luminance conversions: |