diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-08 09:25:34 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-05-13 16:24:54 -0700 |
commit | 95728ca09d45afc84c8d1828c09c6b6725f1a58d (patch) | |
tree | e06968a506dcc731f93c97335d56458262a87a7a /mi | |
parent | bff8525f8483304d5f93e83e36b47209381da721 (diff) |
Don't statically allocate the ChangeGC parameter array.
Because that's insane.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'mi')
-rw-r--r-- | mi/miarc.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/mi/miarc.c b/mi/miarc.c index 36b71bf80..f2959c77b 100644 --- a/mi/miarc.c +++ b/mi/miarc.c @@ -213,16 +213,6 @@ typedef struct _miPolyArc { miArcJoinPtr joins; } miPolyArcRec, *miPolyArcPtr; -#define GCValsFunction 0 -#define GCValsForeground 1 -#define GCValsBackground 2 -#define GCValsLineWidth 3 -#define GCValsCapStyle 4 -#define GCValsJoinStyle 5 -#define GCValsMask (GCFunction | GCForeground | GCBackground | \ - GCLineWidth | GCCapStyle | GCJoinStyle) -static CARD32 gcvals[6]; - static void fillSpans(DrawablePtr pDrawable, GCPtr pGC); static void newFinalSpan(int y, int xmin, int xmax); static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right, @@ -1045,13 +1035,18 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) pGCTo = GetScratchGC(1, pDraw->pScreen); if (!pGCTo) return; - gcvals[GCValsFunction] = GXcopy; - gcvals[GCValsForeground] = 1; - gcvals[GCValsBackground] = 0; - gcvals[GCValsLineWidth] = pGC->lineWidth; - gcvals[GCValsCapStyle] = pGC->capStyle; - gcvals[GCValsJoinStyle] = pGC->joinStyle; - dixChangeGC(NullClient, pGCTo, GCValsMask, gcvals, NULL); + { + CARD32 gcvals[6]; + gcvals[0] = GXcopy; + gcvals[1] = 1; + gcvals[2] = 0; + gcvals[3] = pGC->lineWidth; + gcvals[4] = pGC->capStyle; + gcvals[5] = pGC->joinStyle; + dixChangeGC(NullClient, pGCTo, GCFunction | + GCForeground | GCBackground | GCLineWidth | + GCCapStyle | GCJoinStyle, gcvals, NULL); + } /* allocate a 1 bit deep pixmap of the appropriate size, and * validate it */ |