/[pkg-src]/trunk/xorg-server/patches/xorg-server-1.17.1-mi-partial-pie-slice-filled-arcs-may-need-more-space.patch |
Contents of /trunk/xorg-server/patches/xorg-server-1.17.1-mi-partial-pie-slice-filled-arcs-may-need-more-space.patch
Parent Directory | Revision Log
Revision 2576 -
(show annotations)
(download)
Mon Jun 15 13:02:17 2015 UTC (9 years, 3 months ago) by niro
File size: 1565 byte(s)
Mon Jun 15 13:02:17 2015 UTC (9 years, 3 months ago) by niro
File size: 1565 byte(s)
-fixed garbage patches
1 | From 41932dfbc841a1adc6512d41085ea3f8ebecb42c Mon Sep 17 00:00:00 2001 |
2 | From: Keith Packard <keithp@keithp.com> |
3 | Date: Wed, 8 Apr 2015 07:45:28 -0700 |
4 | Subject: [PATCH] mi: Partial pie-slice filled arcs may need more space for |
5 | spans |
6 | |
7 | The mi filled arc code estimates that a filled arc will produce no |
8 | more spans than the arc is tall. This is true for most arcs except |
9 | for pie-slice arcs strictly between 180 and 360 degrees where the missing |
10 | portion of the arc faces up or down such that we get two spans on some |
11 | scanlines. |
12 | |
13 | For those, we need to reserve room for another height/2 spans. This |
14 | patch just does it for all partial pie-sliced arcs to make the test |
15 | easier to understand; it's just over-allocating a bit of memory, so |
16 | that's safe. |
17 | |
18 | Signed-off-by: Keith Packard <keithp@keithp.com> |
19 | Reviewed-by: Adam Jackson <ajax@redhat.com> |
20 | --- |
21 | mi/mifillarc.c | 5 +++++ |
22 | 1 file changed, 5 insertions(+) |
23 | |
24 | diff --git a/mi/mifillarc.c b/mi/mifillarc.c |
25 | index 246d70f..888519e 100644 |
26 | --- a/mi/mifillarc.c |
27 | +++ b/mi/mifillarc.c |
28 | @@ -660,6 +660,11 @@ miPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs_all, xArc * parcs) |
29 | if (narcs && nspans + arc->height > MAX_SPANS_PER_LOOP) |
30 | break; |
31 | nspans += arc->height; |
32 | + |
33 | + /* A pie-slice arc may add another pile of spans */ |
34 | + if (pGC->arcMode == ArcPieSlice && |
35 | + (-FULLCIRCLE < arc->angle2 && arc->angle2 < FULLCIRCLE)) |
36 | + nspans += (arc->height + 1) >> 1; |
37 | } |
38 | |
39 | pts = points = malloc (sizeof (DDXPointRec) * nspans + |
40 | -- |
41 | 2.3.5 |
42 |