/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#if !defined(JAVA2D_NO_MLIB) || defined(MLIB_ADD_SUFF)
#include "vis_AlphaMacros.h"
/***************************************************************/
#define Gray2Argb(x) \
0xff000000 | (x << 16) | (x << 8) | x
/***************************************************************/
#if VIS >= 0x200
#define BMASK_FOR_ARGB \
vis_write_bmask(0x03214765, 0);
#else
#define BMASK_FOR_ARGB
#endif
/***************************************************************/
#define RGB2ABGR_DB(x) \
ARGB2ABGR_DB(x)
/***************************************************************/
#define INSERT_U8_34R \
/***************************************************************/
{
srcBase++;
dstBase++;
}
#pragma pipeloop(0)
srcBase += 2;
}
} else {
#pragma pipeloop(0)
srcBase += 2;
}
}
}
}
/***************************************************************/
{
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
src += 4;
}
}
return;
}
height = 1;
}
dstScan >>= 2;
srcScan >>= 2;
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
} else {
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
}
}
} else { /* abgr is not aligned */
dstScan >>= 2;
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
} else {
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
}
}
}
}
/***************************************************************/
{
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
dst[0] = x >> 24;
dst[1] = x;
dst += 4;
}
}
return;
}
height = 1;
}
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
} else { /* abgr is not aligned */
#pragma pipeloop(0)
f_argb += 2;
}
}
}
}
}
/***************************************************************/
{
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
dst[0] = 0xFF;
dst[1] = x;
dst += 4;
}
}
return;
}
height = 1;
}
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
#pragma pipeloop(0)
for (j = 0; j < count; j++) {
}
if (left) {
}
} else { /* abgr is not aligned */
#pragma pipeloop(0)
f_argb += 2;
}
}
}
}
}
/***************************************************************/
{
mlib_s32 r, g, b;
mlib_s32 i, j;
if (width < 16) {
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
for (i = 0; i < width; i++) {
dst[0] = 0xFF;
src += 3;
dst += 4;
}
}
return;
}
height = 1;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
}
for (; i < width; i++) {
b = pSrc[0];
g = pSrc[1];
r = pSrc[2];
pSrc += 3;
pDst += 4;
}
#pragma pipeloop(0)
for (i = 0; i < width; i++) {
b = pSrc[0];
g = pSrc[1];
r = pSrc[2];
pSrc += 3;
pDst += 4;
}
} else {
*pDst++ = 0xff;
#pragma pipeloop(0)
b = pSrc[0];
g = pSrc[1];
r = pSrc[2];
pSrc += 3;
pDst += 4;
}
if (width) {
}
}
}
}
/***************************************************************/
#if 1
vis_alignaddr(sp, 0); \
}
#else
}
#endif
/***************************************************************/
{
mlib_s32 r, g, b;
mlib_s32 i, j;
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
for (i = 0; i < width; i++) {
pDst[0] = 0xff;
pDst += 4;
}
}
return;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
for (i = 0; i < width; i++) {
vis_read_hi(amask));
pDst += 4;
}
#pragma pipeloop(0)
for (i = 0; i < width; i++) {
b = pp[0];
g = pp[1];
r = pp[2];
}
} else {
*pDst++ = 0xff;
#pragma pipeloop(0)
b = pp[0];
g = pp[1];
r = pp[2];
}
if (width) {
}
}
}
}
/***************************************************************/
{
mlib_s32 i, j, x;
return;
}
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
x = *src++;
dst[0] = 0xff;
dst[1] = x;
dst[2] = x;
dst[3] = x;
dst += 4;
}
}
return;
}
height = 1;
}
for (j = 0; j < height; j++) {
x = *src++;
dst[0] = 0xff;
dst[1] = x;
dst[2] = x;
dst[3] = x;
dst += 4;
}
#pragma pipeloop(0)
src += 4;
}
} else {
vis_alignaddrl(dst, 0);
#pragma pipeloop(0)
src += 4;
}
}
x = *src++;
dst[0] = 0xff;
dst[1] = x;
dst[2] = x;
dst[3] = x;
dst += 4;
}
}
}
/***************************************************************/
{
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
x = src[i];
neg_mask = x >> 31;
dst[0] ^= x >> 24;
dst[1] ^= x;
dst += 4;
}
}
return;
}
height = 1;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
src += 2;
}
}
x = *src++;
neg_mask = x >> 31;
dst[0] ^= x >> 24;
dst[1] ^= x;
dst += 4;
}
}
}
/***************************************************************/
{
mlib_s32 i, j, x;
/* if (!(((mlib_s32)dstBase | dstScan) & 3)) {
ADD_SUFF(ByteGrayToIntArgbScaleConvert)(SCALE_CALL_PARAMS);
return;
}*/
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
}
}
return;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
}
} else {
vis_alignaddrl(dst, 0);
#pragma pipeloop(0)
}
}
dst[0] = 0xff;
dst[1] = x;
dst[2] = x;
dst[3] = x;
dst += 4;
}
}
}
/***************************************************************/
{
mlib_s32 i, j, x;
/* if (!(((mlib_s32)dstBase | dstScan) & 3)) {
ADD_SUFF(ByteIndexedToIntAbgrConvert)(BLIT_CALL_PARAMS);
return;
}*/
if (width < 8) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
}
}
return;
}
height = 1;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
src += 2;
}
} else {
vis_alignaddrl(dst, 0);
#pragma pipeloop(0)
src += 2;
}
}
dst[0] = x >> 24;
dst[1] = x;
dst += 4;
}
}
}
/***************************************************************/
{
/* if (!(((mlib_s32)dstBase | dstScan) & 3)) {
ADD_SUFF(ByteIndexedToIntAbgrConvert)(BLIT_CALL_PARAMS);
return;
}*/
if (width < 8) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
if (x < 0) {
}
}
}
return;
}
height = 1;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
src += 2;
}
}
if (x < 0) {
dst[0] = x >> 24;
dst[1] = x;
}
dst += 4;
}
}
}
/***************************************************************/
{
if (width < 8) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
if (x < 0) {
} else {
}
}
}
return;
}
height = 1;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
src += 2;
}
}
if (x < 0) {
dst[0] = x >> 24;
dst[1] = x;
} else {
}
dst += 4;
}
}
}
/***************************************************************/
{
mlib_s32 i, j, x;
/*
if (!(((mlib_s32)dstBase | dstScan) & 3)) {
ADD_SUFF(ByteIndexedToIntAbgrScaleConvert)(SCALE_CALL_PARAMS);
return;
}
*/
if (width < 8) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
}
}
return;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
}
} else {
vis_alignaddrl(dst, 0);
#pragma pipeloop(0)
}
}
dst[0] = x >> 24;
dst[1] = x;
dst += 4;
}
}
}
/***************************************************************/
{
/*
if (!(((mlib_s32)dstBase | dstScan) & 3)) {
ADD_SUFF(ByteIndexedToIntAbgrScaleConvert)(SCALE_CALL_PARAMS);
return;
}
*/
if (width < 8) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
if (x < 0) {
}
}
}
return;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
}
}
if (x < 0) {
dst[0] = x >> 24;
dst[1] = x;
}
dst += 4;
}
}
}
/***************************************************************/
{
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
if (x >> 24) {
}
}
}
return;
}
for (j = 0; j < height; j++) {
#pragma pipeloop(0)
}
}
if (x >> 24) {
dst[0] = 0xFF;
dst[1] = x;
}
dst += 4;
}
}
}
/***************************************************************/
#ifdef MLIB_ADD_SUFF
#else
#endif
/***************************************************************/
{
mlib_s32 i, j;
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
}
}
return;
}
for (j = 0; j < height; j++) {
}
if (!off) {
#pragma pipeloop(0)
}
} else {
#pragma pipeloop(0)
}
}
}
}
}
/***************************************************************/
{
mlib_s32 i, j;
mlib_s32 x;
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
}
}
return;
}
for (j = 0; j < height; j++) {
dst[0] = x >> 24;
dst[1] = x;
dst += 4;
}
#pragma pipeloop(0)
}
} else {
vis_alignaddrl(dst, 0);
#pragma pipeloop(0)
}
}
dst[0] = x >> 24;
dst[1] = x;
dst += 4;
}
}
}
/***************************************************************/
{
mlib_s32 i, j;
mlib_s32 x;
if (width < 16) {
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
}
}
return;
}
for (j = 0; j < height; j++) {
dst[0] = 0xFF;
dst[1] = x;
dst += 4;
}
#pragma pipeloop(0)
}
} else {
vis_alignaddrl(dst, 0);
#pragma pipeloop(0)
}
}
dst[0] = 0xFF;
dst[1] = x;
dst += 4;
}
}
}
/***************************************************************/
{
mlib_s32 i, j;
vis_write_gsr(0 << 3);
unsigned int rowBytes;
if (!pixels) continue;
}
}
}
if (bottom > clipBottom) {
bottom = clipBottom;
}
continue;
}
}
}
}
for (j = 0; j < height; j++) {
} else {
}
/* Need to reset the GSR from the values set by the
* convert call near the end of this loop.
*/
vis_write_gsr(7 << 0);
dst++;
}
#pragma pipeloop(0)
src += 2;
}
dst++;
}
width, 1,
}
}
}
}
}
/***************************************************************/
#endif /* JAVA2D_NO_MLIB */