0N/A/*
2362N/A * Copyright (c) 2000, 2004, 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 "AnyShort.h"
0N/A#include "UshortGray.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 "UshortGray".
0N/A *
0N/A * See also LoopMacros.h
0N/A */
0N/A
0N/ARegisterFunc RegisterUshortGray;
0N/A
0N/ADECLARE_CONVERT_BLIT(UshortGray, IntArgb);
0N/ADECLARE_CONVERT_BLIT(IntArgb, UshortGray);
0N/ADECLARE_CONVERT_BLIT(ThreeByteBgr, UshortGray);
0N/ADECLARE_CONVERT_BLIT(ByteGray, UshortGray);
0N/ADECLARE_CONVERT_BLIT(ByteIndexed, UshortGray);
0N/ADECLARE_SCALE_BLIT(UshortGray, IntArgb);
0N/ADECLARE_SCALE_BLIT(IntArgb, UshortGray);
0N/ADECLARE_SCALE_BLIT(ThreeByteBgr, UshortGray);
0N/ADECLARE_SCALE_BLIT(ByteGray, UshortGray);
0N/ADECLARE_SCALE_BLIT(ByteIndexed, UshortGray);
0N/ADECLARE_XPAR_CONVERT_BLIT(ByteIndexedBm, UshortGray);
0N/ADECLARE_XPAR_SCALE_BLIT(ByteIndexedBm, UshortGray);
0N/ADECLARE_XPAR_SCALE_BLIT(IntArgbBm, UshortGray);
0N/ADECLARE_XPAR_BLITBG(ByteIndexedBm, UshortGray);
0N/A
0N/ADECLARE_XOR_BLIT(IntArgb, UshortGray);
0N/ADECLARE_SRC_MASKFILL(UshortGray);
0N/ADECLARE_SRCOVER_MASKFILL(UshortGray);
0N/ADECLARE_ALPHA_MASKFILL(UshortGray);
0N/ADECLARE_SRCOVER_MASKBLIT(IntArgb, UshortGray);
0N/ADECLARE_ALPHA_MASKBLIT(IntArgb, UshortGray);
0N/ADECLARE_SRCOVER_MASKBLIT(IntArgbPre, UshortGray);
0N/ADECLARE_ALPHA_MASKBLIT(IntArgbPre, UshortGray);
0N/ADECLARE_ALPHA_MASKBLIT(IntRgb, UshortGray);
0N/ADECLARE_SOLID_DRAWGLYPHLISTAA(UshortGray);
0N/A
0N/ANativePrimitive UshortGrayPrimitives[] = {
0N/A REGISTER_ANYSHORT_ISOCOPY_BLIT(UshortGray),
0N/A REGISTER_ANYSHORT_ISOSCALE_BLIT(UshortGray),
0N/A REGISTER_ANYSHORT_ISOXOR_BLIT(UshortGray),
0N/A REGISTER_CONVERT_BLIT(UshortGray, IntArgb),
0N/A REGISTER_CONVERT_BLIT(IntArgb, UshortGray),
0N/A REGISTER_CONVERT_BLIT_EQUIV(IntRgb, UshortGray,
0N/A NAME_CONVERT_BLIT(IntArgb, UshortGray)),
0N/A REGISTER_CONVERT_BLIT(ThreeByteBgr, UshortGray),
0N/A REGISTER_CONVERT_BLIT(ByteGray, UshortGray),
0N/A REGISTER_CONVERT_BLIT(ByteIndexed, UshortGray),
0N/A REGISTER_SCALE_BLIT(UshortGray, IntArgb),
0N/A REGISTER_SCALE_BLIT(IntArgb, UshortGray),
0N/A REGISTER_SCALE_BLIT_EQUIV(IntRgb, UshortGray,
0N/A NAME_SCALE_BLIT(IntArgb, UshortGray)),
0N/A REGISTER_SCALE_BLIT(ThreeByteBgr, UshortGray),
0N/A REGISTER_SCALE_BLIT(ByteGray, UshortGray),
0N/A REGISTER_SCALE_BLIT(ByteIndexed, UshortGray),
0N/A REGISTER_XPAR_CONVERT_BLIT(ByteIndexedBm, UshortGray),
0N/A REGISTER_XPAR_SCALE_BLIT(ByteIndexedBm, UshortGray),
0N/A REGISTER_XPAR_SCALE_BLIT(IntArgbBm, UshortGray),
0N/A REGISTER_XPAR_BLITBG(ByteIndexedBm, UshortGray),
0N/A
0N/A REGISTER_XOR_BLIT(IntArgb, UshortGray),
0N/A REGISTER_SRC_MASKFILL(UshortGray),
0N/A REGISTER_SRCOVER_MASKFILL(UshortGray),
0N/A REGISTER_ALPHA_MASKFILL(UshortGray),
0N/A REGISTER_SRCOVER_MASKBLIT(IntArgb, UshortGray),
0N/A REGISTER_ALPHA_MASKBLIT(IntArgb, UshortGray),
0N/A REGISTER_SRCOVER_MASKBLIT(IntArgbPre, UshortGray),
0N/A REGISTER_ALPHA_MASKBLIT(IntArgbPre, UshortGray),
0N/A REGISTER_ALPHA_MASKBLIT(IntRgb, UshortGray),
0N/A REGISTER_SOLID_DRAWGLYPHLISTAA(UshortGray),
0N/A};
0N/A
0N/Ajboolean RegisterUshortGray(JNIEnv *env)
0N/A{
0N/A return RegisterPrimitives(env, UshortGrayPrimitives,
0N/A ArraySize(UshortGrayPrimitives));
0N/A}
0N/A
0N/Ajint PixelForUshortGray(SurfaceDataRasInfo *pRasInfo, jint rgb)
0N/A{
0N/A jint r, g, b;
0N/A ExtractIntDcmComponentsX123(rgb, r, g, b);
0N/A return ComposeUshortGrayFrom3ByteRgb(r, g, b);
0N/A}
0N/A
0N/ADEFINE_CONVERT_BLIT(UshortGray, IntArgb, 1IntArgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(IntArgb, UshortGray, 3ByteRgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(ThreeByteBgr, UshortGray, 3ByteRgb)
0N/A
0N/ADEFINE_CONVERT_BLIT(ByteGray, UshortGray, 1ByteGray)
0N/A
0N/ADEFINE_CONVERT_BLIT_LUT8(ByteIndexed, UshortGray, PreProcessLut)
0N/A
0N/ADEFINE_SCALE_BLIT(UshortGray, IntArgb, 1IntArgb)
0N/A
0N/ADEFINE_SCALE_BLIT(IntArgb, UshortGray, 3ByteRgb)
0N/A
0N/ADEFINE_SCALE_BLIT(ThreeByteBgr, UshortGray, 3ByteRgb)
0N/A
0N/ADEFINE_SCALE_BLIT(ByteGray, UshortGray, 1ByteGray)
0N/A
0N/ADEFINE_SCALE_BLIT_LUT8(ByteIndexed, UshortGray, PreProcessLut)
0N/A
0N/ADEFINE_XPAR_CONVERT_BLIT_LUT8(ByteIndexedBm, UshortGray, PreProcessLut)
0N/A
0N/ADEFINE_XPAR_SCALE_BLIT_LUT8(ByteIndexedBm, UshortGray, PreProcessLut)
0N/A
0N/ADEFINE_XPAR_SCALE_BLIT(IntArgbBm, UshortGray, 1IntRgb)
0N/A
0N/ADEFINE_XPAR_BLITBG_LUT8(ByteIndexedBm, UshortGray, PreProcessLut)
0N/A
0N/ADEFINE_XOR_BLIT(IntArgb, UshortGray, AnyShort)
0N/A
0N/ADEFINE_SRC_MASKFILL(UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_SRCOVER_MASKFILL(UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_ALPHA_MASKFILL(UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_SRCOVER_MASKBLIT(IntArgb, UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_ALPHA_MASKBLIT(IntArgb, UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_SRCOVER_MASKBLIT(IntArgbPre, UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_ALPHA_MASKBLIT(IntArgbPre, UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_ALPHA_MASKBLIT(IntRgb, UshortGray, 1ShortGray)
0N/A
0N/ADEFINE_SOLID_DRAWGLYPHLISTAA(UshortGray, 1ShortGray)