Merge remote-tracking branch 'aplattner/for-master'
This commit is contained in:
		
						commit
						ff61592441
					
				| 
						 | 
					@ -549,18 +549,31 @@ int
 | 
				
			||||||
ProcRRDeleteOutputProperty (ClientPtr client)
 | 
					ProcRRDeleteOutputProperty (ClientPtr client)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    REQUEST(xRRDeleteOutputPropertyReq);
 | 
					    REQUEST(xRRDeleteOutputPropertyReq);
 | 
				
			||||||
    RROutputPtr	output;
 | 
					    RROutputPtr		output;
 | 
				
			||||||
              
 | 
					    RRPropertyPtr	prop;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
 | 
					    REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
 | 
				
			||||||
    UpdateCurrentTime();
 | 
					    UpdateCurrentTime();
 | 
				
			||||||
    VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
 | 
					    VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    if (!ValidAtom(stuff->property))
 | 
					    if (!ValidAtom(stuff->property))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
	client->errorValue = stuff->property;
 | 
						client->errorValue = stuff->property;
 | 
				
			||||||
	return BadAtom;
 | 
						return BadAtom;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    prop = RRQueryOutputProperty(output, stuff->property);
 | 
				
			||||||
 | 
					    if (!prop)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
						client->errorValue = stuff->property;
 | 
				
			||||||
 | 
						return BadName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (prop->immutable)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
						client->errorValue = stuff->property;
 | 
				
			||||||
 | 
						return BadAccess;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    RRDeleteOutputProperty(output, stuff->property);
 | 
					    RRDeleteOutputProperty(output, stuff->property);
 | 
				
			||||||
    return Success;
 | 
					    return Success;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -569,6 +569,64 @@ miRenderPixelToColor (PictFormatPtr format,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					miTriStrip (CARD8	    op,
 | 
				
			||||||
 | 
						    PicturePtr	    pSrc,
 | 
				
			||||||
 | 
						    PicturePtr	    pDst,
 | 
				
			||||||
 | 
						    PictFormatPtr  maskFormat,
 | 
				
			||||||
 | 
						    INT16	    xSrc,
 | 
				
			||||||
 | 
						    INT16	    ySrc,
 | 
				
			||||||
 | 
						    int		    npoints,
 | 
				
			||||||
 | 
						    xPointFixed    *points)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    xTriangle           *tris, *tri;
 | 
				
			||||||
 | 
					    int                 ntri;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ntri = npoints - 2;
 | 
				
			||||||
 | 
					    tris = malloc(ntri * sizeof (xTriangle));
 | 
				
			||||||
 | 
					    if (!tris)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (tri = tris; npoints >= 3; npoints--, points++, tri++)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        tri->p1 = points[0];
 | 
				
			||||||
 | 
					        tri->p2 = points[1];
 | 
				
			||||||
 | 
					        tri->p3 = points[2];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
 | 
				
			||||||
 | 
					    free(tris);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					miTriFan (CARD8		op,
 | 
				
			||||||
 | 
						  PicturePtr	pSrc,
 | 
				
			||||||
 | 
						  PicturePtr	pDst,
 | 
				
			||||||
 | 
						  PictFormatPtr	maskFormat,
 | 
				
			||||||
 | 
						  INT16		xSrc,
 | 
				
			||||||
 | 
						  INT16		ySrc,
 | 
				
			||||||
 | 
						  int		npoints,
 | 
				
			||||||
 | 
						  xPointFixed	*points)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    xTriangle		*tris, *tri;
 | 
				
			||||||
 | 
					    xPointFixed		*first;
 | 
				
			||||||
 | 
					    int			ntri;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ntri = npoints - 2;
 | 
				
			||||||
 | 
					    tris = malloc(ntri * sizeof (xTriangle));
 | 
				
			||||||
 | 
					    if (!tris)
 | 
				
			||||||
 | 
						return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    first = points++;
 | 
				
			||||||
 | 
					    for (tri = tris; npoints >= 3; npoints--, points++, tri++)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
						tri->p1 = *first;
 | 
				
			||||||
 | 
						tri->p2 = points[0];
 | 
				
			||||||
 | 
						tri->p3 = points[1];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
 | 
				
			||||||
 | 
					    free(tris);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Bool
 | 
					Bool
 | 
				
			||||||
miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
 | 
					miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -602,5 +660,8 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
 | 
				
			||||||
    ps->AddTraps	= 0;			/* requires DDX support */
 | 
					    ps->AddTraps	= 0;			/* requires DDX support */
 | 
				
			||||||
    ps->AddTriangles	= 0;			/* requires DDX support */
 | 
					    ps->AddTriangles	= 0;			/* requires DDX support */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ps->TriStrip	= miTriStrip; /* converts call to CompositeTriangles */
 | 
				
			||||||
 | 
					    ps->TriFan		= miTriFan;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -139,6 +139,26 @@ miCompositeRects (CARD8		op,
 | 
				
			||||||
		  int		nRect,
 | 
							  int		nRect,
 | 
				
			||||||
		  xRectangle    *rects);
 | 
							  xRectangle    *rects);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern _X_EXPORT void
 | 
				
			||||||
 | 
					miTriStrip (CARD8	    op,
 | 
				
			||||||
 | 
						    PicturePtr	    pSrc,
 | 
				
			||||||
 | 
						    PicturePtr	    pDst,
 | 
				
			||||||
 | 
						    PictFormatPtr  maskFormat,
 | 
				
			||||||
 | 
						    INT16	    xSrc,
 | 
				
			||||||
 | 
						    INT16	    ySrc,
 | 
				
			||||||
 | 
						    int		    npoints,
 | 
				
			||||||
 | 
						    xPointFixed    *points);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern _X_EXPORT void
 | 
				
			||||||
 | 
					miTriFan (CARD8		op,
 | 
				
			||||||
 | 
						  PicturePtr	pSrc,
 | 
				
			||||||
 | 
						  PicturePtr	pDst,
 | 
				
			||||||
 | 
						  PictFormatPtr	maskFormat,
 | 
				
			||||||
 | 
						  INT16		xSrc,
 | 
				
			||||||
 | 
						  INT16		ySrc,
 | 
				
			||||||
 | 
						  int		npoints,
 | 
				
			||||||
 | 
						  xPointFixed	*points);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern _X_EXPORT void
 | 
					extern _X_EXPORT void
 | 
				
			||||||
miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
 | 
					miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1715,23 +1715,14 @@ CompositeTriStrip (CARD8	    op,
 | 
				
			||||||
		   int		    npoints,
 | 
							   int		    npoints,
 | 
				
			||||||
		   xPointFixed	    *points)
 | 
							   xPointFixed	    *points)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    xTriangle           *tris, *tri;
 | 
					    PictureScreenPtr	ps = GetPictureScreen(pDst->pDrawable->pScreen);
 | 
				
			||||||
    int                 ntri;
 | 
					
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    if (npoints < 3)
 | 
					    if (npoints < 3)
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    ntri = npoints - 2;
 | 
					
 | 
				
			||||||
    tris = malloc(ntri * sizeof (xTriangle));
 | 
					    ValidatePicture (pSrc);
 | 
				
			||||||
    if (!tris)
 | 
					    ValidatePicture (pDst);
 | 
				
			||||||
        return;
 | 
					    (*ps->TriStrip) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points);
 | 
				
			||||||
    for (tri = tris; npoints >= 3; npoints--, points++, tri++)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        tri->p1 = points[0];
 | 
					 | 
				
			||||||
        tri->p2 = points[1];
 | 
					 | 
				
			||||||
        tri->p3 = points[2];
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
 | 
					 | 
				
			||||||
    free(tris);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
| 
						 | 
					@ -1744,25 +1735,14 @@ CompositeTriFan (CARD8		op,
 | 
				
			||||||
		 int		npoints,
 | 
							 int		npoints,
 | 
				
			||||||
		 xPointFixed	*points)
 | 
							 xPointFixed	*points)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    xTriangle		*tris, *tri;
 | 
					    PictureScreenPtr	ps = GetPictureScreen(pDst->pDrawable->pScreen);
 | 
				
			||||||
    xPointFixed		*first;
 | 
					
 | 
				
			||||||
    int			ntri;
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    if (npoints < 3)
 | 
					    if (npoints < 3)
 | 
				
			||||||
	return;
 | 
						return;
 | 
				
			||||||
    ntri = npoints - 2;
 | 
					
 | 
				
			||||||
    tris = malloc(ntri * sizeof (xTriangle));
 | 
					    ValidatePicture (pSrc);
 | 
				
			||||||
    if (!tris)
 | 
					    ValidatePicture (pDst);
 | 
				
			||||||
	return;
 | 
					    (*ps->TriFan) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points);
 | 
				
			||||||
    first = points++;
 | 
					 | 
				
			||||||
    for (tri = tris; npoints >= 3; npoints--, points++, tri++)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
	tri->p1 = *first;
 | 
					 | 
				
			||||||
	tri->p2 = points[0];
 | 
					 | 
				
			||||||
	tri->p3 = points[1];
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
 | 
					 | 
				
			||||||
    free(tris);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -260,6 +260,24 @@ typedef void	(*TrianglesProcPtr)	    (CARD8	    op,
 | 
				
			||||||
					     int	    ntri,
 | 
										     int	    ntri,
 | 
				
			||||||
					     xTriangle	    *tris);
 | 
										     xTriangle	    *tris);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef void	(*TriStripProcPtr)	    (CARD8	    op,
 | 
				
			||||||
 | 
										     PicturePtr	    pSrc,
 | 
				
			||||||
 | 
										     PicturePtr	    pDst,
 | 
				
			||||||
 | 
										     PictFormatPtr  maskFormat,
 | 
				
			||||||
 | 
										     INT16	    xSrc,
 | 
				
			||||||
 | 
										     INT16	    ySrc,
 | 
				
			||||||
 | 
										     int	    npoint,
 | 
				
			||||||
 | 
										     xPointFixed    *points);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef void	(*TriFanProcPtr)	    (CARD8	    op,
 | 
				
			||||||
 | 
										     PicturePtr	    pSrc,
 | 
				
			||||||
 | 
										     PicturePtr	    pDst,
 | 
				
			||||||
 | 
										     PictFormatPtr  maskFormat,
 | 
				
			||||||
 | 
										     INT16	    xSrc,
 | 
				
			||||||
 | 
										     INT16	    ySrc,
 | 
				
			||||||
 | 
										     int	    npoint,
 | 
				
			||||||
 | 
										     xPointFixed    *points);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef Bool	(*InitIndexedProcPtr)	    (ScreenPtr	    pScreen,
 | 
					typedef Bool	(*InitIndexedProcPtr)	    (ScreenPtr	    pScreen,
 | 
				
			||||||
					     PictFormatPtr  pFormat);
 | 
										     PictFormatPtr  pFormat);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -348,6 +366,9 @@ typedef struct _PictureScreen {
 | 
				
			||||||
    RealizeGlyphProcPtr   	RealizeGlyph;
 | 
					    RealizeGlyphProcPtr   	RealizeGlyph;
 | 
				
			||||||
    UnrealizeGlyphProcPtr 	UnrealizeGlyph;
 | 
					    UnrealizeGlyphProcPtr 	UnrealizeGlyph;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define PICTURE_SCREEN_VERSION 2
 | 
				
			||||||
 | 
					    TriStripProcPtr		TriStrip;
 | 
				
			||||||
 | 
					    TriFanProcPtr		TriFan;
 | 
				
			||||||
} PictureScreenRec, *PictureScreenPtr;
 | 
					} PictureScreenRec, *PictureScreenPtr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
 | 
					extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue