summaryrefslogtreecommitdiff
path: root/glamor/glamor_triangles.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-01-11 00:00:00 +0800
committerEric Anholt <eric@anholt.net>2014-03-17 14:30:56 -0700
commit93f1824a0b19346f0e1759bedfa9cf10772067af (patch)
tree4098126f01619e3b9f089de2c5e6ed28f5f2bcee /glamor/glamor_triangles.c
parent4c9a20072552c52b3763bd73e7a7e9b9cb8b4993 (diff)
glamor: Rely on nested mappings to handle src==dst and !prepare bugs.
Now that the core deals with that for us, we can avoid all this extra carefulness. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus@selfnet.de>
Diffstat (limited to 'glamor/glamor_triangles.c')
-rw-r--r--glamor/glamor_triangles.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/glamor/glamor_triangles.c b/glamor/glamor_triangles.c
index 693eef10f..b89cb2de7 100644
--- a/glamor/glamor_triangles.c
+++ b/glamor/glamor_triangles.c
@@ -41,16 +41,13 @@ _glamor_triangles(CARD8 op,
|| glamor_ddx_fallback_check_pixmap(pSrc->pDrawable)))
return FALSE;
- if (glamor_prepare_access_picture(pDst, GLAMOR_ACCESS_RW)) {
- if (glamor_prepare_access_picture(pSrc, GLAMOR_ACCESS_RO)) {
-
- fbTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntris, tris);
-
- glamor_finish_access_picture(pSrc, GLAMOR_ACCESS_RO);
- }
-
- glamor_finish_access_picture(pDst, GLAMOR_ACCESS_RW);
+ if (glamor_prepare_access_picture(pDst, GLAMOR_ACCESS_RW) &&
+ glamor_prepare_access_picture(pSrc, GLAMOR_ACCESS_RO)) {
+ fbTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntris, tris);
}
+ glamor_finish_access_picture(pSrc);
+ glamor_finish_access_picture(pDst);
+
return TRUE;
}