aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_polyfillrect.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glamor/glamor_polyfillrect.c')
-rw-r--r--xorg-server/glamor/glamor_polyfillrect.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/xorg-server/glamor/glamor_polyfillrect.c b/xorg-server/glamor/glamor_polyfillrect.c
index a25fc4ed5..1e361a44f 100644
--- a/xorg-server/glamor/glamor_polyfillrect.c
+++ b/xorg-server/glamor/glamor_polyfillrect.c
@@ -96,13 +96,12 @@ _glamor_poly_fill_rect(DrawablePtr drawable,
glamor_fallback(" to %p (%c)\n",
drawable, glamor_get_drawable_location(drawable));
- if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW)) {
- if (glamor_prepare_access_gc(gc)) {
- fbPolyFillRect(drawable, gc, nrect, prect);
- glamor_finish_access_gc(gc);
- }
- glamor_finish_access(drawable, GLAMOR_ACCESS_RW);
+ if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW) &&
+ glamor_prepare_access_gc(gc)) {
+ fbPolyFillRect(drawable, gc, nrect, prect);
}
+ glamor_finish_access_gc(gc);
+ glamor_finish_access(drawable);
ret = TRUE;
done: