diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2007-06-22 00:38:50 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2007-06-22 00:39:28 -0400 |
commit | 19cde59c41cf167cc609debfee75bfc015beac12 (patch) | |
tree | 2df78540a94ca42b8e819239865bb5bf228b094f /fb | |
parent | d2177c80915f2fe2e8a5c948d4ba2fa51dbfbea2 (diff) |
In fbFill() make sure the drawable is validated when pixman_fill() succeeds.
In fbSolidBoxClipped() don't return when pixman_fill() succeeds.
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fbfill.c | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/fb/fbfill.c b/fb/fbfill.c index a3147ecc2..4957bed8f 100644 --- a/fb/fbfill.c +++ b/fb/fbfill.c @@ -47,21 +47,17 @@ fbFill (DrawablePtr pDrawable, switch (pGC->fillStyle) { case FillSolid: #ifndef FB_ACCESS_WRAPPER - if (!pPriv->and) - { - if (pixman_fill (dst, dstStride, dstBpp, x + dstXoff, y + dstYoff, width, height, pPriv->xor)) - { - fbFinishAccess (pDrawable); - return; - } - } + if (pPriv->and || !pixman_fill ((uint32_t *)dst, dstStride, dstBpp, + x + dstXoff, y + dstYoff, + width, height, + pPriv->xor)) #endif - fbSolid (dst + (y + dstYoff) * dstStride, - dstStride, - (x + dstXoff) * dstBpp, - dstBpp, - width * dstBpp, height, - pPriv->and, pPriv->xor); + fbSolid (dst + (y + dstYoff) * dstStride, + dstStride, + (x + dstXoff) * dstBpp, + dstBpp, + width * dstBpp, height, + pPriv->and, pPriv->xor); break; case FillStippled: case FillOpaqueStippled: { @@ -218,25 +214,19 @@ fbSolidBoxClipped (DrawablePtr pDrawable, continue; #ifndef FB_ACCESS_WRAPPER - if (!and) - { - if (pixman_fill (dst, dstStride, dstBpp, - partX1 + dstXoff, partY1 + dstYoff, (partX2 - partX1), (partY2 - partY1), - xor)) - { - fbFinishAccess (pDrawable); - return; - } - } + if (and || !pixman_fill ((uint32_t *)dst, dstStride, dstBpp, + partX1 + dstXoff, partY1 + dstYoff, + (partX2 - partX1), (partY2 - partY1), + xor)) #endif - fbSolid (dst + (partY1 + dstYoff) * dstStride, - dstStride, - (partX1 + dstXoff) * dstBpp, - dstBpp, - - (partX2 - partX1) * dstBpp, - (partY2 - partY1), - and, xor); + fbSolid (dst + (partY1 + dstYoff) * dstStride, + dstStride, + (partX1 + dstXoff) * dstBpp, + dstBpp, + + (partX2 - partX1) * dstBpp, + (partY2 - partY1), + and, xor); } fbFinishAccess (pDrawable); } |