mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Merge branch 'master' into XACE-SELINUX
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stddef.h> /* buggy openssl/sha.h wants size_t */
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#include "misc.h"
|
||||
@@ -611,20 +611,22 @@ GlyphExtents (int nlist,
|
||||
|
||||
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
|
||||
|
||||
/* Stub ABI compatibility for mi*Glyph, should go away */
|
||||
_X_EXPORT void
|
||||
miGlyphs (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
int nlist,
|
||||
GlyphListPtr list,
|
||||
GlyphPtr *glyphs)
|
||||
CompositeGlyphs (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
int nlist,
|
||||
GlyphListPtr lists,
|
||||
GlyphPtr *glyphs)
|
||||
{
|
||||
CompositeGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list,
|
||||
glyphs);
|
||||
PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen);
|
||||
|
||||
ValidatePicture (pSrc);
|
||||
ValidatePicture (pDst);
|
||||
(*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, lists, glyphs);
|
||||
}
|
||||
|
||||
Bool
|
||||
@@ -641,15 +643,15 @@ miUnrealizeGlyph (ScreenPtr pScreen,
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
CompositeGlyphs (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
int nlist,
|
||||
GlyphListPtr list,
|
||||
GlyphPtr *glyphs)
|
||||
miGlyphs (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
int nlist,
|
||||
GlyphListPtr list,
|
||||
GlyphPtr *glyphs)
|
||||
{
|
||||
PicturePtr pPicture;
|
||||
PixmapPtr pMaskPixmap = 0;
|
||||
@@ -664,9 +666,6 @@ CompositeGlyphs (CARD8 op,
|
||||
BoxRec extents = {0, 0, 0, 0};
|
||||
CARD32 component_alpha;
|
||||
|
||||
ValidatePicture (pSrc);
|
||||
ValidatePicture (pDst);
|
||||
|
||||
if (maskFormat)
|
||||
{
|
||||
GCPtr pGC;
|
||||
@@ -679,7 +678,8 @@ CompositeGlyphs (CARD8 op,
|
||||
width = extents.x2 - extents.x1;
|
||||
height = extents.y2 - extents.y1;
|
||||
pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
|
||||
maskFormat->depth);
|
||||
maskFormat->depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
if (!pMaskPixmap)
|
||||
return;
|
||||
component_alpha = NeedsComponent(maskFormat->format);
|
||||
|
||||
@@ -636,7 +636,7 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
|
||||
|
||||
/* MI rendering routines */
|
||||
ps->Composite = 0; /* requires DDX support */
|
||||
ps->Glyphs = NULL;
|
||||
ps->Glyphs = miGlyphs;
|
||||
ps->CompositeRects = miCompositeRects;
|
||||
ps->Trapezoids = miTrapezoids;
|
||||
ps->Triangles = miTriangles;
|
||||
|
||||
@@ -135,8 +135,8 @@ miCompositeRects (CARD8 op,
|
||||
if (!rgbaFormat)
|
||||
goto bail1;
|
||||
|
||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1,
|
||||
rgbaFormat->depth);
|
||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, rgbaFormat->depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
if (!pPixmap)
|
||||
goto bail2;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ miCreateAlphaPicture (ScreenPtr pScreen,
|
||||
}
|
||||
|
||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
|
||||
pPictFormat->depth);
|
||||
pPictFormat->depth, 0);
|
||||
if (!pPixmap)
|
||||
return 0;
|
||||
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
|
||||
|
||||
@@ -144,7 +144,7 @@ miTriStrip (CARD8 op,
|
||||
if (npoint < 3)
|
||||
return;
|
||||
ntri = npoint - 2;
|
||||
tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
|
||||
tris = xalloc (ntri * sizeof (xTriangle));
|
||||
if (!tris)
|
||||
return;
|
||||
for (tri = tris; npoint >= 3; npoint--, points++, tri++)
|
||||
@@ -154,7 +154,7 @@ miTriStrip (CARD8 op,
|
||||
tri->p3 = points[2];
|
||||
}
|
||||
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
|
||||
DEALLOCATE_LOCAL (tris);
|
||||
xfree (tris);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -176,7 +176,7 @@ miTriFan (CARD8 op,
|
||||
if (npoint < 3)
|
||||
return;
|
||||
ntri = npoint - 2;
|
||||
tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
|
||||
tris = xalloc (ntri * sizeof (xTriangle));
|
||||
if (!tris)
|
||||
return;
|
||||
first = points++;
|
||||
@@ -187,5 +187,5 @@ miTriFan (CARD8 op,
|
||||
tri->p3 = points[1];
|
||||
}
|
||||
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
|
||||
DEALLOCATE_LOCAL (tris);
|
||||
xfree (tris);
|
||||
}
|
||||
|
||||
@@ -1291,7 +1291,8 @@ ProcRenderAddGlyphs (ClientPtr client)
|
||||
}
|
||||
|
||||
pDstPix = (pScreen->CreatePixmap) (pScreen,
|
||||
width, height, depth);
|
||||
width, height, depth,
|
||||
CREATE_PIMXAP_USAGE_GLYPH_PICTURE);
|
||||
|
||||
GlyphPicture (glyph)[screen] = pDst =
|
||||
CreatePicture (0, &pDstPix->drawable,
|
||||
@@ -1495,7 +1496,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||
glyphsBase = glyphsLocal;
|
||||
else
|
||||
{
|
||||
glyphsBase = (GlyphPtr *) ALLOCATE_LOCAL (nglyph * sizeof (GlyphPtr));
|
||||
glyphsBase = (GlyphPtr *) xalloc (nglyph * sizeof (GlyphPtr));
|
||||
if (!glyphsBase)
|
||||
return BadAlloc;
|
||||
}
|
||||
@@ -1503,7 +1504,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||
listsBase = listsLocal;
|
||||
else
|
||||
{
|
||||
listsBase = (GlyphListPtr) ALLOCATE_LOCAL (nlist * sizeof (GlyphListRec));
|
||||
listsBase = (GlyphListPtr) xalloc (nlist * sizeof (GlyphListRec));
|
||||
if (!listsBase)
|
||||
return BadAlloc;
|
||||
}
|
||||
@@ -1528,9 +1529,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||
{
|
||||
client->errorValue = gs;
|
||||
if (glyphsBase != glyphsLocal)
|
||||
DEALLOCATE_LOCAL (glyphsBase);
|
||||
xfree (glyphsBase);
|
||||
if (listsBase != listsLocal)
|
||||
DEALLOCATE_LOCAL (listsBase);
|
||||
xfree (listsBase);
|
||||
return RenderErrBase + BadGlyphSet;
|
||||
}
|
||||
}
|
||||
@@ -1584,9 +1585,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||
glyphsBase);
|
||||
|
||||
if (glyphsBase != glyphsLocal)
|
||||
DEALLOCATE_LOCAL (glyphsBase);
|
||||
xfree (glyphsBase);
|
||||
if (listsBase != listsLocal)
|
||||
DEALLOCATE_LOCAL (listsBase);
|
||||
xfree (listsBase);
|
||||
|
||||
return client->noClientException;
|
||||
}
|
||||
@@ -1723,7 +1724,8 @@ ProcRenderCreateCursor (ClientPtr client)
|
||||
xfree (mskbits);
|
||||
return (BadImplementation);
|
||||
}
|
||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32);
|
||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
if (!pPixmap)
|
||||
{
|
||||
xfree (argbbits);
|
||||
@@ -3075,7 +3077,7 @@ PanoramiXRenderFillRectangles (ClientPtr client)
|
||||
RenderErrBase + BadPicture);
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderFillRectanglesReq);
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len)))
|
||||
(extra = (char *) xalloc (extra_len)))
|
||||
{
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3101,7 +3103,7 @@ PanoramiXRenderFillRectangles (ClientPtr client)
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3126,7 +3128,7 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
|
||||
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len))) {
|
||||
(extra = (char *) xalloc (extra_len))) {
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3163,7 +3165,7 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3188,7 +3190,7 @@ PanoramiXRenderTriangles(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
|
||||
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len))) {
|
||||
(extra = (char *) xalloc (extra_len))) {
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3221,7 +3223,7 @@ PanoramiXRenderTriangles(ClientPtr client)
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3246,7 +3248,7 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq);
|
||||
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len))) {
|
||||
(extra = (char *) xalloc (extra_len))) {
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3275,7 +3277,7 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3300,7 +3302,7 @@ PanoramiXRenderTriFan(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq);
|
||||
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len))) {
|
||||
(extra = (char *) xalloc (extra_len))) {
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3329,7 +3331,7 @@ PanoramiXRenderTriFan(ClientPtr client)
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3354,7 +3356,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderColorTrapezoidsReq);
|
||||
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len))) {
|
||||
(extra = (char *) xalloc (extra_len))) {
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3375,7 +3377,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3398,7 +3400,7 @@ PanoramiXRenderColorTriangles(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderColorTrianglesReq);
|
||||
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len))) {
|
||||
(extra = (char *) xalloc (extra_len))) {
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
@@ -3419,7 +3421,7 @@ PanoramiXRenderColorTriangles(ClientPtr client)
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3442,7 +3444,7 @@ PanoramiXRenderAddTraps (ClientPtr client)
|
||||
RenderErrBase + BadPicture);
|
||||
extra_len = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
|
||||
if (extra_len &&
|
||||
(extra = (char *) ALLOCATE_LOCAL (extra_len)))
|
||||
(extra = (char *) xalloc (extra_len)))
|
||||
{
|
||||
memcpy (extra, stuff + 1, extra_len);
|
||||
x_off = stuff->xOff;
|
||||
@@ -3459,7 +3461,7 @@ PanoramiXRenderAddTraps (ClientPtr client)
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
xfree(extra);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user