summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--miext/cw/cw.h3
-rw-r--r--render/picture.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 84e7ff670..0ea3c5183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-16 Adam Jackson <ajax@freedesktop.org>
+
+ * render/picture.c:
+ * miext/cw/cw.h:
+ Bug #6191: Sync Render gradient fixes from head. (Lars Knoll)
+
2006-03-14 Eric Anholt <anholt@FreeBSD.org>
* GL/mesa/array_cache/Makefile.am:
diff --git a/miext/cw/cw.h b/miext/cw/cw.h
index 167308eb6..ca096fad8 100644
--- a/miext/cw/cw.h
+++ b/miext/cw/cw.h
@@ -60,7 +60,8 @@ typedef struct {
unsigned long stateChanges;
} cwPictureRec, *cwPicturePtr;
-#define getCwPicture(pPicture) ((cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr)
+#define getCwPicture(pPicture) \
+ (pPicture->pDrawable ? ((cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr) : 0)
#define setCwPicture(pPicture,p) ((pPicture)->devPrivates[cwPictureIndex].ptr = (pointer) (p))
extern int cwPictureIndex;
diff --git a/render/picture.c b/render/picture.c
index 522eb4fa9..cc1336994 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -974,8 +974,10 @@ static PicturePtr createSourcePicture(void)
PicturePtr pPicture;
pPicture = (PicturePtr) xalloc(sizeof(PictureRec));
pPicture->pDrawable = 0;
+ pPicture->format = PICT_a8r8g8b8;
pPicture->pFormat = 0;
pPicture->pNext = 0;
+ pPicture->devPrivates = 0;
SetPictureToDefaults(pPicture);
return pPicture;