diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2016-05-29 12:02:41 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2016-05-29 12:02:41 +0000 |
commit | 4a991716ac65d28a68f9943d54c4b74ad0b58f65 (patch) | |
tree | c037c3fe64bb15ea67dbf03a96783a8b04085371 /xserver/render/picture.c | |
parent | 549cb8bcb6bdd3a7d44f3b9fdc003df777b2b0d2 (diff) |
Update to xserver 1.18.3. Tested by shadchin@ and naddy@.
Note that indirect GLX is now disbled by default.
Diffstat (limited to 'xserver/render/picture.c')
-rw-r--r-- | xserver/render/picture.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/xserver/render/picture.c b/xserver/render/picture.c index 6e23e2bbf..9e4036e7d 100644 --- a/xserver/render/picture.c +++ b/xserver/render/picture.c @@ -61,7 +61,7 @@ PictureWindowFormat(WindowPtr pWindow) WindowGetVisual(pWindow)); } -Bool +static Bool PictureDestroyWindow(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; @@ -82,7 +82,7 @@ PictureDestroyWindow(WindowPtr pWindow) return ret; } -Bool +static Bool PictureCloseScreen(ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); @@ -102,7 +102,7 @@ PictureCloseScreen(ScreenPtr pScreen) return ret; } -void +static void PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef) { ScreenPtr pScreen = pColormap->pScreen; @@ -163,7 +163,7 @@ addFormat(FormatInitRec formats[256], int nformat, CARD32 format, CARD8 depth) #define Mask(n) ((1 << (n)) - 1) -PictFormatPtr +static PictFormatPtr PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) { int nformats, f; @@ -439,7 +439,7 @@ PictureFindVisual(ScreenPtr pScreen, VisualID visual) return 0; } -Bool +static Bool PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -625,6 +625,12 @@ GetPictureBytes(void *value, XID id, ResourceSizePtr size) } } +static int +FreePictFormat(void *pPictFormat, XID pid) +{ + return Success; +} + Bool PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) { @@ -659,6 +665,9 @@ PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) for (n = 0; n < nformats; n++) { if (!AddResource (formats[n].id, PictFormatType, (void *) (formats + n))) { + int i; + for (i = 0; i < n; i++) + FreeResource(formats[i].id, RT_NONE); free(formats); return FALSE; } @@ -724,7 +733,7 @@ PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) return TRUE; } -void +static void SetPictureToDefaults(PicturePtr pPicture) { pPicture->refcnt = 1; @@ -837,7 +846,7 @@ initGradient(SourcePictPtr pGradient, int stopCount, dpos = stopPoints[i]; } - pGradient->gradient.stops = malloc(stopCount * sizeof(PictGradientStop)); + pGradient->gradient.stops = xallocarray(stopCount, sizeof(PictGradientStop)); if (!pGradient->gradient.stops) { *error = BadAlloc; return; @@ -1435,12 +1444,6 @@ FreePicture(void *value, XID pid) return Success; } -int -FreePictFormat(void *pPictFormat, XID pid) -{ - return Success; -} - /** * ReduceCompositeOp is used to choose simpler ops for cases where alpha * channels are always one and so math on the alpha channel per pixel becomes |