Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/GraphicsPrimitiveMgr.h
41159 views
1
/*
2
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
26
#ifndef GraphicsPrimitiveMgr_h_Included
27
#define GraphicsPrimitiveMgr_h_Included
28
29
#ifdef __cplusplus
30
extern "C" {
31
#endif
32
33
#include <stddef.h>
34
#include "jni.h"
35
36
#include "java_awt_AlphaComposite.h"
37
38
#include "SurfaceData.h"
39
#include "SpanIterator.h"
40
41
#include "j2d_md.h"
42
43
#include "AlphaMath.h"
44
#include "GlyphImageRef.h"
45
46
/*
47
* This structure contains all of the information about a particular
48
* type of GraphicsPrimitive, such as a FillRect, a MaskFill, or a Blit.
49
*
50
* A global collection of these structures is declared and initialized
51
* to contain the necessary Java (JNI) information so that appropriate
52
* Java GraphicsPrimitive objects can be quickly constructed for a set
53
* of native loops simply by referencing the necessary entry from that
54
* collection for the type of primitive being registered.
55
*
56
* See PrimitiveTypes.{Blit,BlitBg,FillRect,...} below.
57
*/
58
typedef struct _PrimitiveType {
59
char *ClassName;
60
jint srcflags;
61
jint dstflags;
62
jclass ClassObject;
63
jmethodID Constructor;
64
} PrimitiveType;
65
66
/* The integer constants to identify the compositing rule being defined. */
67
#define RULE_Xor (java_awt_AlphaComposite_MIN_RULE - 1)
68
#define RULE_Clear java_awt_AlphaComposite_CLEAR
69
#define RULE_Src java_awt_AlphaComposite_SRC
70
#define RULE_SrcOver java_awt_AlphaComposite_SRC_OVER
71
#define RULE_DstOver java_awt_AlphaComposite_DST_OVER
72
#define RULE_SrcIn java_awt_AlphaComposite_SRC_IN
73
#define RULE_DstIn java_awt_AlphaComposite_DST_IN
74
#define RULE_SrcOut java_awt_AlphaComposite_SRC_OUT
75
#define RULE_DstOut java_awt_AlphaComposite_DST_OUT
76
77
/*
78
* This structure holds the information retrieved from a Java
79
* Composite object for easy transfer to various C functions
80
* that implement the inner loop for a native primitive.
81
*
82
* Currently only AlphaComposite and XORComposite are supported.
83
*/
84
typedef struct _CompositeInfo {
85
jint rule; /* See RULE_* constants above */
86
union {
87
jfloat extraAlpha; /* from AlphaComposite */
88
jint xorPixel; /* from XORComposite */
89
} details;
90
juint alphaMask; /* from XORComposite */
91
} CompositeInfo;
92
93
/*
94
* This structure is the common header for the two native structures
95
* that hold information about a particular SurfaceType or CompositeType.
96
*
97
* A global collection of these structures is declared and initialized
98
* to contain the necessary Java (JNI) information so that appropriate
99
* Java GraphicsPrimitive objects can be quickly constructed for a set
100
* of native loops simply by referencing the necessary entry from that
101
* collection for the type of composite or surface being implemented.
102
*
103
* See SurfaceTypes.{OpaqueColor,IntArgb,ByteGray,...} below.
104
* See CompositeTypes.{Xor,AnyAlpha,...} below.
105
*/
106
typedef struct _SurfCompHdr {
107
char *Name;
108
jobject Object;
109
} SurfCompHdr;
110
111
/*
112
* The definitions for the SurfaceType structure described above.
113
*/
114
115
/*
116
* The signature for a function that returns the specific integer
117
* format pixel for a given ARGB color value for a particular
118
* SurfaceType implementation.
119
* This function is valid only after GetRasInfo call for the
120
* associated surface.
121
*/
122
typedef jint (PixelForFunc)(SurfaceDataRasInfo *pRasInfo, jint rgb);
123
124
/*
125
* The additional information needed to manipulate a surface:
126
* - The pixelFor function for translating ARGB values.
127
* Valid only after GetRasInfo call for this surface.
128
* - The additional flags needed when reading from this surface.
129
* - The additional flags needed when writing to this surface.
130
*/
131
typedef struct _SurfaceType {
132
SurfCompHdr hdr;
133
PixelForFunc *pixelFor;
134
jint readflags;
135
jint writeflags;
136
} SurfaceType;
137
138
/*
139
* The definitions for the CompositeType structure described above.
140
*/
141
142
/*
143
* The signature for a function that fills in a CompositeInfo
144
* structure from the information present in a given Java Composite
145
* object.
146
*/
147
typedef void (JNICALL CompInfoFunc)(JNIEnv *env,
148
CompositeInfo *pCompInfo,
149
jobject Composite);
150
151
/*
152
* The additional information needed to implement a primitive that
153
* performs a particular composite operation:
154
* - The getCompInfo function for filling in a CompositeInfo structure.
155
* - The additional flags needed for locking the destination surface.
156
*/
157
typedef struct _CompositeType {
158
SurfCompHdr hdr;
159
CompInfoFunc *getCompInfo;
160
jint dstflags;
161
} CompositeType;
162
163
/*
164
* The signature of the native functions that register a set of
165
* related native GraphicsPrimitive functions.
166
*/
167
typedef jboolean (RegisterFunc)(JNIEnv *env);
168
169
struct _NativePrimitive; /* forward reference for function typedefs */
170
171
/*
172
* This empty function signature represents an "old pre-ANSI style"
173
* function declaration which makes no claims about the argument list
174
* other than that the types of the arguments will undergo argument
175
* promotion in the calling conventions.
176
* (See section A7.3.2 in K&R 2nd edition.)
177
*
178
* When trying to statically initialize the function pointer field of
179
* a NativePrimitive structure, which is a union of all possible
180
* inner loop function signatures, the initializer constant must be
181
* compatible with the first field in the union. This generic function
182
* type allows us to assign any function pointer to that union as long
183
* as it meets the requirements specified above (i.e. all arguments
184
* are compatible with their promoted values according to the old
185
* style argument promotion calling semantics).
186
*
187
* Note: This means that you cannot define an argument to any of
188
* these native functions which is a byte or a short as that value
189
* would not be passed in the same way for an ANSI-style full prototype
190
* calling convention and an old-style argument promotion calling
191
* convention.
192
*/
193
typedef void (AnyFunc)();
194
195
/*
196
* The signature of the inner loop function for a "Blit".
197
*/
198
typedef void (BlitFunc)(void *pSrc, void *pDst,
199
juint width, juint height,
200
SurfaceDataRasInfo *pSrcInfo,
201
SurfaceDataRasInfo *pDstInfo,
202
struct _NativePrimitive *pPrim,
203
CompositeInfo *pCompInfo);
204
205
/*
206
* The signature of the inner loop function for a "BlitBg".
207
*/
208
typedef void (BlitBgFunc)(void *pSrc, void *pDst,
209
juint width, juint height, jint bgpixel,
210
SurfaceDataRasInfo *pSrcInfo,
211
SurfaceDataRasInfo *pDstInfo,
212
struct _NativePrimitive *pPrim,
213
CompositeInfo *pCompInfo);
214
215
/*
216
* The signature of the inner loop function for a "ScaleBlit".
217
*/
218
typedef void (ScaleBlitFunc)(void *pSrc, void *pDst,
219
juint dstwidth, juint dstheight,
220
jint sxloc, jint syloc,
221
jint sxinc, jint syinc, jint scale,
222
SurfaceDataRasInfo *pSrcInfo,
223
SurfaceDataRasInfo *pDstInfo,
224
struct _NativePrimitive *pPrim,
225
CompositeInfo *pCompInfo);
226
227
/*
228
* The signature of the inner loop function for a "FillRect".
229
*/
230
typedef void (FillRectFunc)(SurfaceDataRasInfo *pRasInfo,
231
jint lox, jint loy,
232
jint hix, jint hiy,
233
jint pixel, struct _NativePrimitive *pPrim,
234
CompositeInfo *pCompInfo);
235
236
/*
237
* The signature of the inner loop function for a "FillSpans".
238
*/
239
typedef void (FillSpansFunc)(SurfaceDataRasInfo *pRasInfo,
240
SpanIteratorFuncs *pSpanFuncs, void *siData,
241
jint pixel, struct _NativePrimitive *pPrim,
242
CompositeInfo *pCompInfo);
243
244
/*
245
* The signature of the inner loop function for a "DrawLine".
246
* Note that this same inner loop is used for native DrawRect
247
* and DrawPolygons primitives.
248
*/
249
typedef void (DrawLineFunc)(SurfaceDataRasInfo *pRasInfo,
250
jint x1, jint y1, jint pixel,
251
jint steps, jint error,
252
jint bumpmajormask, jint errmajor,
253
jint bumpminormask, jint errminor,
254
struct _NativePrimitive *pPrim,
255
CompositeInfo *pCompInfo);
256
257
/*
258
* The signature of the inner loop function for a "MaskFill".
259
*/
260
typedef void (MaskFillFunc)(void *pRas,
261
unsigned char *pMask, jint maskOff, jint maskScan,
262
jint width, jint height,
263
jint fgColor,
264
SurfaceDataRasInfo *pRasInfo,
265
struct _NativePrimitive *pPrim,
266
CompositeInfo *pCompInfo);
267
268
/*
269
* The signature of the inner loop function for a "MaskBlit".
270
*/
271
typedef void (MaskBlitFunc)(void *pDst, void *pSrc,
272
unsigned char *pMask, jint maskOff, jint maskScan,
273
jint width, jint height,
274
SurfaceDataRasInfo *pDstInfo,
275
SurfaceDataRasInfo *pSrcInfo,
276
struct _NativePrimitive *pPrim,
277
CompositeInfo *pCompInfo);
278
/*
279
* The signature of the inner loop function for a "DrawGlyphList".
280
*/
281
typedef void (DrawGlyphListFunc)(SurfaceDataRasInfo *pRasInfo,
282
ImageRef *glyphs,
283
jint totalGlyphs,
284
jint fgpixel, jint fgcolor,
285
jint cx1, jint cy1,
286
jint cx2, jint cy2,
287
struct _NativePrimitive *pPrim,
288
CompositeInfo *pCompInfo);
289
290
/*
291
* The signature of the inner loop function for a "DrawGlyphListAA".
292
*/
293
typedef void (DrawGlyphListAAFunc)(SurfaceDataRasInfo *pRasInfo,
294
ImageRef *glyphs,
295
jint totalGlyphs,
296
jint fgpixel, jint fgcolor,
297
jint cx1, jint cy1,
298
jint cx2, jint cy2,
299
struct _NativePrimitive *pPrim,
300
CompositeInfo *pCompInfo);
301
302
/*
303
* The signature of the inner loop function for a "DrawGlyphListLCD".
304
* rgbOrder is a jint rather than a jboolean so that this typedef matches
305
* AnyFunc which is the first element in a union in NativePrimitive's
306
* initialiser. See the comments alongside declaration of the AnyFunc type for
307
* a full explanation.
308
*/
309
typedef void (DrawGlyphListLCDFunc)(SurfaceDataRasInfo *pRasInfo,
310
ImageRef *glyphs,
311
jint totalGlyphs,
312
jint fgpixel, jint fgcolor,
313
jint cx1, jint cy1,
314
jint cx2, jint cy2,
315
jint rgbOrder,
316
unsigned char *gammaLut,
317
unsigned char *invGammaLut,
318
struct _NativePrimitive *pPrim,
319
CompositeInfo *pCompInfo);
320
321
/*
322
* The signature of the inner loop functions for a "TransformHelper".
323
*/
324
typedef void (TransformHelperFunc)(SurfaceDataRasInfo *pSrcInfo,
325
jint *pRGB, jint numpix,
326
jlong xlong, jlong dxlong,
327
jlong ylong, jlong dylong);
328
329
typedef struct {
330
TransformHelperFunc *nnHelper;
331
TransformHelperFunc *blHelper;
332
TransformHelperFunc *bcHelper;
333
} TransformHelperFuncs;
334
335
typedef void (TransformInterpFunc)(jint *pRGBbase, jint numpix,
336
jint xfract, jint dxfract,
337
jint yfract, jint dyfract);
338
339
/*
340
* The signature of the inner loop function for a "FillParallelogram"
341
* Note that this same inner loop is used for native DrawParallelogram
342
* primitives.
343
* Note that these functions are paired with equivalent DrawLine
344
* inner loop functions to facilitate nicer looking and faster thin
345
* transformed drawrect calls.
346
*/
347
typedef void (FillParallelogramFunc)(SurfaceDataRasInfo *pRasInfo,
348
jint lox, jint loy, jint hix, jint hiy,
349
jlong leftx, jlong dleftx,
350
jlong rightx, jlong drightx,
351
jint pixel, struct _NativePrimitive *pPrim,
352
CompositeInfo *pCompInfo);
353
354
typedef struct {
355
FillParallelogramFunc *fillpgram;
356
DrawLineFunc *drawline;
357
} DrawParallelogramFuncs;
358
359
/*
360
* This structure contains all information for defining a single
361
* native GraphicsPrimitive, including:
362
* - The information about the type of the GraphicsPrimitive subclass.
363
* - The information about the type of the source surface.
364
* - The information about the type of the compositing operation.
365
* - The information about the type of the destination surface.
366
* - A pointer to the function that performs the actual inner loop work.
367
* - Extra flags needed for locking the source and destination surfaces
368
* above and beyond the flags specified in the Primitive, Composite
369
* and SurfaceType structures. (For most native primitives these
370
* flags can be calculated automatically from information stored in
371
* the PrimitiveType, SurfaceType, and CompositeType structures.)
372
*/
373
typedef struct _NativePrimitive {
374
PrimitiveType *pPrimType;
375
SurfaceType *pSrcType;
376
CompositeType *pCompType;
377
SurfaceType *pDstType;
378
/* See declaration of AnyFunc type above for comments explaining why
379
* only AnyFunc is used by the initializers for these union fields
380
* and consequent type restrictions.
381
*/
382
union {
383
AnyFunc *initializer;
384
BlitFunc *blit;
385
BlitBgFunc *blitbg;
386
ScaleBlitFunc *scaledblit;
387
FillRectFunc *fillrect;
388
FillSpansFunc *fillspans;
389
FillParallelogramFunc *fillparallelogram;
390
DrawParallelogramFuncs *drawparallelogram;
391
DrawLineFunc *drawline;
392
MaskFillFunc *maskfill;
393
MaskBlitFunc *maskblit;
394
DrawGlyphListFunc *drawglyphlist;
395
DrawGlyphListFunc *drawglyphlistaa;
396
DrawGlyphListLCDFunc *drawglyphlistlcd;
397
TransformHelperFuncs *transformhelpers;
398
} funcs, funcs_c;
399
jint srcflags;
400
jint dstflags;
401
} NativePrimitive;
402
403
/*
404
* The global collection of all primitive types. Specific NativePrimitive
405
* structures can be statically initialized by pointing to these structures.
406
*/
407
extern struct _PrimitiveTypes {
408
PrimitiveType Blit;
409
PrimitiveType BlitBg;
410
PrimitiveType ScaledBlit;
411
PrimitiveType FillRect;
412
PrimitiveType FillSpans;
413
PrimitiveType FillParallelogram;
414
PrimitiveType DrawParallelogram;
415
PrimitiveType DrawLine;
416
PrimitiveType DrawRect;
417
PrimitiveType DrawPolygons;
418
PrimitiveType DrawPath;
419
PrimitiveType FillPath;
420
PrimitiveType MaskBlit;
421
PrimitiveType MaskFill;
422
PrimitiveType DrawGlyphList;
423
PrimitiveType DrawGlyphListAA;
424
PrimitiveType DrawGlyphListLCD;
425
PrimitiveType TransformHelper;
426
} PrimitiveTypes;
427
428
/*
429
* The global collection of all surface types. Specific NativePrimitive
430
* structures can be statically initialized by pointing to these structures.
431
*/
432
extern struct _SurfaceTypes {
433
SurfaceType OpaqueColor;
434
SurfaceType AnyColor;
435
SurfaceType AnyByte;
436
SurfaceType ByteBinary1Bit;
437
SurfaceType ByteBinary2Bit;
438
SurfaceType ByteBinary4Bit;
439
SurfaceType ByteIndexed;
440
SurfaceType ByteIndexedBm;
441
SurfaceType ByteGray;
442
SurfaceType Index8Gray;
443
SurfaceType Index12Gray;
444
SurfaceType AnyShort;
445
SurfaceType Ushort555Rgb;
446
SurfaceType Ushort555Rgbx;
447
SurfaceType Ushort565Rgb;
448
SurfaceType Ushort4444Argb;
449
SurfaceType UshortGray;
450
SurfaceType UshortIndexed;
451
SurfaceType Any3Byte;
452
SurfaceType ThreeByteBgr;
453
SurfaceType AnyInt;
454
SurfaceType IntArgb;
455
SurfaceType IntArgbPre;
456
SurfaceType IntArgbBm;
457
SurfaceType IntRgb;
458
SurfaceType IntBgr;
459
SurfaceType IntRgbx;
460
SurfaceType Any4Byte;
461
SurfaceType FourByteAbgr;
462
SurfaceType FourByteAbgrPre;
463
} SurfaceTypes;
464
465
/*
466
* The global collection of all composite types. Specific NativePrimitive
467
* structures can be statically initialized by pointing to these structures.
468
*/
469
extern struct _CompositeTypes {
470
CompositeType SrcNoEa;
471
CompositeType SrcOverNoEa;
472
CompositeType SrcOverBmNoEa;
473
CompositeType Src;
474
CompositeType SrcOver;
475
CompositeType Xor;
476
CompositeType AnyAlpha;
477
} CompositeTypes;
478
479
#define ArraySize(A) (sizeof(A) / sizeof(A[0]))
480
481
#define PtrAddBytes(p, b) ((void *) (((intptr_t) (p)) + (b)))
482
#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, \
483
((ptrdiff_t)(y))*(yinc) + \
484
((ptrdiff_t)(x))*(xinc))
485
#define PtrPixelsRow(p, y, scanStride) PtrAddBytes(p, \
486
((intptr_t) (y)) * (scanStride))
487
488
#define PtrPixelsBand(p, y, length, elemSize) PtrAddBytes(p, \
489
((intptr_t) (y)) * (length) * (elemSize))
490
491
/*
492
* The function to call with an array of NativePrimitive structures
493
* to register them with the Java GraphicsPrimitiveMgr.
494
*/
495
extern jboolean RegisterPrimitives(JNIEnv *env,
496
NativePrimitive *pPrim,
497
jint NumPrimitives);
498
499
/*
500
* The utility function to retrieve the NativePrimitive structure
501
* from a given Java GraphicsPrimitive object.
502
*/
503
extern JNIEXPORT NativePrimitive * JNICALL
504
GetNativePrim(JNIEnv *env, jobject gp);
505
506
/*
507
* Utility functions to get values from a Java SunGraphics2D or Color object.
508
*/
509
extern JNIEXPORT void JNICALL
510
GrPrim_Sg2dGetCompInfo(JNIEnv *env, jobject sg2d,
511
NativePrimitive *pPrim,
512
CompositeInfo *pCompInfo);
513
extern JNIEXPORT jint JNICALL
514
GrPrim_CompGetXorColor(JNIEnv *env, jobject comp);
515
extern JNIEXPORT void JNICALL
516
GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp);
517
extern JNIEXPORT void JNICALL
518
GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp);
519
520
extern JNIEXPORT void JNICALL
521
GrPrim_Sg2dGetClip(JNIEnv *env, jobject sg2d,
522
SurfaceDataBounds *bounds);
523
524
extern JNIEXPORT jint JNICALL
525
GrPrim_Sg2dGetPixel(JNIEnv *env, jobject sg2d);
526
extern JNIEXPORT jint JNICALL
527
GrPrim_Sg2dGetEaRGB(JNIEnv *env, jobject sg2d);
528
extern JNIEXPORT jint JNICALL
529
GrPrim_Sg2dGetLCDTextContrast(JNIEnv *env, jobject sg2d);
530
531
/*
532
* Data structure and functions to retrieve and use
533
* AffineTransform objects from the native level.
534
*/
535
typedef struct {
536
jdouble dxdx; /* dx in dest space for each dx in src space */
537
jdouble dxdy; /* dx in dest space for each dy in src space */
538
jdouble tx;
539
jdouble dydx; /* dy in dest space for each dx in src space */
540
jdouble dydy; /* dy in dest space for each dy in src space */
541
jdouble ty;
542
} TransformInfo;
543
544
extern JNIEXPORT void JNICALL
545
Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo);
546
extern JNIEXPORT void JNICALL
547
Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY);
548
549
void GrPrim_RefineBounds(SurfaceDataBounds *bounds, jint transX, jint transY,
550
jfloat *coords, jint maxCoords);
551
552
JNIEXPORT extern jfieldID path2DTypesID;
553
JNIEXPORT extern jfieldID path2DNumTypesID;
554
JNIEXPORT extern jfieldID path2DWindingRuleID;
555
JNIEXPORT extern jfieldID path2DFloatCoordsID;
556
JNIEXPORT extern jfieldID sg2dStrokeHintID;
557
JNIEXPORT extern jint sunHints_INTVAL_STROKE_PURE;
558
559
/*
560
* Macros for using jlong variables as 32bits.32bits fractional values
561
*/
562
#define LongOneHalf (((jlong) 1) << 31)
563
#define IntToLong(i) (((jlong) (i)) << 32)
564
#define DblToLong(d) ((jlong) ((d) * IntToLong(1)))
565
#define LongToDbl(l) (((jdouble) l) / IntToLong(1))
566
#define WholeOfLong(l) ((jint) ((l) >> 32))
567
#define FractOfLong(l) ((jint) (l))
568
#define URShift(i, n) (((juint) (i)) >> (n))
569
570
/*
571
* Macros to help in defining arrays of NativePrimitive structures.
572
*
573
* These macros are the very base macros. More specific macros are
574
* defined in LoopMacros.h.
575
*
576
* Note that the DrawLine, DrawRect, and DrawPolygons primitives are
577
* all registered together from a single shared native function pointer.
578
*/
579
580
#define REGISTER_PRIMITIVE(TYPE, SRC, COMP, DST, FUNC) \
581
{ \
582
& PrimitiveTypes.TYPE, \
583
& SurfaceTypes.SRC, \
584
& CompositeTypes.COMP, \
585
& SurfaceTypes.DST, \
586
{FUNC}, \
587
{FUNC}, \
588
0, \
589
0 \
590
}
591
592
#define REGISTER_PRIMITIVE_FLAGS(TYPE, SRC, COMP, DST, FUNC, SFLAGS, DFLAGS) \
593
{ \
594
& PrimitiveTypes.TYPE, \
595
& SurfaceTypes.SRC, \
596
& CompositeTypes.COMP, \
597
& SurfaceTypes.DST, \
598
{FUNC}, \
599
{FUNC}, \
600
SFLAGS, \
601
DFLAGS, \
602
}
603
604
#define REGISTER_BLIT(SRC, COMP, DST, FUNC) \
605
REGISTER_PRIMITIVE(Blit, SRC, COMP, DST, FUNC)
606
607
#define REGISTER_BLIT_FLAGS(SRC, COMP, DST, FUNC, SFLAGS, DFLAGS) \
608
REGISTER_PRIMITIVE_FLAGS(Blit, SRC, COMP, DST, FUNC, SFLAGS, DFLAGS)
609
610
#define REGISTER_SCALEBLIT(SRC, COMP, DST, FUNC) \
611
REGISTER_PRIMITIVE(ScaledBlit, SRC, COMP, DST, FUNC)
612
613
#define REGISTER_SCALEBLIT_FLAGS(SRC, COMP, DST, FUNC, SFLAGS, DFLAGS) \
614
REGISTER_PRIMITIVE_FLAGS(ScaledBlit, SRC, COMP, DST, FUNC, SFLAGS, DFLAGS)
615
616
#define REGISTER_BLITBG(SRC, COMP, DST, FUNC) \
617
REGISTER_PRIMITIVE(BlitBg, SRC, COMP, DST, FUNC)
618
619
#define REGISTER_FILLRECT(SRC, COMP, DST, FUNC) \
620
REGISTER_PRIMITIVE(FillRect, SRC, COMP, DST, FUNC)
621
622
#define REGISTER_FILLSPANS(SRC, COMP, DST, FUNC) \
623
REGISTER_PRIMITIVE(FillSpans, SRC, COMP, DST, FUNC)
624
625
#define REGISTER_FILLPGRAM(SRC, COMP, DST, FUNC) \
626
REGISTER_PRIMITIVE(FillParallelogram, SRC, COMP, DST, FUNC), \
627
REGISTER_PRIMITIVE(DrawParallelogram, SRC, COMP, DST, FUNC)
628
629
#define REGISTER_LINE_PRIMITIVES(SRC, COMP, DST, FUNC) \
630
REGISTER_PRIMITIVE(DrawLine, SRC, COMP, DST, FUNC), \
631
REGISTER_PRIMITIVE(DrawRect, SRC, COMP, DST, FUNC), \
632
REGISTER_PRIMITIVE(DrawPolygons, SRC, COMP, DST, FUNC), \
633
REGISTER_PRIMITIVE(DrawPath, SRC, COMP, DST, FUNC), \
634
REGISTER_PRIMITIVE(FillPath, SRC, COMP, DST, FUNC)
635
636
#define REGISTER_MASKBLIT(SRC, COMP, DST, FUNC) \
637
REGISTER_PRIMITIVE(MaskBlit, SRC, COMP, DST, FUNC)
638
639
#define REGISTER_MASKFILL(SRC, COMP, DST, FUNC) \
640
REGISTER_PRIMITIVE(MaskFill, SRC, COMP, DST, FUNC)
641
642
#define REGISTER_DRAWGLYPHLIST(SRC, COMP, DST, FUNC) \
643
REGISTER_PRIMITIVE(DrawGlyphList, SRC, COMP, DST, FUNC)
644
645
#define REGISTER_DRAWGLYPHLISTAA(SRC, COMP, DST, FUNC) \
646
REGISTER_PRIMITIVE(DrawGlyphListAA, SRC, COMP, DST, FUNC)
647
648
#define REGISTER_DRAWGLYPHLISTLCD(SRC, COMP, DST, FUNC) \
649
REGISTER_PRIMITIVE(DrawGlyphListLCD, SRC, COMP, DST, FUNC)
650
651
#ifdef __cplusplus
652
};
653
#endif
654
655
#endif /* GraphicsPrimitiveMgr_h_Included */
656
657