diff options
Diffstat (limited to 'xc/programs/Xserver/render/picturestr.h')
-rw-r--r-- | xc/programs/Xserver/render/picturestr.h | 186 |
1 files changed, 185 insertions, 1 deletions
diff --git a/xc/programs/Xserver/render/picturestr.h b/xc/programs/Xserver/render/picturestr.h index 6f9db4ac8..34cdbf434 100644 --- a/xc/programs/Xserver/render/picturestr.h +++ b/xc/programs/Xserver/render/picturestr.h @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/render/picturestr.h,v 1.16 2001/08/01 00:45:00 tsi Exp $ + * $XFree86: xc/programs/Xserver/render/picturestr.h,v 1.19 2002/09/29 23:39:45 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -48,6 +48,14 @@ typedef struct _PictFormat { ColormapPtr pColormap; } PictFormatRec; +typedef struct _PictVector { + xFixed vector[3]; +} PictVector, *PictVectorPtr; + +typedef struct _PictTransform { + xFixed matrix[3][3]; +} PictTransform, *PictTransformPtr; + typedef struct _Picture { DrawablePtr pDrawable; PictFormatPtr pFormat; @@ -71,9 +79,15 @@ typedef struct _Picture { DDXPointRec clipOrigin; pointer clientClip; + + PictTransform *transform; Atom dither; + int filter; + xFixed *filter_params; + int filter_nparams; + unsigned long stateChanges; unsigned long serialNumber; @@ -82,6 +96,26 @@ typedef struct _Picture { DevUnion *devPrivates; } PictureRec; +typedef struct { + char *name; + xFixed *params; + int nparams; + int id; +} PictFilterRec, *PictFilterPtr; + +#define PictFilterNearest 0 +#define PictFilterBilinear 1 + +#define PictFilterFast 2 +#define PictFilterGood 3 +#define PictFilterBest 4 + +typedef struct { + char *alias; + int alias_id; + int filter_id; +} PictFilterAliasRec, *PictFilterAliasPtr; + typedef int (*CreatePictureProcPtr) (PicturePtr pPicture); typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture); typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture, @@ -90,6 +124,16 @@ typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture, int n); typedef void (*DestroyPictureClipProcPtr)(PicturePtr pPicture); +typedef int (*ChangePictureTransformProcPtr) (PicturePtr pPicture, + PictTransform *transform); + +typedef int (*ChangePictureFilterProcPtr) (PicturePtr pPicture, + int filter, + xFixed *params, + int nparams); + +typedef void (*DestroyPictureFilterProcPtr) (PicturePtr pPicture); + typedef void (*ChangePictureProcPtr) (PicturePtr pPicture, Mask mask); typedef void (*ValidatePictureProcPtr) (PicturePtr pPicture, @@ -123,6 +167,47 @@ typedef void (*CompositeRectsProcPtr) (CARD8 op, int nRect, xRectangle *rects); +typedef void (*RasterizeTrapezoidProcPtr)(PicturePtr pMask, + xTrapezoid *trap, + int x_off, + int y_off); + +typedef void (*TrapezoidsProcPtr) (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int ntrap, + xTrapezoid *traps); + +typedef void (*TrianglesProcPtr) (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int ntri, + 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, PictFormatPtr pFormat); @@ -142,11 +227,20 @@ typedef struct _PictureScreen { PictFormatPtr formats; PictFormatPtr fallback; int nformats; + int subpixel; + PictFilterPtr filters; + int nfilters; + PictFilterAliasPtr filterAliases; + int nfilterAliases; + CreatePictureProcPtr CreatePicture; DestroyPictureProcPtr DestroyPicture; ChangePictureClipProcPtr ChangePictureClip; DestroyPictureClipProcPtr DestroyPictureClip; + ChangePictureTransformProcPtr ChangePictureTransform; + ChangePictureFilterProcPtr ChangePictureFilter; + DestroyPictureFilterProcPtr DestroyPictureFilter; ChangePictureProcPtr ChangePicture; ValidatePictureProcPtr ValidatePicture; @@ -154,7 +248,13 @@ typedef struct _PictureScreen { CompositeProcPtr Composite; GlyphsProcPtr Glyphs; CompositeRectsProcPtr CompositeRects; + TrapezoidsProcPtr Trapezoids; + TrianglesProcPtr Triangles; + TriStripProcPtr TriStrip; + TriFanProcPtr TriFan; + RasterizeTrapezoidProcPtr RasterizeTrapezoid; + DestroyWindowProcPtr DestroyWindow; CloseScreenProcPtr CloseScreen; @@ -200,6 +300,18 @@ PictureDestroyWindow (WindowPtr pWindow); Bool PictureCloseScreen (int Index, ScreenPtr pScreen); +void +PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef); + +Bool +PictureInitIndexedFormats (ScreenPtr pScreen); + +Bool +PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel); + +int +PictureGetSubpixelOrder (ScreenPtr pScreen); + PictFormatPtr PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp); @@ -212,6 +324,30 @@ PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format); Bool PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); +int +PictureGetFilterId (char *filter, int len, Bool makeit); + +char * +PictureGetFilterName (int id); + +int +PictureAddFilter (ScreenPtr pScreen, char *filter, xFixed *params, int nparams); + +Bool +PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias); + +Bool +PictureSetDefaultFilters (ScreenPtr pScreen); + +void +PictureResetFilters (ScreenPtr pScreen); + +PictFilterPtr +PictureFindFilter (ScreenPtr pScreen, char *name, int len); + +int +SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams); + Bool PictureFinishInit (void); @@ -250,6 +386,10 @@ SetPictureClipRects (PicturePtr pPicture, int nRect, xRectangle *rects); +int +SetPictureTransform (PicturePtr pPicture, + PictTransform *transform); + void ValidatePicture(PicturePtr pPicture); @@ -293,6 +433,50 @@ CompositeRects (CARD8 op, int nRect, xRectangle *rects); +void +CompositeTrapezoids (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int ntrap, + xTrapezoid *traps); + +void +CompositeTriangles (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int ntriangles, + xTriangle *triangles); + +void +CompositeTriStrip (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int npoints, + xPointFixed *points); + +void +CompositeTriFan (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int npoints, + xPointFixed *points); + +Bool +PictureTransformPoint (PictTransformPtr transform, + PictVectorPtr vector); + void RenderExtensionInit (void); #ifdef PANORAMIX |