summaryrefslogtreecommitdiff
path: root/uxa/uxa-render.c
diff options
context:
space:
mode:
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r--uxa/uxa-render.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index b2d32976..13635f83 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -889,12 +889,12 @@ uxa_trapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
xoff += pDraw->x;
yoff += pDraw->y;
- uxa_prepare_access(pDraw, UXA_ACCESS_RW);
-
- for (; ntrap; ntrap--, traps++)
- (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
-
- uxa_finish_access(pDraw);
+ if (uxa_prepare_access(pDraw, UXA_ACCESS_RW))
+ {
+ for (; ntrap; ntrap--, traps++)
+ (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
+ uxa_finish_access(pDraw);
+ }
}
else if (maskFormat)
{
@@ -911,11 +911,12 @@ uxa_trapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (!pPicture)
return;
- uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW);
- for (; ntrap; ntrap--, traps++)
- (*ps->RasterizeTrapezoid) (pPicture, traps,
- -bounds.x1, -bounds.y1);
- uxa_finish_access(pPicture->pDrawable);
+ if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
+ for (; ntrap; ntrap--, traps++)
+ (*ps->RasterizeTrapezoid) (pPicture, traps,
+ -bounds.x1, -bounds.y1);
+ uxa_finish_access(pPicture->pDrawable);
+ }
xRel = bounds.x1 + xSrc - xDst;
yRel = bounds.y1 + ySrc - yDst;
@@ -972,9 +973,10 @@ uxa_triangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (direct)
{
DrawablePtr pDraw = pDst->pDrawable;
- uxa_prepare_access(pDraw, UXA_ACCESS_RW);
- (*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
- uxa_finish_access(pDraw);
+ if (uxa_prepare_access(pDraw, UXA_ACCESS_RW)) {
+ (*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
+ uxa_finish_access(pDraw);
+ }
}
else if (maskFormat)
{
@@ -991,9 +993,10 @@ uxa_triangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (!pPicture)
return;
- uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW);
- (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
- uxa_finish_access(pPicture->pDrawable);
+ if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
+ (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
+ uxa_finish_access(pPicture->pDrawable);
+ }
xRel = bounds.x1 + xSrc - xDst;
yRel = bounds.y1 + ySrc - yDst;