summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/sna_io.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index be819688..2bd6b82d 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -700,13 +700,12 @@ bool sna_write_boxes(struct sna *sna, PixmapPtr dst,
DBG(("%s x %d, src stride=%d, src dx=(%d, %d)\n", __FUNCTION__, nbox, stride, src_dx, src_dy));
- if (upload_inplace(kgem, dst_bo, box, nbox, dst->drawable.bitsPerPixel)) {
-fallback:
- return write_boxes_inplace(kgem,
- src, stride, dst->drawable.bitsPerPixel, src_dx, src_dy,
- dst_bo, dst_dx, dst_dy,
- box, nbox);
- }
+ if (upload_inplace(kgem, dst_bo, box, nbox, dst->drawable.bitsPerPixel)&&
+ write_boxes_inplace(kgem,
+ src, stride, dst->drawable.bitsPerPixel, src_dx, src_dy,
+ dst_bo, dst_dx, dst_dy,
+ box, nbox))
+ return true;
can_blt = kgem_bo_can_blt(kgem, dst_bo) &&
(box[0].x2 - box[0].x1) * dst->drawable.bitsPerPixel < 8 * (MAXSHORT - 4);
@@ -996,6 +995,12 @@ tile:
sna->blt_state.fill_bo = 0;
return true;
+
+fallback:
+ return write_boxes_inplace(kgem,
+ src, stride, dst->drawable.bitsPerPixel, src_dx, src_dy,
+ dst_bo, dst_dx, dst_dy,
+ box, nbox);
}
static void