jdk/src/solaris/native/sun/java2d/loops/vis_IntArgb.c
author xdono
Wed, 02 Jul 2008 12:55:45 -0700
changeset 715 f16baef3a20e
parent 549 4273b1234967
child 5506 202f599c92aa
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 549
diff changeset
     2
 * Copyright 2003-2008 Sun Microsystems, Inc.  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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
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
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#if !defined(JAVA2D_NO_MLIB) || defined(MLIB_ADD_SUFF)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#include "vis_AlphaMacros.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
void ADD_SUFF(ByteIndexedToIntArgbConvert)(BLIT_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
    jint *pixLut = pSrcInfo->lutBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    mlib_s32 i, i0, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    if (srcScan == width && dstScan == 4*width) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
        width *= height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
        height = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
        mlib_u8  *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        i = i0 = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
            dst[i] = pixLut[src[i]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
            i0 = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        for (i = i0; i <= (mlib_s32)width - 2; i += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
            *(mlib_d64*)(dst + i) = LOAD_2F32(pixLut, src[i], src[i + 1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        for (; i < width; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
            dst[i] = pixLut[src[i]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        PTR_ADD(srcBase, srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
void ADD_SUFF(Index12GrayToIntArgbConvert)(BLIT_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    jint *pixLut = pSrcInfo->lutBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    mlib_s32 i, i0, j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    if (srcScan == width && dstScan == 4*width) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        width *= height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        height = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        mlib_u16 *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        i = i0 = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
            dst[i] = pixLut[src[i]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            i0 = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        for (i = i0; i <= (mlib_s32)width - 2; i += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            *(mlib_d64*)(dst + i) = LOAD_2F32(pixLut, src[i], src[i + 1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        for (; i < width; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            dst[i] = pixLut[src[i]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        PTR_ADD(srcBase, srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
void ADD_SUFF(ByteIndexedToIntArgbScaleConvert)(SCALE_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    jint *pixLut = pSrcInfo->lutBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    mlib_s32 j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        mlib_u8  *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        mlib_s32 *dst_end = dst + width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        mlib_s32 tmpsxloc = sxloc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        PTR_ADD(src, (syloc >> shift) * srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            *dst++ = pixLut[src[tmpsxloc >> shift]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            tmpsxloc += sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        for (; dst <= dst_end - 2; dst += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            *(mlib_d64*)dst = LOAD_2F32(pixLut,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                                        src[tmpsxloc >> shift],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                                        src[(tmpsxloc + sxinc) >> shift]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            tmpsxloc += 2*sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        for (; dst < dst_end; dst++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            *dst = pixLut[src[tmpsxloc >> shift]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            tmpsxloc += sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        syloc += syinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
void ADD_SUFF(ByteIndexedBmToIntArgbXparOver)(BLIT_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    jint *pixLut = pSrcInfo->lutBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    mlib_d64 dd, dzero;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    mlib_s32 i, i0, j, x, mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    if (srcScan == width && dstScan == 4*width) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        width *= height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        height = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    dzero = vis_fzero();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        mlib_u8  *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        i = i0 = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            x = pixLut[src[i]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
            if (x < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                dst[i] = x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
            i0 = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        for (i = i0; i <= (mlib_s32)width - 2; i += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            dd = LOAD_2F32(pixLut, src[i], src[i + 1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            mask = vis_fcmplt32(dd, dzero);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            vis_pst_32(dd, dst + i, mask);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        for (; i < width; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
            x = pixLut[src[i]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
            if (x < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
                dst[i] = x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        PTR_ADD(srcBase, srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
void ADD_SUFF(ByteIndexedBmToIntArgbScaleXparOver)(SCALE_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    jint *pixLut = pSrcInfo->lutBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    mlib_d64 dd, dzero;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    mlib_s32 j, x, mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    dzero = vis_fzero();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        mlib_u8  *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        mlib_s32 *dst_end = dst + width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        mlib_s32 tmpsxloc = sxloc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        PTR_ADD(src, (syloc >> shift) * srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            x = pixLut[src[tmpsxloc >> shift]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
            tmpsxloc += sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
            if (x < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                *dst = x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
            dst++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        for (; dst <= dst_end - 2; dst += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
            dd = LOAD_2F32(pixLut, src[tmpsxloc >> shift],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
                                   src[(tmpsxloc + sxinc) >> shift]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
            tmpsxloc += 2*sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
            mask = vis_fcmplt32(dd, dzero);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
            vis_pst_32(dd, dst, mask);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        for (; dst < dst_end; dst++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
            x = pixLut[src[tmpsxloc >> shift]];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
            tmpsxloc += sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
            if (x < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
                *dst = x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
        syloc += syinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
void ADD_SUFF(IntArgbBmToIntArgbScaleXparOver)(SCALE_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    mlib_d64 dd, maskAA;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    mlib_s32 j, x, mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    maskAA = vis_to_double_dup(0xff000000);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
        mlib_s32 *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
        mlib_s32 *dst_end = dst + width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        mlib_s32 tmpsxloc = sxloc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
        PTR_ADD(src, (syloc >> shift) * srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
            x = src[tmpsxloc >> shift];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
            tmpsxloc += sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
            if (x & 0xff000000) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
                *dst = x | 0xff000000;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
            dst++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
        for (; dst <= dst_end - 2; dst += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
            mlib_f32 *pp0 = (mlib_f32*)src + (tmpsxloc >> shift);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
            mlib_f32 *pp1 = (mlib_f32*)src + ((tmpsxloc + sxinc) >> shift);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
            tmpsxloc += 2*sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
            dd = vis_freg_pair(*pp0, *pp1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
            mask = (((-*(mlib_u8*)pp0) >> 31) & 2) |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
                   ((mlib_u32)(-*(mlib_u8*)pp1) >> 31);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
            dd = vis_for(dd, maskAA);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
            vis_pst_32(dd, dst, mask);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
        for (; dst < dst_end; dst++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
            x = src[tmpsxloc >> shift];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
            tmpsxloc += sxinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
            if (x & 0xff000000) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
                *dst = x | 0xff000000;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
        syloc += syinc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
void ADD_SUFF(ByteIndexedBmToIntArgbXparBgCopy)(BCOPY_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
    jint *pixLut = pSrcInfo->lutBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
    mlib_s32 dstScan = pDstInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
    mlib_s32 srcScan = pSrcInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
    mlib_d64 dd, dzero, d_bgpixel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
    mlib_s32 j, x, mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
    if (srcScan == width && dstScan == 4*width) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        width *= height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
        height = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
    dzero = vis_fzero();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
    d_bgpixel = vis_to_double_dup(bgpixel);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
        mlib_u8  *src = srcBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
        mlib_s32 *dst = dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
        mlib_s32 *dst_end;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
        dst_end = dst + width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
        if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
            x = pixLut[*src++];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
            if (x < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
                *dst = x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
                *dst = bgpixel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
            dst++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
        for (; dst <= (dst_end - 2); dst += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
            dd = LOAD_2F32(pixLut, src[0], src[1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
            mask = vis_fcmplt32(dd, dzero);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
            *(mlib_d64*)dst = d_bgpixel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
            vis_pst_32(dd, dst, mask);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
            src += 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        while (dst < dst_end) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
            x = pixLut[*src++];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
            if (x < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
                *dst = x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
                *dst = bgpixel;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
            dst++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
        PTR_ADD(dstBase, dstScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
        PTR_ADD(srcBase, srcScan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
void ADD_SUFF(IntArgbDrawGlyphListAA)(GLYPH_LIST_PARAMS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
    mlib_s32 glyphCounter;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
    mlib_s32 scan = pRasInfo->scanStride;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
    mlib_u8  *dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
    mlib_s32 j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
    mlib_d64 dmix0, dmix1, dd, d0, d1, e0, e1, fgpixel_d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
    mlib_d64 done, done16, d_half;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
    mlib_s32 pix, mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    mlib_f32 srcG_f;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    done = vis_to_double_dup(0x7fff7fff);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
    done16 = vis_to_double_dup(0x7fff);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
    d_half = vis_to_double_dup((1 << (16 + 6)) | (1 << 6));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
    fgpixel_d = vis_to_double_dup(fgpixel);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
    srcG_f = vis_to_float(argbcolor);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
    vis_write_gsr(0 << 3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
    for (glyphCounter = 0; glyphCounter < totalGlyphs; glyphCounter++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
        const jubyte *pixels;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
        unsigned int rowBytes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
        int left, top;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
        int width, height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
        int right, bottom;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
        pixels = (const jubyte *) glyphs[glyphCounter].pixels;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
        if (!pixels) continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
        left = glyphs[glyphCounter].x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
        top = glyphs[glyphCounter].y;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
        width = glyphs[glyphCounter].width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
        height = glyphs[glyphCounter].height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
        rowBytes = width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
        right = left + width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
        bottom = top + height;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
        if (left < clipLeft) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
            pixels += clipLeft - left;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
            left = clipLeft;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
        if (top < clipTop) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
            pixels += (clipTop - top) * rowBytes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
            top = clipTop;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
        if (right > clipRight) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
            right = clipRight;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
        if (bottom > clipBottom) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
            bottom = clipBottom;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
        if (right <= left || bottom <= top) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
            continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
        width = right - left;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
        height = bottom - top;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
        dstBase = pRasInfo->rasBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        PTR_ADD(dstBase, top*scan + 4*left);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
        for (j = 0; j < height; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
            mlib_u8  *src = (void*)pixels;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
            mlib_s32 *dst, *dst_end;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
            dst = (void*)dstBase;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
            dst_end = dst + width;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
549
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   431
            /* Clearing the Graphics Status Register is necessary otherwise
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   432
             * left over scale settings affect the pack instructions.
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   433
             */
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   434
            vis_write_gsr(0 << 3);
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   435
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
            if ((mlib_s32)dst & 7) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
                pix = *src++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
                dd = vis_fpadd16(MUL8_VIS(srcG_f, pix), d_half);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
                dd = vis_fpadd16(MUL8_VIS(*(mlib_f32*)dst, 255 - pix), dd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
                *(mlib_f32*)dst = vis_fpack16(dd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
                if (pix == 255) *(mlib_f32*)dst = vis_read_hi(fgpixel_d);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
                dst++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
#pragma pipeloop(0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
            for (; dst <= (dst_end - 2); dst += 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
                dmix0 = vis_freg_pair(((mlib_f32 *)vis_mul8s_tbl)[src[0]],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
                                      ((mlib_f32 *)vis_mul8s_tbl)[src[1]]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
                mask = vis_fcmplt32(dmix0, done16);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
                dmix1 = vis_fpsub16(done, dmix0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
                src += 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
                dd = *(mlib_d64*)dst;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
                d0 = vis_fmul8x16al(srcG_f, vis_read_hi(dmix0));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
                d1 = vis_fmul8x16al(srcG_f, vis_read_lo(dmix0));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
                e0 = vis_fmul8x16al(vis_read_hi(dd), vis_read_hi(dmix1));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
                e1 = vis_fmul8x16al(vis_read_lo(dd), vis_read_lo(dmix1));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
                d0 = vis_fpadd16(vis_fpadd16(d0, d_half), e0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
                d1 = vis_fpadd16(vis_fpadd16(d1, d_half), e1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
                dd = vis_fpack16_pair(d0, d1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
                *(mlib_d64*)dst = fgpixel_d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
                vis_pst_32(dd, dst, mask);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
            while (dst < dst_end) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
                pix = *src++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
                dd = vis_fpadd16(MUL8_VIS(srcG_f, pix), d_half);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
                dd = vis_fpadd16(MUL8_VIS(*(mlib_f32*)dst, 255 - pix), dd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
                *(mlib_f32*)dst = vis_fpack16(dd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
                if (pix == 255) *(mlib_f32*)dst = vis_read_hi(fgpixel_d);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
                dst++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
549
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   475
            ADD_SUFF(IntArgbPreToIntArgbConvert)(dstBase, dstBase, width, 1,
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   476
                                                 pRasInfo, pRasInfo,
4273b1234967 6679308: Poor text rendering on translucent image.
prr
parents: 2
diff changeset
   477
                                                 pPrim, pCompInfo);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
            PTR_ADD(dstBase, scan);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
            pixels += rowBytes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
/***************************************************************/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
#endif /* JAVA2D_NO_MLIB */