summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids_boxes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_trapezoids_boxes.c')
-rw-r--r--src/sna/sna_trapezoids_boxes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_trapezoids_boxes.c b/src/sna/sna_trapezoids_boxes.c
index d7861d2f..4b0346b9 100644
--- a/src/sna/sna_trapezoids_boxes.c
+++ b/src/sna/sna_trapezoids_boxes.c
@@ -1171,6 +1171,7 @@ composite_unaligned_boxes_inplace(struct sna *sna,
y = clip.extents.y1;
dy = (clip.extents.y2 - clip.extents.y1 + num_threads - 1) / num_threads;
+ num_threads = (clip.extents.y2 - clip.extents.y1 + dy - 1) / dy;
for (i = 1; i < num_threads; i++) {
thread[i] = thread[0];
@@ -1179,6 +1180,7 @@ composite_unaligned_boxes_inplace(struct sna *sna,
sna_threads_run(rectilinear_inplace_thread, &thread[i]);
}
+ assert(y < clip.extents.y2);
thread[0].y1 = y;
thread[0].y2 = clip.extents.y2;
rectilinear_inplace_thread(&thread[0]);