summaryrefslogtreecommitdiff
path: root/src/sna/sna_threads.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-25 10:45:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-25 10:51:34 +0000
commit8ffb3f50b3b4601401da76e2848e059ab63231f4 (patch)
tree16ea1e58869c114b632ce0d78c066ea163de7a6f /src/sna/sna_threads.c
parent0ec2f3a8bac96acc55c8fdb432b97d026abaafb4 (diff)
sna: Spawn threads to rasterize trapezoids through pixman
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_threads.c')
-rw-r--r--src/sna/sna_threads.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sna/sna_threads.c b/src/sna/sna_threads.c
index 3cda969c..4a98753f 100644
--- a/src/sna/sna_threads.c
+++ b/src/sna/sna_threads.c
@@ -275,7 +275,7 @@ void sna_image_composite(pixman_op_t op,
data[0].width = width;
data[0].height = dy;
- for (n = 0; n < num_threads - 1; n++) {
+ for (n = 1; n < num_threads; n++) {
data[n] = data[0];
data[n].src_y += y - dst_y;
data[n].mask_y += y - dst_y;
@@ -288,13 +288,12 @@ void sna_image_composite(pixman_op_t op,
if (y + dy > dst_y + height)
dy = dst_y + height - y;
- data[n] = data[0];
- data[n].src_y += y - dst_y;
- data[n].mask_y += y - dst_y;
- data[n].dst_y = y;
- data[n].height = dy;
+ data[0].src_y += y - dst_y;
+ data[0].mask_y += y - dst_y;
+ data[0].dst_y = y;
+ data[0].height = dy;
- thread_composite(&data[n]);
+ thread_composite(&data[0]);
sna_threads_wait();
}