summaryrefslogtreecommitdiff
path: root/src/sna/sna_threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_threads.c')
-rw-r--r--src/sna/sna_threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_threads.c b/src/sna/sna_threads.c
index 3e10e5a4..333b7ebd 100644
--- a/src/sna/sna_threads.c
+++ b/src/sna/sna_threads.c
@@ -274,7 +274,7 @@ void sna_image_composite(pixman_op_t op,
y = dst_y;
dy = (height + num_threads - 1) / num_threads;
- num_threads = (height + dy - 1) / dy;
+ num_threads -= (num_threads-1) * dy >= height;
data[0].op = op;
data[0].src = src;