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