0N/A/*
2362N/A * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A#include "Any4Byte.h"
0N/A#include "FourByteAbgrPre.h"
0N/A#include "AlphaMacros.h"
0N/A
0N/A#include "IntArgb.h"
0N/A#include "IntArgbBm.h"
0N/A#include "IntArgbPre.h"
0N/A#include "IntRgb.h"
0N/A#include "ThreeByteBgr.h"
0N/A#include "ByteGray.h"
0N/A#include "ByteIndexed.h"
0N/A
0N/A/*
0N/A * This file declares, registers, and defines the various graphics
0N/A * primitive loops to manipulate surfaces of type "FourByteAbgrPre".
0N/A *
0N/A * See also LoopMacros.h
0N/A */
0N/A
0N/ARegisterFunc RegisterFourByteAbgrPre;
0N/A
0N/ADECLARE_CONVERT_BLIT(FourByteAbgrPre, IntArgb);
0N/ADECLARE_CONVERT_BLIT(IntArgb, FourByteAbgrPre);
0N/ADECLARE_CONVERT_BLIT(IntRgb, FourByteAbgrPre);
0N/ADECLARE_CONVERT_BLIT(ThreeByteBgr, FourByteAbgrPre);
0N/ADECLARE_CONVERT_BLIT(ByteGray, FourByteAbgrPre);
0N/ADECLARE_CONVERT_BLIT(ByteIndexed, FourByteAbgrPre);
0N/ADECLARE_SCALE_BLIT(FourByteAbgrPre, IntArgb);
0N/ADECLARE_SCALE_BLIT(IntArgb, FourByteAbgrPre);
0N/ADECLARE_SCALE_BLIT(IntRgb, FourByteAbgrPre);
0N/ADECLARE_SCALE_BLIT(ThreeByteBgr, FourByteAbgrPre);
0N/ADECLARE_SCALE_BLIT(ByteGray, FourByteAbgrPre);
0N/ADECLARE_SCALE_BLIT(ByteIndexed, FourByteAbgrPre);
0N/ADECLARE_XPAR_CONVERT_BLIT(ByteIndexedBm, FourByteAbgrPre);
0N/ADECLARE_XPAR_SCALE_BLIT(ByteIndexedBm, FourByteAbgrPre);
0N/ADECLARE_XPAR_SCALE_BLIT(IntArgbBm, FourByteAbgrPre);
0N/ADECLARE_XPAR_BLITBG(ByteIndexedBm, FourByteAbgrPre);
0N/A
0N/ADECLARE_XOR_BLIT(IntArgb, FourByteAbgrPre);
0N/ADECLARE_SRC_MASKFILL(FourByteAbgrPre);
0N/ADECLARE_SRCOVER_MASKFILL(FourByteAbgrPre);
0N/ADECLARE_ALPHA_MASKFILL(FourByteAbgrPre);
0N/ADECLARE_SRCOVER_MASKBLIT(IntArgb, FourByteAbgrPre);
0N/ADECLARE_ALPHA_MASKBLIT(IntArgb, FourByteAbgrPre);
0N/ADECLARE_SRCOVER_MASKBLIT(IntArgbPre, FourByteAbgrPre);
0N/ADECLARE_ALPHA_MASKBLIT(IntArgbPre, FourByteAbgrPre);
0N/ADECLARE_ALPHA_MASKBLIT(IntRgb, FourByteAbgrPre);
0N/ADECLARE_SOLID_DRAWGLYPHLISTAA(FourByteAbgrPre);
0N/ADECLARE_SOLID_DRAWGLYPHLISTLCD(FourByteAbgrPre);
0N/A
0N/ADECLARE_TRANSFORMHELPER_FUNCS(FourByteAbgrPre);
0N/A
0N/ANativePrimitive FourByteAbgrPrePrimitives[] = {
0N/A REGISTER_ANY4BYTE_ISOCOPY_BLIT(FourByteAbgrPre),
0N/A REGISTER_ANY4BYTE_ISOSCALE_BLIT(FourByteAbgrPre),
0N/A REGISTER_CONVERT_BLIT(FourByteAbgrPre, IntArgb),
0N/A REGISTER_CONVERT_BLIT(IntArgb, FourByteAbgrPre),
0N/A REGISTER_CONVERT_BLIT(IntRgb, FourByteAbgrPre),
0N/A REGISTER_CONVERT_BLIT(ThreeByteBgr, FourByteAbgrPre),
0N/A REGISTER_CONVERT_BLIT(ByteGray, FourByteAbgrPre),
0N/A REGISTER_CONVERT_BLIT(ByteIndexed, FourByteAbgrPre),
0N/A REGISTER_SCALE_BLIT(FourByteAbgrPre, IntArgb),
0N/A REGISTER_SCALE_BLIT(IntArgb, FourByteAbgrPre),
0N/A REGISTER_SCALE_BLIT(IntRgb, FourByteAbgrPre),
0N/A REGISTER_SCALE_BLIT(ThreeByteBgr, FourByteAbgrPre),
0N/A REGISTER_SCALE_BLIT(ByteGray, FourByteAbgrPre),
0N/A REGISTER_SCALE_BLIT(ByteIndexed, FourByteAbgrPre),
0N/A REGISTER_XPAR_CONVERT_BLIT(ByteIndexedBm, FourByteAbgrPre),
0N/A REGISTER_XPAR_SCALE_BLIT(ByteIndexedBm, FourByteAbgrPre),
0N/A REGISTER_XPAR_SCALE_BLIT(IntArgbBm, FourByteAbgrPre),
0N/A REGISTER_XPAR_BLITBG(ByteIndexedBm, FourByteAbgrPre),
0N/A
0N/A REGISTER_XOR_BLIT(IntArgb, FourByteAbgrPre),
0N/A REGISTER_SRC_MASKFILL(FourByteAbgrPre),
0N/A REGISTER_SRCOVER_MASKFILL(FourByteAbgrPre),
0N/A REGISTER_ALPHA_MASKFILL(FourByteAbgrPre),
0N/A REGISTER_SRCOVER_MASKBLIT(IntArgb, FourByteAbgrPre),
0N/A REGISTER_ALPHA_MASKBLIT(IntArgb, FourByteAbgrPre),
0N/A REGISTER_SRCOVER_MASKBLIT(IntArgbPre, FourByteAbgrPre),
0N/A REGISTER_ALPHA_MASKBLIT(IntArgbPre, FourByteAbgrPre),
0N/A REGISTER_ALPHA_MASKBLIT(IntRgb, FourByteAbgrPre),
0N/A REGISTER_SOLID_DRAWGLYPHLISTAA(FourByteAbgrPre),
0N/A REGISTER_SOLID_DRAWGLYPHLISTLCD(FourByteAbgrPre),
0N/A
0N/A REGISTER_TRANSFORMHELPER_FUNCS(FourByteAbgrPre),
0N/A};
0N/A
0N/Ajboolean RegisterFourByteAbgrPre(JNIEnv *env)
0N/A{
0N/A return RegisterPrimitives(env, FourByteAbgrPrePrimitives,
0N/A ArraySize(FourByteAbgrPrePrimitives));
0N/A}
0N/A
0N/Ajint PixelForFourByteAbgrPre(SurfaceDataRasInfo *pRasInfo, jint rgb)
0N/A{
0N/A jint a, r, g, b;
0N/A if ((rgb >> 24) == -1) {
0N/A return ((rgb << 8) | (((juint) rgb) >> 24));
0N/A }
0N/A ExtractIntDcmComponents1234(rgb, a, r, g, b);
0N/A r = MUL8(a, r);
0N/A g = MUL8(a, g);
0N/A b = MUL8(a, b);
0N/A return ComposeIntDcmComponents1234(r, g, b, a);
0N/A}
0N/A
0N/ADEFINE_CONVERT_BLIT(FourByteAbgrPre, IntArgb, 1IntArgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(IntArgb, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(IntRgb, FourByteAbgrPre, 3ByteRgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(ThreeByteBgr, FourByteAbgrPre, 3ByteRgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(ByteGray, FourByteAbgrPre, 3ByteRgb)
0N/A
0N/ADEFINE_CONVERT_BLIT_LUT8(ByteIndexed, FourByteAbgrPre, ConvertOnTheFly)
0N/A
0N/ADEFINE_SCALE_BLIT(FourByteAbgrPre, IntArgb, 1IntArgb)
0N/A
0N/ADEFINE_SCALE_BLIT(IntArgb, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_SCALE_BLIT(IntRgb, FourByteAbgrPre, 3ByteRgb)
0N/A
0N/ADEFINE_SCALE_BLIT(ThreeByteBgr, FourByteAbgrPre, 3ByteRgb)
0N/A
0N/ADEFINE_SCALE_BLIT(ByteGray, FourByteAbgrPre, 3ByteRgb)
0N/A
0N/ADEFINE_SCALE_BLIT_LUT8(ByteIndexed, FourByteAbgrPre, ConvertOnTheFly)
0N/A
0N/ADEFINE_XPAR_CONVERT_BLIT_LUT8(ByteIndexedBm, FourByteAbgrPre,ConvertOnTheFly)
0N/A
0N/ADEFINE_XPAR_SCALE_BLIT_LUT8(ByteIndexedBm, FourByteAbgrPre,ConvertOnTheFly)
0N/A
0N/ADEFINE_XPAR_SCALE_BLIT(IntArgbBm, FourByteAbgrPre, 1IntRgb)
0N/A
0N/ADEFINE_XPAR_BLITBG_LUT8(ByteIndexedBm, FourByteAbgrPre, ConvertOnTheFly)
0N/A
0N/ADEFINE_XOR_BLIT(IntArgb, FourByteAbgrPre, Any4Byte)
0N/A
0N/ADEFINE_SRC_MASKFILL(FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_SRCOVER_MASKFILL(FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_ALPHA_MASKFILL(FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_SRCOVER_MASKBLIT(IntArgb, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_ALPHA_MASKBLIT(IntArgb, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_SRCOVER_MASKBLIT(IntArgbPre, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_ALPHA_MASKBLIT(IntArgbPre, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_ALPHA_MASKBLIT(IntRgb, FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_SOLID_DRAWGLYPHLISTAA(FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_SOLID_DRAWGLYPHLISTLCD(FourByteAbgrPre, 4ByteArgb)
0N/A
0N/ADEFINE_TRANSFORMHELPERS(FourByteAbgrPre)