diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-11-05 13:32:59 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-11-05 13:32:59 +0000 |
commit | bf781c5ff285301ad70ffc5f4321b8906f71edd8 (patch) | |
tree | 3b770f4bf9a8cd11dd9f14e7f758991a73a52d78 /xserver/render/mipict.c | |
parent | e59d0622d3162f7b5a7420ef87dbebb200348c37 (diff) |
Update to xserver 1.11.2
Diffstat (limited to 'xserver/render/mipict.c')
-rw-r--r-- | xserver/render/mipict.c | 67 |
1 files changed, 17 insertions, 50 deletions
diff --git a/xserver/render/mipict.c b/xserver/render/mipict.c index b5b897037..08b2fa722 100644 --- a/xserver/render/mipict.c +++ b/xserver/render/mipict.c @@ -333,12 +333,8 @@ miClipPictureSrc (RegionPtr pRegion, return TRUE; } -void -miCompositeSourceValidate (PicturePtr pPicture, - INT16 x, - INT16 y, - CARD16 width, - CARD16 height) +static void +SourceValidateOnePicture (PicturePtr pPicture) { DrawablePtr pDrawable = pPicture->pDrawable; ScreenPtr pScreen; @@ -347,49 +343,22 @@ miCompositeSourceValidate (PicturePtr pPicture, return; pScreen = pDrawable->pScreen; - + if (pScreen->SourceValidate) { - if (pPicture->transform) - { - xPoint points[4]; - int i; - int xmin, ymin, xmax, ymax; - -#define VectorSet(i,_x,_y) { points[i].x = _x; points[i].y = _y; } - VectorSet (0, x, y); - VectorSet (1, x + width, y); - VectorSet (2, x, y + height); - VectorSet (3, x + width, y + height); - xmin = ymin = 32767; - xmax = ymax = -32737; - for (i = 0; i < 4; i++) - { - PictVector t; - t.vector[0] = IntToxFixed (points[i].x); - t.vector[1] = IntToxFixed (points[i].y); - t.vector[2] = xFixed1; - if (pixman_transform_point (pPicture->transform, &t)) - { - int tx = xFixedToInt (t.vector[0]); - int ty = xFixedToInt (t.vector[1]); - if (tx < xmin) xmin = tx; - if (tx > xmax) xmax = tx; - if (ty < ymin) ymin = ty; - if (ty > ymax) ymax = ty; - } - } - x = xmin; - y = ymin; - width = xmax - xmin; - height = ymax - ymin; - } - x += pPicture->pDrawable->x; - y += pPicture->pDrawable->y; - (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + pScreen->SourceValidate ( + pDrawable, 0, 0, pDrawable->width, pDrawable->height, pPicture->subWindowMode); } } +void +miCompositeSourceValidate (PicturePtr pPicture) +{ + SourceValidateOnePicture (pPicture); + if (pPicture->alphaMap) + SourceValidateOnePicture (pPicture->alphaMap); +} + /* * returns FALSE if the final region is empty. Indistinguishable from * an allocation failure, but rendering ignores those anyways. @@ -479,9 +448,9 @@ miComputeCompositeRegion (RegionPtr pRegion, } - miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height); + miCompositeSourceValidate (pSrc); if (pMask) - miCompositeSourceValidate (pMask, xMask, yMask, width, height); + miCompositeSourceValidate (pMask); return TRUE; } @@ -630,10 +599,8 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) ps->Composite = 0; /* requires DDX support */ ps->Glyphs = miGlyphs; ps->CompositeRects = miCompositeRects; - ps->Trapezoids = miTrapezoids; - ps->Triangles = miTriangles; - ps->TriStrip = miTriStrip; - ps->TriFan = miTriFan; + ps->Trapezoids = 0; + ps->Triangles = 0; ps->RasterizeTrapezoid = 0; /* requires DDX support */ ps->AddTraps = 0; /* requires DDX support */ |