3
* Copyright © 2000 SuSE, Inc.
5
* Permission to use, copy, modify, distribute, and sell this software and its
6
* documentation for any purpose is hereby granted without fee, provided that
7
* the above copyright notice appear in all copies and that both that
8
* copyright notice and this permission notice appear in supporting
9
* documentation, and that the name of SuSE not be used in advertising or
10
* publicity pertaining to distribution of the software without specific,
11
* written prior permission. SuSE makes no representations about the
12
* suitability of this software for any purpose. It is provided "as is"
13
* without express or implied warranty.
15
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
17
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
* Author: Keith Packard, SuSE, Inc.
28
#include "picturestr.h"
30
#define MI_MAX_INDEXED 256 /* XXX depth must be <= 8 */
32
#if MI_MAX_INDEXED <= 256
33
typedef CARD8 miIndexType;
36
typedef struct _miIndexed {
38
CARD32 rgba[MI_MAX_INDEXED];
39
miIndexType ent[32768];
40
} miIndexedRec, *miIndexedPtr;
42
#define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
43
(((s) >> 6) & 0x03e0) | \
44
(((s) >> 9) & 0x7c00))
45
#define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15])
46
#define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24))
48
#define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)])
51
miCreatePicture (PicturePtr pPicture);
54
miDestroyPicture (PicturePtr pPicture);
57
miDestroyPictureClip (PicturePtr pPicture);
60
miChangePictureClip (PicturePtr pPicture,
66
miChangePicture (PicturePtr pPicture,
70
miValidatePicture (PicturePtr pPicture,
74
miChangePictureTransform (PicturePtr pPicture,
75
PictTransform *transform);
78
miChangePictureFilter (PicturePtr pPicture,
84
miClipPicture (RegionPtr pRegion,
92
miCompositeSourceValidate (PicturePtr pPicture,
98
miComputeCompositeRegion (RegionPtr pRegion,
112
miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
115
miRealizeGlyph (ScreenPtr pScreen,
119
miUnrealizeGlyph (ScreenPtr pScreen,
126
PictFormatPtr maskFormat,
134
miRenderColorToPixel (PictFormatPtr pPict,
139
miRenderPixelToColor (PictFormatPtr pPict,
141
xRenderColor *color);
144
miIsSolidAlpha (PicturePtr pSrc);
147
miCompositeRects (CARD8 op,
154
miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
157
miTrapezoids (CARD8 op,
160
PictFormatPtr maskFormat,
167
miPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds);
170
miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds);
173
miRasterizeTriangle (PicturePtr pMask,
179
miTriangles (CARD8 op,
182
PictFormatPtr maskFormat,
189
miTriStrip (CARD8 op,
192
PictFormatPtr maskFormat,
196
xPointFixed *points);
202
PictFormatPtr maskFormat,
206
xPointFixed *points);
209
miCreateAlphaPicture (ScreenPtr pScreen,
211
PictFormatPtr pPictFormat,
216
miInitIndexed (ScreenPtr pScreen,
217
PictFormatPtr pFormat);
220
miCloseIndexed (ScreenPtr pScreen,
221
PictFormatPtr pFormat);
224
miUpdateIndexed (ScreenPtr pScreen,
225
PictFormatPtr pFormat,
229
#endif /* _MIPICT_H_ */