summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-31 12:53:35 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-31 12:53:35 +0000
commit7172f28c2b36aaa8c3a74ae4a7f699d3d4af10eb (patch)
tree98b12420fc999e7ba4dcc890347d78e9afcbbcf9
parent59535d0e1c587cfe9249ab1baf9acf8470b49b8b (diff)
sna: Fix placement of clipped wide PolyRectangle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index feb13e9f..5f7e3b99 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4356,7 +4356,7 @@ zero_clipped:
box[1].y2 += rr.height;
box[2].y1 = rr.y + 1;
- box[2].y2 = box[2].y1 + rr.height;
+ box[2].y2 = rr.y + rr.height;
box[2].x1 = rr.x;
box[2].x2 = rr.x + 1;
@@ -4414,7 +4414,7 @@ zero_clipped:
box[1].y2 += rr.height;
box[2].y1 = rr.y + 1;
- box[2].y2 = box[2].y1 + rr.height;
+ box[2].y2 = rr.y + rr.height;
box[2].x1 = rr.x;
box[2].x2 = rr.x + 1;
@@ -4495,12 +4495,11 @@ wide_clipped:
box[1].y1 = rr.y + offset3;
box[1].y2 = rr.y + rr.height - offset1;
- box[2].x1 = rr.x + rr.width - offset1;
- box[2].x2 = box[2].x1 + offset2;
- box[2].y1 = rr.y + offset3;
- box[2].y2 = rr.y + rr.height - offset1;
+ box[2] = box[1];
+ box[3].x1 += rr.width;
+ box[3].x2 += rr.width;
- box[3] = box[1];
+ box[3] = box[0];
box[3].y1 += rr.height;
box[3].y2 += rr.height;
count = 4;
@@ -4564,12 +4563,11 @@ wide_clipped:
box[1].y1 = rr.y + offset3;
box[1].y2 = rr.y + rr.height - offset1;
- box[2].x1 = rr.x + rr.width - offset1;
- box[2].x2 = box[2].x1 + offset2;
- box[2].y1 = rr.y + offset3;
- box[2].y2 = rr.y + rr.height - offset1;
+ box[2] = box[1];
+ box[3].x1 += rr.width;
+ box[3].x2 += rr.width;
- box[3] = box[1];
+ box[3] = box[0];
box[3].y1 += rr.height;
box[3].y2 += rr.height;
count = 4;