summaryrefslogtreecommitdiff
path: root/src/glamor_polyfillrect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glamor_polyfillrect.c')
-rw-r--r--src/glamor_polyfillrect.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/glamor_polyfillrect.c b/src/glamor_polyfillrect.c
index 4e1f7b3..2efbd76 100644
--- a/src/glamor_polyfillrect.c
+++ b/src/glamor_polyfillrect.c
@@ -98,13 +98,12 @@ fail:
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: