Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/ByteBinary4Bit.h
41159 views
/*1* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef ByteBinary4Bit_h_Included26#define ByteBinary4Bit_h_Included2728#include "AnyByteBinary.h"2930/*31* This file contains macro and type definitions used by the macros in32* LoopMacros.h to manipulate a surface of type "ByteBinary4Bit".33*/3435typedef jubyte ByteBinary4BitPixelType;36typedef jubyte ByteBinary4BitDataType;3738#define ByteBinary4BitPixelStride 039#define ByteBinary4BitPixelsPerByte 240#define ByteBinary4BitBitsPerPixel 441#define ByteBinary4BitMaxBitOffset 442#define ByteBinary4BitPixelMask 0xf4344#define DeclareByteBinary4BitLoadVars DeclareByteBinaryLoadVars45#define DeclareByteBinary4BitStoreVars DeclareByteBinaryStoreVars46#define SetByteBinary4BitStoreVarsYPos SetByteBinaryStoreVarsYPos47#define SetByteBinary4BitStoreVarsXPos SetByteBinaryStoreVarsXPos48#define InitByteBinary4BitLoadVars InitByteBinaryLoadVars49#define InitByteBinary4BitStoreVarsY InitByteBinaryStoreVarsY50#define InitByteBinary4BitStoreVarsX InitByteBinaryStoreVarsX51#define NextByteBinary4BitStoreVarsY NextByteBinaryStoreVarsY52#define NextByteBinary4BitStoreVarsX NextByteBinaryStoreVarsX5354#define DeclareByteBinary4BitInitialLoadVars(pRasInfo, pRas, PREFIX, x) \55DeclareByteBinaryInitialLoadVars(ByteBinary4Bit, pRasInfo, pRas, PREFIX, x)5657#define InitialLoadByteBinary4Bit(pRas, PREFIX) \58InitialLoadByteBinary(ByteBinary4Bit, pRas, PREFIX)5960#define ShiftBitsByteBinary4Bit(PREFIX) \61ShiftBitsByteBinary(ByteBinary4Bit, PREFIX)6263#define FinalStoreByteBinary4Bit(pRas, PREFIX) \64FinalStoreByteBinary(ByteBinary4Bit, pRas, PREFIX)6566#define CurrentPixelByteBinary4Bit(PREFIX) \67CurrentPixelByteBinary(ByteBinary4Bit, PREFIX)686970#define StoreByteBinary4BitPixel(pRas, x, pixel) \71StoreByteBinaryPixel(ByteBinary4Bit, pRas, x, pixel)7273#define StoreByteBinary4BitPixelData(pPix, x, pixel, PREFIX) \74StoreByteBinaryPixelData(ByteBinary4Bit, pPix, x, pixel, PREFIX)7576#define ByteBinary4BitPixelFromArgb(pixel, rgb, pRasInfo) \77ByteBinaryPixelFromArgb(ByteBinary4Bit, pixel, rgb, pRasInfo)7879#define XorByteBinary4BitPixelData(pDst, x, PREFIX, srcpixel, xorpixel, mask)\80XorByteBinaryPixelData(ByteBinary4Bit, pDst, x, PREFIX, \81srcpixel, xorpixel, mask)828384#define LoadByteBinary4BitTo1IntRgb(pRas, PREFIX, x, rgb) \85LoadByteBinaryTo1IntRgb(ByteBinary4Bit, pRas, PREFIX, x, rgb)8687#define LoadByteBinary4BitTo1IntArgb(pRas, PREFIX, x, argb) \88LoadByteBinaryTo1IntArgb(ByteBinary4Bit, pRas, PREFIX, x, argb)8990#define LoadByteBinary4BitTo3ByteRgb(pRas, PREFIX, x, r, g, b) \91LoadByteBinaryTo3ByteRgb(ByteBinary4Bit, pRas, PREFIX, x, r, g, b)9293#define LoadByteBinary4BitTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \94LoadByteBinaryTo4ByteArgb(ByteBinary4Bit, pRas, PREFIX, x, a, r, g, b)9596#define StoreByteBinary4BitFrom1IntRgb(pRas, PREFIX, x, rgb) \97StoreByteBinaryFrom1IntRgb(ByteBinary4Bit, pRas, PREFIX, x, rgb)9899#define StoreByteBinary4BitFrom1IntArgb(pRas, PREFIX, x, argb) \100StoreByteBinaryFrom1IntArgb(ByteBinary4Bit, pRas, PREFIX, x, argb)101102#define StoreByteBinary4BitFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \103StoreByteBinaryFrom3ByteRgb(ByteBinary4Bit, pRas, PREFIX, x, r, g, b)104105#define StoreByteBinary4BitFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \106StoreByteBinaryFrom4ByteArgb(ByteBinary4Bit, pRas, PREFIX, x, a, r, g, b)107108109#define DeclareByteBinary4BitAlphaLoadData(PREFIX) \110DeclareByteBinaryAlphaLoadData(ByteBinary4Bit, PREFIX)111112#define InitByteBinary4BitAlphaLoadData(PREFIX, pRasInfo) \113InitByteBinaryAlphaLoadData(ByteBinary4Bit, PREFIX, pRasInfo)114115#define LoadAlphaFromByteBinary4BitFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \116LoadAlphaFromByteBinaryFor4ByteArgb(ByteBinary4Bit, pRas, PREFIX, \117COMP_PREFIX)118119#define Postload4ByteArgbFromByteBinary4Bit(pRas, PREFIX, COMP_PREFIX) \120Postload4ByteArgbFromByteBinary(ByteBinary4Bit, pRas, PREFIX, COMP_PREFIX)121122123#define ByteBinary4BitIsPremultiplied ByteBinaryIsPremultiplied124125#define StoreByteBinary4BitFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \126StoreByteBinaryFrom4ByteArgbComps(ByteBinary4Bit, pRas, \127PREFIX, x, COMP_PREFIX)128129#endif /* ByteBinary4Bit_h_Included */130131132