From aa3c6aaaab213200591d29ddb2921adfb87ee5b4 Mon Sep 17 00:00:00 2001 From: Søren Sandmann Pedersen Date: Mon, 6 Aug 2007 19:00:59 -0400 Subject: Require pixman-1 0.9.4, update pixman includes to new scheme --- render/picture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'render') diff --git a/render/picture.h b/render/picture.h index 1719587a5..563a81b43 100644 --- a/render/picture.h +++ b/render/picture.h @@ -25,7 +25,7 @@ #ifndef _PICTURE_H_ #define _PICTURE_H_ -#include +#include typedef struct _DirectFormat *DirectFormatPtr; typedef struct _PictFormat *PictFormatPtr; -- cgit v1.2.3 From feb1b3e45513bd6eaa2e6a5ee536183f20d9cb68 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 22 Aug 2007 16:54:29 +0100 Subject: Fix include to --- fb/fb.h | 2 +- include/miscstruct.h | 2 +- mi/miregion.c | 2 +- render/picture.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'render') diff --git a/fb/fb.h b/fb/fb.h index df430b8fd..27b49f681 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -26,7 +26,7 @@ #define _FB_H_ #include -#include +#include #include "scrnintstr.h" #include "pixmap.h" diff --git a/include/miscstruct.h b/include/miscstruct.h index d240f1b28..4f5b1d516 100644 --- a/include/miscstruct.h +++ b/include/miscstruct.h @@ -51,7 +51,7 @@ SOFTWARE. #include "misc.h" #include #include "gc.h" -#include +#include typedef xPoint DDXPointRec; diff --git a/mi/miregion.c b/mi/miregion.c index 45768a34f..28d38a254 100644 --- a/mi/miregion.c +++ b/mi/miregion.c @@ -85,7 +85,7 @@ Equipment Corporation. #include "gc.h" #include "mi.h" #include "mispans.h" -#include +#include #undef assert #ifdef DEBUG diff --git a/render/picture.h b/render/picture.h index 563a81b43..1719587a5 100644 --- a/render/picture.h +++ b/render/picture.h @@ -25,7 +25,7 @@ #ifndef _PICTURE_H_ #define _PICTURE_H_ -#include +#include typedef struct _DirectFormat *DirectFormatPtr; typedef struct _PictFormat *PictFormatPtr; -- cgit v1.2.3 From d0dc9698ae4324d44ed4c0482d6858d0b73bff33 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 22 Aug 2007 09:00:45 -0700 Subject: Revert "Fix include to " The pixman headers have been located under pixman-1/ instead of pixman/ since around 2007-08-06, and pixman-1.pc has the updated include paths to account for this. This reverts commit feb1b3e45513bd6eaa2e6a5ee536183f20d9cb68. --- fb/fb.h | 2 +- include/miscstruct.h | 2 +- mi/miregion.c | 2 +- render/picture.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'render') diff --git a/fb/fb.h b/fb/fb.h index 27b49f681..df430b8fd 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -26,7 +26,7 @@ #define _FB_H_ #include -#include +#include #include "scrnintstr.h" #include "pixmap.h" diff --git a/include/miscstruct.h b/include/miscstruct.h index 4f5b1d516..d240f1b28 100644 --- a/include/miscstruct.h +++ b/include/miscstruct.h @@ -51,7 +51,7 @@ SOFTWARE. #include "misc.h" #include #include "gc.h" -#include +#include typedef xPoint DDXPointRec; diff --git a/mi/miregion.c b/mi/miregion.c index 28d38a254..45768a34f 100644 --- a/mi/miregion.c +++ b/mi/miregion.c @@ -85,7 +85,7 @@ Equipment Corporation. #include "gc.h" #include "mi.h" #include "mispans.h" -#include +#include #undef assert #ifdef DEBUG diff --git a/render/picture.h b/render/picture.h index 1719587a5..563a81b43 100644 --- a/render/picture.h +++ b/render/picture.h @@ -25,7 +25,7 @@ #ifndef _PICTURE_H_ #define _PICTURE_H_ -#include +#include typedef struct _DirectFormat *DirectFormatPtr; typedef struct _PictFormat *PictFormatPtr; -- cgit v1.2.3 From 6f44a2c8a8d6e8f95681ebc7b2dd5ad9c3a02c6e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 29 Jul 2007 14:16:10 -0400 Subject: Refactor PictureInitIndexedFormats. The plural version is now static, which is fine since it was only ever called from within picture post-init anyway. The body of the work is now done with a one-shot (public) function that operates on a single format at a time. --- render/picture.c | 48 ++++++++++++++++++++++++------------------------ render/picturestr.h | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'render') diff --git a/render/picture.c b/render/picture.c index 5ddd68ce3..ede865f28 100644 --- a/render/picture.c +++ b/render/picture.c @@ -452,6 +452,28 @@ PictureFindVisual (ScreenPtr pScreen, VisualID visual) } Bool +PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format) +{ + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + + if (format->type != PictTypeIndexed || format->index.pColormap) + return TRUE; + + if (format->index.vid == pScreen->rootVisual) { + format->index.pColormap = + (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); + } else { + VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid); + if (!CreateColormap(FakeClientID (0), pScreen, pVisual, + &format->index.pColormap, AllocNone, 0)) + return FALSE; + } + if (!ps->InitIndexed(pScreen, format)) + return FALSE; + return TRUE; +} + +static Bool PictureInitIndexedFormats (ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -463,30 +485,8 @@ PictureInitIndexedFormats (ScreenPtr pScreen) format = ps->formats; nformat = ps->nformats; while (nformat--) - { - if (format->type == PictTypeIndexed && !format->index.pColormap) - { - if (format->index.vid == pScreen->rootVisual) - format->index.pColormap = (ColormapPtr) LookupIDByType(pScreen->defColormap, - RT_COLORMAP); - else - { - VisualPtr pVisual; - - pVisual = PictureFindVisual (pScreen, format->index.vid); - if (CreateColormap (FakeClientID (0), pScreen, - pVisual, - &format->index.pColormap, AllocNone, - 0) != Success) - { - return FALSE; - } - } - if (!(*ps->InitIndexed) (pScreen, format)) - return FALSE; - } - format++; - } + if (!PictureInitIndexedFormat(pScreen, format++)) + return FALSE; return TRUE; } diff --git a/render/picturestr.h b/render/picturestr.h index 01572ec48..005c58808 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -449,7 +449,7 @@ void PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef); Bool -PictureInitIndexedFormats (ScreenPtr pScreen); +PictureInitIndexedFormat (ScreenPtr pScreen, PictFormatPtr format); Bool PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel); -- cgit v1.2.3