src/java.desktop/share/native/libawt/java2d/loops/FourByteAbgrPre.h
author ihse
Mon, 11 Jun 2018 11:23:20 +0200
branchihse-remove-mapfiles-branch
changeset 56721 01b558efd286
parent 47216 71c04702a3d5
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
37800
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
     2
 * Copyright (c) 2000, 2016, 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 FourByteAbgrPre_h_Included
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#define FourByteAbgrPre_h_Included
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * This file contains macro and type definitions used by the macros in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * LoopMacros.h to manipulate a surface of type "FourByteAbgrPre".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
typedef jint    FourByteAbgrPrePixelType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
typedef jubyte  FourByteAbgrPreDataType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
549
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
    37
#define FourByteAbgrPreIsOpaque 0
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
    38
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#define FourByteAbgrPrePixelStride              4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#define DeclareFourByteAbgrPreLoadVars(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#define DeclareFourByteAbgrPreStoreVars(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#define SetFourByteAbgrPreStoreVarsYPos(PREFIX, pRasInfo, y)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#define SetFourByteAbgrPreStoreVarsXPos(PREFIX, pRasInfo, x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#define InitFourByteAbgrPreLoadVars(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#define InitFourByteAbgrPreStoreVarsY(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#define InitFourByteAbgrPreStoreVarsX(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#define NextFourByteAbgrPreStoreVarsX(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#define NextFourByteAbgrPreStoreVarsY(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
#define FourByteAbgrPrePixelFromArgb(pixel, rgb, pRasInfo) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
        jint a, r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        if (((rgb) >> 24) == -1) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
            (pixel) = (((rgb) << 8) | (((juint) (rgb)) >> 24)); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
            ExtractIntDcmComponents1234(rgb, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
            r = MUL8(a, r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
            g = MUL8(a, g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
            b = MUL8(a, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
            (pixel) = ComposeIntDcmComponents1234(r, g, b, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
#define StoreFourByteAbgrPrePixel(pRas, x, pixel) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        (pRas)[4*(x)+0] = (jubyte) ((pixel) >> 0); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        (pRas)[4*(x)+1] = (jubyte) ((pixel) >> 8); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        (pRas)[4*(x)+2] = (jubyte) ((pixel) >> 16); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        (pRas)[4*(x)+3] = (jubyte) ((pixel) >> 24); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#define DeclareFourByteAbgrPrePixelData(PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    jubyte PREFIX ## 0, PREFIX ## 1, PREFIX ## 2, PREFIX ## 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#define ExtractFourByteAbgrPrePixelData(PIXEL, PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        PREFIX ## 0 = (jubyte) (PIXEL >> 0); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        PREFIX ## 1 = (jubyte) (PIXEL >> 8); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        PREFIX ## 2 = (jubyte) (PIXEL >> 16); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        PREFIX ## 3 = (jubyte) (PIXEL >> 24); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#define StoreFourByteAbgrPrePixelData(pPix, x, pixel, PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        pPix[4*(x)+0] = PREFIX ## 0; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        pPix[4*(x)+1] = PREFIX ## 1; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        pPix[4*(x)+2] = PREFIX ## 2; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        pPix[4*(x)+3] = PREFIX ## 3; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
#define LoadFourByteAbgrPreTo1IntRgb(pRas, PREFIX, x, rgb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    LoadFourByteAbgrPreTo1IntArgb(pRas, PREFIX, x, rgb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
#define LoadFourByteAbgrPreTo1IntArgb(pRas, PREFIX, x, argb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        jint a = (pRas)[4*(x)+0]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        if ((a == 0xff) || (a == 0)) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            (argb) = (((pRas)[4*(x)+1] << 0) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                      ((pRas)[4*(x)+2] << 8) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                      ((pRas)[4*(x)+3] << 16) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                      (a << 24)); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
            jint r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            b = DIV8((pRas)[4*(x)+1], a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            g = DIV8((pRas)[4*(x)+2], a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            r = DIV8((pRas)[4*(x)+3], a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            (argb) = ComposeIntDcmComponents1234(a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
#define LoadFourByteAbgrPreTo3ByteRgb(pRas, PREFIX, x, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        jint a; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        LoadFourByteAbgrPreTo4ByteArgb(pRas, PREFIX, x, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#define LoadFourByteAbgrPreTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        (a) = (pRas)[4*(x)+0]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        (b) = (pRas)[4*(x)+1]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        (g) = (pRas)[4*(x)+2]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        (r) = (pRas)[4*(x)+3]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        if ((a != 0xff) && (a != 0)) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            r = DIV8(r, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            g = DIV8(g, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            b = DIV8(b, a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#define StoreFourByteAbgrPreFrom1IntRgb(pRas, PREFIX, x, rgb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        (pRas)[4*(x)+0] = (jubyte) 0xff; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        (pRas)[4*(x)+1] = (jubyte) ((rgb) >> 0); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        (pRas)[4*(x)+2] = (jubyte) ((rgb) >> 8); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        (pRas)[4*(x)+3] = (jubyte) ((rgb) >> 16); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
#define StoreFourByteAbgrPreFrom1IntArgb(pRas, PREFIX, x, argb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        if ((((argb) >> 24) + 1) == 0) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            (pRas)[4*(x)+0] = (jubyte) ((argb) >> 24); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            (pRas)[4*(x)+1] = (jubyte) ((argb) >> 0); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            (pRas)[4*(x)+2] = (jubyte) ((argb) >> 8); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
            (pRas)[4*(x)+3] = (jubyte) ((argb) >> 16); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            jint a, r, g, b; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
            ExtractIntDcmComponents1234(argb, a, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            (pRas)[4*(x)+0] = (jubyte) a; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            (pRas)[4*(x)+1] = MUL8(a, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
            (pRas)[4*(x)+2] = MUL8(a, g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            (pRas)[4*(x)+3] = MUL8(a, r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
#define StoreFourByteAbgrPreFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        (pRas)[4*(x)+0] = (jubyte) 0xff; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        (pRas)[4*(x)+1] = (jubyte) (b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        (pRas)[4*(x)+2] = (jubyte) (g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        (pRas)[4*(x)+3] = (jubyte) (r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
#define StoreFourByteAbgrPreFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        if ((a) == 0xff) { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
            StoreFourByteAbgrPreFrom3ByteRgb(pRas, PREFIX, x, r, g, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        } else { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            (pRas)[4*(x)+0] = (jubyte) (a); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            (pRas)[4*(x)+1] = MUL8(a, b); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
            (pRas)[4*(x)+2] = MUL8(a, g); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            (pRas)[4*(x)+3] = MUL8(a, r); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        } \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
#define CopyFourByteAbgrPreToIntArgbPre(pRGB, i, PREFIX, pRow, x) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    (pRGB)[i] = (((pRow)[4*(x)+0] << 24) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                 ((pRow)[4*(x)+1] << 0) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                 ((pRow)[4*(x)+2] << 8) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                 ((pRow)[4*(x)+3] << 16))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
#define DeclareFourByteAbgrPreAlphaLoadData(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
#define InitFourByteAbgrPreAlphaLoadData(PREFIX, pRasInfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
#define LoadAlphaFromFourByteAbgrPreFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    COMP_PREFIX ## A = (pRas)[0]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
#define Postload4ByteArgbFromFourByteAbgrPre(pRas, PREFIX, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        COMP_PREFIX ## B = (pRas)[1]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        COMP_PREFIX ## G = (pRas)[2]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        COMP_PREFIX ## R = (pRas)[3]; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
#define FourByteAbgrPreIsPremultiplied  1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
#define DeclareFourByteAbgrPreBlendFillVars(PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
#define ClearFourByteAbgrPreBlendFillVars(PREFIX, argb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
#define InitFourByteAbgrPreBlendFillVarsNonPre(PREFIX, argb, COMP_PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
#define InitFourByteAbgrPreBlendFillVarsPre(PREFIX, argb, COMP_PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
#define StoreFourByteAbgrPreBlendFill(pRas, PREFIX, x, argb, COMP_PREFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    StoreFourByteAbgrPreFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
#define StoreFourByteAbgrPreFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX)\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    do { \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        (pRas)[4*(x)+0] = (jubyte) COMP_PREFIX ## A; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        (pRas)[4*(x)+1] = (jubyte) COMP_PREFIX ## B; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        (pRas)[4*(x)+2] = (jubyte) COMP_PREFIX ## G; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        (pRas)[4*(x)+3] = (jubyte) COMP_PREFIX ## R; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    } while (0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
37800
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   220
/*
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   221
 * SrcOver ## TYPE ## BlendFactor
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   222
 * Returns appropriate blend value for use in blending calculations.
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   223
 */
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   224
#define SrcOverFourByteAbgrPreBlendFactor(dF, dA) \
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   225
    (dF)
518e44c93fbb 8015070: Antialiased text on translucent backgrounds gets bright artifacts
ntv
parents: 26751
diff changeset
   226
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
#endif /* FourByteAbgrPre_h_Included */