aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_utils.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-21 22:50:26 +0100
committermarha <marha@users.sourceforge.net>2014-03-21 22:56:24 +0100
commiteb71c0f23999d1cc156e1821d73634ec79621fc2 (patch)
treed45d551ada10b1bfb3d57517c892770734a77817 /xorg-server/glamor/glamor_utils.h
parentab3d257d88f67e169a314ad0fac851fc2fc6cb05 (diff)
parent41fea4472dec859ddec76bdfa7108ebec71de1e3 (diff)
downloadvcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.gz
vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.bz2
vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014 Conflicts: libxcb/src/xcb_auth.c libxcb/src/xcb_conn.c libxcb/src/xcb_util.c libxcb/src/xcb_windefs.h mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'xorg-server/glamor/glamor_utils.h')
-rw-r--r--xorg-server/glamor/glamor_utils.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/xorg-server/glamor/glamor_utils.h b/xorg-server/glamor/glamor_utils.h
index f9550b73c..53b7d9bec 100644
--- a/xorg-server/glamor/glamor_utils.h
+++ b/xorg-server/glamor/glamor_utils.h
@@ -1177,7 +1177,7 @@ glamor_dump_pixmap(PixmapPtr pixmap, int x, int y, int w, int h)
default:
ErrorF("dump depth %d, not implemented.\n", pixmap->drawable.depth);
}
- glamor_finish_access(&pixmap->drawable, GLAMOR_ACCESS_RO);
+ glamor_finish_access(&pixmap->drawable);
}
static inline void
@@ -1318,13 +1318,12 @@ glamor_compare_pixmaps(PixmapPtr pixmap1, PixmapPtr pixmap2,
{
assert(pixmap1->drawable.depth == pixmap2->drawable.depth);
- glamor_prepare_access(&pixmap1->drawable, GLAMOR_ACCESS_RO);
- glamor_prepare_access(&pixmap2->drawable, GLAMOR_ACCESS_RO);
-
- _glamor_compare_pixmaps(pixmap1, pixmap2, x, y, w, h, -1, all, diffs);
-
- glamor_finish_access(&pixmap1->drawable, GLAMOR_ACCESS_RO);
- glamor_finish_access(&pixmap2->drawable, GLAMOR_ACCESS_RO);
+ if (glamor_prepare_access(&pixmap1->drawable, GLAMOR_ACCESS_RO) &&
+ glamor_prepare_access(&pixmap2->drawable, GLAMOR_ACCESS_RO)) {
+ _glamor_compare_pixmaps(pixmap1, pixmap2, x, y, w, h, -1, all, diffs);
+ }
+ glamor_finish_access(&pixmap1->drawable);
+ glamor_finish_access(&pixmap2->drawable);
}
/* This function is used to compare two pictures.
@@ -1432,9 +1431,6 @@ glamor_compare_pictures(ScreenPtr screen,
return;
}
- glamor_prepare_access(&fst_pixmap->drawable, GLAMOR_ACCESS_RO);
- glamor_prepare_access(&snd_pixmap->drawable, GLAMOR_ACCESS_RO);
-
if ((fst_type == SourcePictTypeLinear) ||
(fst_type == SourcePictTypeRadial) ||
(fst_type == SourcePictTypeConical) ||
@@ -1444,12 +1440,15 @@ glamor_compare_pictures(ScreenPtr screen,
x_source = y_source = 0;
}
- _glamor_compare_pixmaps(fst_pixmap, snd_pixmap,
- x_source, y_source,
- width, height, fst_picture->format, all, diffs);
-
- glamor_finish_access(&fst_pixmap->drawable, GLAMOR_ACCESS_RO);
- glamor_finish_access(&snd_pixmap->drawable, GLAMOR_ACCESS_RO);
+ if (glamor_prepare_access(&fst_pixmap->drawable, GLAMOR_ACCESS_RO) &&
+ glamor_prepare_access(&snd_pixmap->drawable, GLAMOR_ACCESS_RO)) {
+ _glamor_compare_pixmaps(fst_pixmap, snd_pixmap,
+ x_source, y_source,
+ width, height, fst_picture->format,
+ all, diffs);
+ }
+ glamor_finish_access(&fst_pixmap->drawable);
+ glamor_finish_access(&snd_pixmap->drawable);
if (fst_generated)
glamor_destroy_picture(fst_picture);