jdk/src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgbPre.h
author chegar
Sun, 17 Aug 2014 15:54:13 +0100
changeset 25859 3317bb8137f4
parent 23010 jdk/src/share/native/sun/java2d/loops/IntArgbPre.h@6dadb192ad81
permissions -rw-r--r--
8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 15970
diff changeset
     2
 * Copyright (c) 2000, 2013, 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: 715
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: 715
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: 715
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
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 IntArgbPre_h_Included
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#define IntArgbPre_h_Included
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#include "IntDcm.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * This file contains macro and type definitions used by the macros in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * LoopMacros.h to manipulate a surface of type "IntArgbPre".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
typedef jint    IntArgbPrePixelType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
typedef jint    IntArgbPreDataType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
549
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
    39
#define IntArgbPreIsOpaque 0
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
    40
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#define IntArgbPrePixelStride   4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#define DeclareIntArgbPreLoadVars(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#define DeclareIntArgbPreStoreVars(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#define InitIntArgbPreLoadVars(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#define SetIntArgbPreStoreVarsYPos(PREFIX, pRasInfo, y)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#define SetIntArgbPreStoreVarsXPos(PREFIX, pRasInfo, x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#define InitIntArgbPreStoreVarsY(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#define InitIntArgbPreStoreVarsX(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
#define NextIntArgbPreStoreVarsX(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
#define NextIntArgbPreStoreVarsY(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
#define IntArgbPrePixelFromArgb(pixel, rgb, pRasInfo) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        if ((((rgb) >> 24) + 1) == 0) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
            (pixel) = (rgb); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
            jint a, r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
            ExtractIntDcmComponents1234(rgb, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
            r = MUL8(a, r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
            g = MUL8(a, g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
            b = MUL8(a, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
            (pixel) = ComposeIntDcmComponents1234(a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#define StoreIntArgbPrePixel(pRas, x, pixel) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    (pRas)[x] = (pixel)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#define DeclareIntArgbPrePixelData(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#define ExtractIntArgbPrePixelData(PIXEL, PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#define StoreIntArgbPrePixelData(pPix, x, pixel, PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    (pPix)[x] = (pixel)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * REMIND: we delegate to the ...To1IntArgb macro here, although it does
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 *         slightly more work (may pack the alpha value into the RGB result)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#define LoadIntArgbPreTo1IntRgb(pRas, PREFIX, x, rgb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    LoadIntArgbPreTo1IntArgb(pRas, PREFIX, x, rgb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#define LoadIntArgbPreTo1IntArgb(pRas, PREFIX, x, argb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        jint pixel = (pRas)[x]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        jint a = ((juint) pixel) >> 24; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        if ((a == 0xff) || (a == 0)) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            (argb) = pixel; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
            jint r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            ExtractIntDcmComponentsX123(pixel, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            r = DIV8(r, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            g = DIV8(g, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
            b = DIV8(b, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            (argb) = ComposeIntDcmComponents1234(a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#define LoadIntArgbPreTo3ByteRgb(pRas, PREFIX, x, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        jint a; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        LoadIntArgbPreTo4ByteArgb(pRas, PREFIX, x, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
#define LoadIntArgbPreTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        jint pixel = (pRas)[x]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        ExtractIntDcmComponents1234(pixel, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        if (((a) != 0xff) && ((a) != 0)) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            (r) = DIV8(r, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            (g) = DIV8(g, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
            (b) = DIV8(b, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
#define StoreIntArgbPreFrom1IntRgb(pRas, PREFIX, x, rgb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    (pRas)[x] = 0xff000000 | (rgb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
#define StoreIntArgbPreFrom1IntArgb(pRas, PREFIX, x, argb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        if ((((argb) >> 24) + 1) == 0) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            (pRas)[x] = (argb); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            jint a, r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            ExtractIntDcmComponents1234(argb, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            r = MUL8(a, r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            g = MUL8(a, g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            b = MUL8(a, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            (pRas)[x] = ComposeIntDcmComponents1234(a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
#define StoreIntArgbPreFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    (pRas)[x] = ComposeIntDcmComponents1234(0xff, r, g, b)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#define StoreIntArgbPreFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        if ((a) != 0xff) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
            (r) = MUL8(a, r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            (g) = MUL8(a, g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            (b) = MUL8(a, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        (pRas)[x] = ComposeIntDcmComponents1234(a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
#define CopyIntArgbPreToIntArgbPre(pRGB, i, PREFIX, pRow, x) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    (pRGB)[i] = (pRow)[x]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#define DeclareIntArgbPreAlphaLoadData(PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    jint PREFIX;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
15970
068f2b5c2145 8005796: [parfait] Possible uninitialised variable at jdk/src/share/native/sun/java2d/loops/ByteBinary1Bit.c
jgodinez
parents: 5506
diff changeset
   156
#define InitIntArgbPreAlphaLoadData(PREFIX, pRasInfo) \
068f2b5c2145 8005796: [parfait] Possible uninitialised variable at jdk/src/share/native/sun/java2d/loops/ByteBinary1Bit.c
jgodinez
parents: 5506
diff changeset
   157
    PREFIX = 0
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
#define LoadAlphaFromIntArgbPreFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        PREFIX = (pRas)[0]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        COMP_PREFIX ## A = ((juint) PREFIX) >> 24; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#define LoadAlphaFromIntArgbPreFor1ByteGray(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    LoadAlphaFromIntArgbPreFor4ByteArgb(pRas, PREFIX, COMP_PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
#define LoadAlphaFromIntArgbPreFor1ShortGray(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        LoadAlphaFromIntArgbFor4ByteArgb(pRas, PREFIX, COMP_PREFIX); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        COMP_PREFIX ## A = (COMP_PREFIX ## A << 8) + COMP_PREFIX ## A; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
#define Postload4ByteArgbFromIntArgbPre(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        ExtractIntDcmComponentsX123(PREFIX, COMP_PREFIX ## R, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                                    COMP_PREFIX ## G, COMP_PREFIX ## B); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
#define Postload1ByteGrayFromIntArgbPre(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        int r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        ExtractIntDcmComponentsX123(PREFIX, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        COMP_PREFIX ## G = ComposeByteGrayFrom3ByteRgb(r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
#define Postload1ShortGrayFromIntArgbPre(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        int r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        ExtractIntDcmComponentsX123(PREFIX, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        COMP_PREFIX ## G = ComposeUshortGrayFrom3ByteRgb(r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
#define IntArgbPreIsPremultiplied       1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
#define DeclareIntArgbPreBlendFillVars(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
#define ClearIntArgbPreBlendFillVars(PREFIX, argb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    argb = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
#define InitIntArgbPreBlendFillVarsNonPre(PREFIX, argb, COMP_PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
#define InitIntArgbPreBlendFillVarsPre(PREFIX, argb, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    argb = ComposeIntDcmComponents1234(COMP_PREFIX ## A, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
                                       COMP_PREFIX ## R, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                                       COMP_PREFIX ## G, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                                       COMP_PREFIX ## B)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
#define StoreIntArgbPreBlendFill(pRas, PREFIX, x, argb, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    (pRas)[x] = (argb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
#define StoreIntArgbPreFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    (pRas)[x] = ComposeIntDcmComponents1234(COMP_PREFIX ## A, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                                            COMP_PREFIX ## R, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                                            COMP_PREFIX ## G, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                                            COMP_PREFIX ## B)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
#endif /* IntArgbPre_h_Included */