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