xserver-multidpi/render/picturestr.h

615 lines
19 KiB
C
Raw Normal View History

2003-11-14 17:48:57 +01:00
/*
* Copyright © 2000 SuSE, Inc.
2003-11-14 17:48:57 +01:00
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
2003-11-14 17:48:57 +01:00
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifndef _PICTURESTR_H_
#define _PICTURESTR_H_
#include "scrnintstr.h"
#include "glyphstr.h"
2003-11-14 17:48:57 +01:00
#include "resource.h"
#include "privates.h"
2003-11-14 17:48:57 +01:00
typedef struct _DirectFormat {
CARD16 red, redMask;
CARD16 green, greenMask;
CARD16 blue, blueMask;
CARD16 alpha, alphaMask;
2003-11-14 17:48:57 +01:00
} DirectFormatRec;
typedef struct _IndexFormat {
VisualID vid;
ColormapPtr pColormap;
int nvalues;
xIndexValue *pValues;
void *devPrivate;
2003-11-14 17:48:57 +01:00
} IndexFormatRec;
typedef struct _PictFormat {
CARD32 id;
CARD32 format; /* except bpp */
unsigned char type;
unsigned char depth;
2003-11-14 17:48:57 +01:00
DirectFormatRec direct;
IndexFormatRec index;
2003-11-14 17:48:57 +01:00
} PictFormatRec;
typedef struct pixman_vector PictVector, *PictVectorPtr;
typedef struct pixman_transform PictTransform, *PictTransformPtr;
2003-11-14 17:48:57 +01:00
#define pict_f_vector pixman_f_vector
#define pict_f_transform pixman_f_transform
#define PICT_GRADIENT_STOPTABLE_SIZE 1024
#define SourcePictTypeSolidFill 0
#define SourcePictTypeLinear 1
#define SourcePictTypeRadial 2
#define SourcePictTypeConical 3
typedef struct _PictSolidFill {
unsigned int type;
CARD32 color;
} PictSolidFill, *PictSolidFillPtr;
typedef struct _PictGradientStop {
xFixed x;
xRenderColor color;
} PictGradientStop, *PictGradientStopPtr;
typedef struct _PictGradient {
unsigned int type;
int nstops;
PictGradientStopPtr stops;
} PictGradient, *PictGradientPtr;
typedef struct _PictLinearGradient {
unsigned int type;
int nstops;
PictGradientStopPtr stops;
xPointFixed p1;
xPointFixed p2;
} PictLinearGradient, *PictLinearGradientPtr;
typedef struct _PictCircle {
xFixed x;
xFixed y;
xFixed radius;
} PictCircle, *PictCirclePtr;
typedef struct _PictRadialGradient {
unsigned int type;
int nstops;
PictGradientStopPtr stops;
PictCircle c1;
PictCircle c2;
} PictRadialGradient, *PictRadialGradientPtr;
typedef struct _PictConicalGradient {
unsigned int type;
int nstops;
PictGradientStopPtr stops;
xPointFixed center;
xFixed angle;
} PictConicalGradient, *PictConicalGradientPtr;
typedef union _SourcePict {
unsigned int type;
PictSolidFill solidFill;
PictGradient gradient;
PictLinearGradient linear;
PictRadialGradient radial;
PictConicalGradient conical;
} SourcePict, *SourcePictPtr;
2003-11-14 17:48:57 +01:00
typedef struct _Picture {
DrawablePtr pDrawable;
PictFormatPtr pFormat;
PictFormatShort format; /* PICT_FORMAT */
int refcnt;
CARD32 id;
unsigned int repeat:1;
unsigned int graphicsExposures:1;
unsigned int subWindowMode:1;
unsigned int polyEdge:1;
unsigned int polyMode:1;
unsigned int freeCompClip:1;
unsigned int clientClipType:2;
unsigned int componentAlpha:1;
unsigned int repeatType:2;
unsigned int filter:3;
unsigned int stateChanges:CPLastBit;
unsigned int unused:18 - CPLastBit;
PicturePtr pNext; /* chain on same drawable */
PicturePtr alphaMap;
DDXPointRec alphaOrigin;
DDXPointRec clipOrigin;
pointer clientClip;
unsigned long serialNumber;
RegionPtr pCompositeClip;
PrivateRec *devPrivates;
PictTransform *transform;
SourcePictPtr pSourcePict;
xFixed *filter_params;
int filter_nparams;
2003-11-14 17:48:57 +01:00
} PictureRec;
typedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
xFixed * params, int nparams,
int *width, int *height);
2003-11-14 17:48:57 +01:00
typedef struct {
char *name;
int id;
PictFilterValidateParamsProcPtr ValidateParams;
int width, height;
2003-11-14 17:48:57 +01:00
} PictFilterRec, *PictFilterPtr;
#define PictFilterNearest 0
#define PictFilterBilinear 1
#define PictFilterFast 2
#define PictFilterGood 3
#define PictFilterBest 4
#define PictFilterConvolution 5
/* if you add an 8th filter, expand the filter bitfield above */
2003-11-14 17:48:57 +01:00
typedef struct {
char *alias;
int alias_id;
int filter_id;
2003-11-14 17:48:57 +01:00
} PictFilterAliasRec, *PictFilterAliasPtr;
typedef int (*CreatePictureProcPtr) (PicturePtr pPicture);
typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture);
typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture,
int clipType, pointer value, 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, Mask mask);
typedef void (*CompositeProcPtr) (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst,
INT16 yDst, CARD16 width, CARD16 height);
typedef void (*GlyphsProcPtr) (CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc,
INT16 ySrc,
int nlists,
GlyphListPtr lists, GlyphPtr * glyphs);
typedef void (*CompositeRectsProcPtr) (CARD8 op,
PicturePtr pDst,
xRenderColor * color,
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);
typedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat);
typedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen,
PictFormatPtr pFormat,
int ndef, xColorItem * pdef);
typedef void (*AddTrapsProcPtr) (PicturePtr pPicture,
INT16 xOff,
INT16 yOff, int ntrap, xTrap * traps);
typedef void (*AddTrianglesProcPtr) (PicturePtr pPicture,
INT16 xOff,
INT16 yOff, int ntri, xTriangle * tris);
typedef Bool (*RealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph);
typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph);
2003-11-14 17:48:57 +01:00
typedef struct _PictureScreen {
PictFormatPtr formats;
PictFormatPtr fallback;
int nformats;
CreatePictureProcPtr CreatePicture;
DestroyPictureProcPtr DestroyPicture;
ChangePictureClipProcPtr ChangePictureClip;
DestroyPictureClipProcPtr DestroyPictureClip;
ChangePictureProcPtr ChangePicture;
ValidatePictureProcPtr ValidatePicture;
2003-11-14 17:48:57 +01:00
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs; /* unused */
CompositeRectsProcPtr CompositeRects;
2003-11-14 17:48:57 +01:00
DestroyWindowProcPtr DestroyWindow;
CloseScreenProcPtr CloseScreen;
2003-11-14 17:48:57 +01:00
StoreColorsProcPtr StoreColors;
2003-11-14 17:48:57 +01:00
InitIndexedProcPtr InitIndexed;
CloseIndexedProcPtr CloseIndexed;
UpdateIndexedProcPtr UpdateIndexed;
2003-11-14 17:48:57 +01:00
int subpixel;
PictFilterPtr filters;
int nfilters;
PictFilterAliasPtr filterAliases;
int nfilterAliases;
2003-11-14 17:48:57 +01:00
/**
* Called immediately after a picture's transform is changed through the
* SetPictureTransform request. Not called for source-only pictures.
*/
ChangePictureTransformProcPtr ChangePictureTransform;
/**
* Called immediately after a picture's transform is changed through the
* SetPictureFilter request. Not called for source-only pictures.
*/
ChangePictureFilterProcPtr ChangePictureFilter;
DestroyPictureFilterProcPtr DestroyPictureFilter;
TrapezoidsProcPtr Trapezoids;
TrianglesProcPtr Triangles;
2003-11-14 17:48:57 +01:00
RasterizeTrapezoidProcPtr RasterizeTrapezoid;
AddTrianglesProcPtr AddTriangles;
AddTrapsProcPtr AddTraps;
RealizeGlyphProcPtr RealizeGlyph;
UnrealizeGlyphProcPtr UnrealizeGlyph;
#define PICTURE_SCREEN_VERSION 2
TriStripProcPtr TriStrip;
TriFanProcPtr TriFan;
2003-11-14 17:48:57 +01:00
} PictureScreenRec, *PictureScreenPtr;
extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
#define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec)
extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec;
#define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec)
extern _X_EXPORT RESTYPE PictureType;
extern _X_EXPORT RESTYPE PictFormatType;
extern _X_EXPORT RESTYPE GlyphSetType;
2003-11-14 17:48:57 +01:00
#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
#define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
2003-11-14 17:48:57 +01:00
#define VERIFY_PICTURE(pPicture, pid, client, mode) {\
int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\
PictureType, client, mode);\
if (rc != Success)\
return rc;\
2003-11-14 17:48:57 +01:00
}
#define VERIFY_ALPHA(pPicture, pid, client, mode) {\
2003-11-14 17:48:57 +01:00
if (pid == None) \
pPicture = 0; \
else { \
VERIFY_PICTURE(pPicture, pid, client, mode); \
2003-11-14 17:48:57 +01:00
} \
} \
extern _X_EXPORT PictFormatPtr
PictureWindowFormat(WindowPtr pWindow);
extern _X_EXPORT Bool
PictureDestroyWindow(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT Bool
api: rework the X server driver API to avoid global arrays. This is a squash merge containing all the API changes, as well as the video ABI bump. Its been squashed to make bisection easier. Full patch log below: commit b202738bbf0c5a1c1172767119c2c71f1e7f8070 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon May 14 15:16:11 2012 -0700 xfree86: Bump video ABI to 13.0 The ABI was broken by changes to convert from screen index numbers to ScreenPtr / ScrnInfoPtr in various structures and function signatures. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 24 10:56:57 2012 +0100 xf86: xf86ClearEntityListForScreen should take a pScrn When adding GPU screens this make life easier. (also fix comment, as pointed out by Alan) Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com> commit afee8b5ab4501597ecc1ade34124d7ca227ab055 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 24 07:07:32 2012 +0100 xf86i2c: add pscrn for drivers to use This just adds a pScrn pointer into the struct for the drivers to use instead of scrnIndex. Mostly scrnIndex is used for logging, but some drivers use it to lookup xf86Screens, so let them stash a pScrn instead. Removing the scrnIndex is a bit more involved and I'm not sure its worth the effort. Doing i2c in the X server is legacy code as far as I'm concerned. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit ea5092f1f679691d187f1eee9427e6057beec56e Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 19:25:20 2012 +0100 dix/gc: consolidate GC object creation in one place The standard GC create and scratch GC create were 90% the same really, and I have a need in the future for creating GC objects without the other bits, so wanted to avoid a third copy. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 10:24:06 2012 +0100 xf86: add a define to denote the new non-index interfaces are being used This can be used by drivers to provide compatible APIs. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 15:09:12 2012 +0100 dix: make Create/Free scratch pixmaps take a ScreenPtr While technically an API/ABI change I doubt anyone uses it, but it helps in splitting screens up. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:57:55 2012 +0100 xf86/xv: remove scrnIndexfrom xf86FindXvOptions. Move this interface to taking an ScrnInfoPtr. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:53:59 2012 +0100 xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2) stop passing indices into this function. v2: drop flags argument. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 58824e414f35682435f15bfe6c4b656bd90b9235 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:48:09 2012 +0100 xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI) Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:18:59 2012 +0100 xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2) Instead of passing an index, pass the actual ScreenPtr. This allows more moving towards not abusing xf86Screens + screenInfo. v2: drop the blockData/wakeupData args as per ajax's suggestion., fix docs. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 790d003de20fb47674420a24dadd92412d78620d Author: Dave Airlie <airlied@gmail.com> Date: Wed Apr 11 09:53:14 2012 +0100 xf86/common: remove some more pScrn->pScreen uses remove some more conversions that appeared after api cleanups. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:34:53 2012 +0100 ddc: change API to take ScrnInfoPtr (v2) This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. v2: address Alan's comments about dropping DDC2Init parameter. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit fe3f57b6eaf6860a33876a54f9439f69578f03a5 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:31:26 2012 +0100 vbe: don't use index for VBEInterpretPanelID (API) Remove use of xf86screens from vbe module. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit abf1965f4ed91529036d3fdb470d6a3ce6f29675 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:25:11 2012 +0100 int10/vbe: don't use xf86Screens. (ABI) (v3) Pass the ScrnInfoPtr instead of the index in the int10 struct. This saves us using it to dereference xf86Screens. v2: address Alan's comment to fix struct alignment. v3: squash in all the int10 fixes, test the vm86 code builds, after comments by Keith. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 23cca612b4fb5efc33683c7624b803b457387e3d Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:30:18 2012 +0100 xserver: drop index argument to ScreenInit (ABI/API) (v2) This drops the index argument, its the same as pScreen->myNum, and its the last major index abuse I can find. v2: address Alan's review - update docs, fix xwin/xnest/darwin Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:23:01 2012 +0100 xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API) This migrates PointerMoved from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:20:46 2012 +0100 xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API) This migrates the PMEvent from index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:18:30 2012 +0100 xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API) This migrates the SetDGAMode callback from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit baf5e4818a74f2b68c3dfdcc56f54322351039a0 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:14:11 2012 +0100 xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2) This migrates the ChangeGamma interface to avoid passing a index. v2: fix xf86RandR12.c + xf86cmap.c call Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 51e5f90ada929d6b23176090badbb42fdb3fa550 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:11:09 2012 +0100 xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API) The EXA interface migrates to ScreenPtr, and the xf86 interface migrated to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 94f1f21d17e86f96d4a54292a399160950087675 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:02:11 2012 +0100 xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API) This migrates the ValidMode to passing a ScrnInfoPtr instead of an index. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3f8f18198fed4f39ec805b508a3482e91eea26b2 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:59:46 2012 +0100 xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2) This migrate the SwitchMode interface to take a ScrnInfoPtr instead of an index. v2: drop flags. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit d06a038a5c49328ab3a8d969d24f9fcd22c63202 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:50:37 2012 +0100 xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2) This converts AdjustFrame code paths to passing a ScrnInfoPtr instead of an integer index. v2: drop flags args. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:41:27 2012 +0100 xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2) Another index->pScrn conversion. v2: drop flags arg. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:35:41 2012 +0100 xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2) This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr instead of an index into xf86Screens. This allows dropping more public dereferences of the xf86Screens and screenInfo. v2: drop flags args as suggested by Keith, fix docs. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 06729dbbc804a20242e6499f446acb5d94023c3c Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:04:59 2012 +0100 xserver: remove index from CloseScreen (API/ABI breakage) This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 14:22:18 +02:00
PictureCloseScreen(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT Bool
PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT Bool
PictureSetSubpixelOrder(ScreenPtr pScreen, int subpixel);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
PictureGetSubpixelOrder(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT PictFormatPtr
PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT PictFormatPtr
PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT PictFormatPtr
PictureMatchFormat(ScreenPtr pScreen, int depth, CARD32 format);
extern _X_EXPORT Bool
PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
PictureGetFilterId(const char *filter, int len, Bool makeit);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT char *PictureGetFilterName(int id);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
PictureAddFilter(ScreenPtr pScreen,
const char *filter,
PictFilterValidateParamsProcPtr ValidateParams,
int width, int height);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT Bool
PictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT Bool
PictureSetDefaultFilters(ScreenPtr pScreen);
extern _X_EXPORT void
PictureResetFilters(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT PictFilterPtr
PictureFindFilter(ScreenPtr pScreen, char *name, int len);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
SetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter,
xFixed * params, int nparams);
extern _X_EXPORT int
SetPictureFilter(PicturePtr pPicture, char *name, int len,
xFixed * params, int nparams);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT Bool
PictureFinishInit(void);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
SetPictureToDefaults(PicturePtr pPicture);
extern _X_EXPORT PicturePtr
CreatePicture(Picture pid,
DrawablePtr pDrawable,
PictFormatPtr pFormat,
Mask mask, XID *list, ClientPtr client, int *error);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
ChangePicture(PicturePtr pPicture,
Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
SetPictureClipRects(PicturePtr pPicture,
int xOrigin, int yOrigin, int nRect, xRectangle *rects);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
SetPictureClipRegion(PicturePtr pPicture,
int xOrigin, int yOrigin, RegionPtr pRegion);
extern _X_EXPORT int
SetPictureTransform(PicturePtr pPicture, PictTransform * transform);
extern _X_EXPORT void
CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst);
extern _X_EXPORT void
ValidatePicture(PicturePtr pPicture);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
FreePicture(pointer pPicture, XID pid);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT int
FreePictFormat(pointer pPictFormat, XID pid);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
CompositePicture(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
CompositeGlyphs(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc,
INT16 ySrc, int nlist, GlyphListPtr lists, GlyphPtr * glyphs);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
CompositeRects(CARD8 op,
PicturePtr pDst,
xRenderColor * color, int nRect, xRectangle *rects);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
CompositeTrapezoids(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
CompositeTriangles(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc,
INT16 ySrc, int ntriangles, xTriangle * triangles);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
CompositeTriStrip(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
2003-11-14 17:48:57 +01:00
CompositeTriFan(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
Bool
AnimCurInit(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
int
AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor,
CursorPtr *ppCursor, ClientPtr client, XID cid);
2003-11-14 17:48:57 +01:00
extern _X_EXPORT void
AddTraps(PicturePtr pPicture,
INT16 xOff, INT16 yOff, int ntraps, xTrap * traps);
extern _X_EXPORT PicturePtr
CreateSolidPicture(Picture pid, xRenderColor * color, int *error);
extern _X_EXPORT PicturePtr
CreateLinearGradientPicture(Picture pid,
xPointFixed * p1,
xPointFixed * p2,
int nStops,
xFixed * stops, xRenderColor * colors, int *error);
extern _X_EXPORT PicturePtr
CreateRadialGradientPicture(Picture pid,
xPointFixed * inner,
xPointFixed * outer,
xFixed innerRadius,
xFixed outerRadius,
int nStops,
xFixed * stops, xRenderColor * colors, int *error);
extern _X_EXPORT PicturePtr
CreateConicalGradientPicture(Picture pid,
xPointFixed * center,
xFixed angle,
int nStops,
xFixed * stops, xRenderColor * colors, int *error);
2003-11-14 17:48:57 +01:00
#ifdef PANORAMIX
extern _X_EXPORT void PanoramiXRenderInit(void);
extern _X_EXPORT void PanoramiXRenderReset(void);
2003-11-14 17:48:57 +01:00
#endif
/*
* matrix.c
*/
extern _X_EXPORT void
PictTransform_from_xRenderTransform(PictTransformPtr pict,
xRenderTransform * render);
extern _X_EXPORT void
xRenderTransform_from_PictTransform(xRenderTransform * render,
PictTransformPtr pict);
extern _X_EXPORT Bool
PictureTransformPoint(PictTransformPtr transform, PictVectorPtr vector);
extern _X_EXPORT Bool
PictureTransformPoint3d(PictTransformPtr transform, PictVectorPtr vector);
#endif /* _PICTURESTR_H_ */