Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/ByteBinary2Bit.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 ByteBinary2Bit_h_Included26#define ByteBinary2Bit_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 "ByteBinary2Bit".33*/3435typedef jubyte ByteBinary2BitPixelType;36typedef jubyte ByteBinary2BitDataType;3738#define ByteBinary2BitPixelStride 039#define ByteBinary2BitPixelsPerByte 440#define ByteBinary2BitBitsPerPixel 241#define ByteBinary2BitMaxBitOffset 642#define ByteBinary2BitPixelMask 0x34344#define DeclareByteBinary2BitLoadVars DeclareByteBinaryLoadVars45#define DeclareByteBinary2BitStoreVars DeclareByteBinaryStoreVars46#define SetByteBinary2BitStoreVarsYPos SetByteBinaryStoreVarsYPos47#define SetByteBinary2BitStoreVarsXPos SetByteBinaryStoreVarsXPos48#define InitByteBinary2BitLoadVars InitByteBinaryLoadVars49#define InitByteBinary2BitStoreVarsY InitByteBinaryStoreVarsY50#define InitByteBinary2BitStoreVarsX InitByteBinaryStoreVarsX51#define NextByteBinary2BitStoreVarsY NextByteBinaryStoreVarsY52#define NextByteBinary2BitStoreVarsX NextByteBinaryStoreVarsX5354#define DeclareByteBinary2BitInitialLoadVars(pRasInfo, pRas, PREFIX, x) \55DeclareByteBinaryInitialLoadVars(ByteBinary2Bit, pRasInfo, pRas, PREFIX, x)5657#define InitialLoadByteBinary2Bit(pRas, PREFIX) \58InitialLoadByteBinary(ByteBinary2Bit, pRas, PREFIX)5960#define ShiftBitsByteBinary2Bit(PREFIX) \61ShiftBitsByteBinary(ByteBinary2Bit, PREFIX)6263#define FinalStoreByteBinary2Bit(pRas, PREFIX) \64FinalStoreByteBinary(ByteBinary2Bit, pRas, PREFIX)6566#define CurrentPixelByteBinary2Bit(PREFIX) \67CurrentPixelByteBinary(ByteBinary2Bit, PREFIX)686970#define StoreByteBinary2BitPixel(pRas, x, pixel) \71StoreByteBinaryPixel(ByteBinary2Bit, pRas, x, pixel)7273#define StoreByteBinary2BitPixelData(pPix, x, pixel, PREFIX) \74StoreByteBinaryPixelData(ByteBinary2Bit, pPix, x, pixel, PREFIX)7576#define ByteBinary2BitPixelFromArgb(pixel, rgb, pRasInfo) \77ByteBinaryPixelFromArgb(ByteBinary2Bit, pixel, rgb, pRasInfo)7879#define XorByteBinary2BitPixelData(pDst, x, PREFIX, srcpixel, xorpixel, mask)\80XorByteBinaryPixelData(ByteBinary2Bit, pDst, x, PREFIX, \81srcpixel, xorpixel, mask)828384#define LoadByteBinary2BitTo1IntRgb(pRas, PREFIX, x, rgb) \85LoadByteBinaryTo1IntRgb(ByteBinary2Bit, pRas, PREFIX, x, rgb)8687#define LoadByteBinary2BitTo1IntArgb(pRas, PREFIX, x, argb) \88LoadByteBinaryTo1IntArgb(ByteBinary2Bit, pRas, PREFIX, x, argb)8990#define LoadByteBinary2BitTo3ByteRgb(pRas, PREFIX, x, r, g, b) \91LoadByteBinaryTo3ByteRgb(ByteBinary2Bit, pRas, PREFIX, x, r, g, b)9293#define LoadByteBinary2BitTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \94LoadByteBinaryTo4ByteArgb(ByteBinary2Bit, pRas, PREFIX, x, a, r, g, b)9596#define StoreByteBinary2BitFrom1IntRgb(pRas, PREFIX, x, rgb) \97StoreByteBinaryFrom1IntRgb(ByteBinary2Bit, pRas, PREFIX, x, rgb)9899#define StoreByteBinary2BitFrom1IntArgb(pRas, PREFIX, x, argb) \100StoreByteBinaryFrom1IntArgb(ByteBinary2Bit, pRas, PREFIX, x, argb)101102#define StoreByteBinary2BitFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \103StoreByteBinaryFrom3ByteRgb(ByteBinary2Bit, pRas, PREFIX, x, r, g, b)104105#define StoreByteBinary2BitFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \106StoreByteBinaryFrom4ByteArgb(ByteBinary2Bit, pRas, PREFIX, x, a, r, g, b)107108109#define DeclareByteBinary2BitAlphaLoadData(PREFIX) \110DeclareByteBinaryAlphaLoadData(ByteBinary2Bit, PREFIX)111112#define InitByteBinary2BitAlphaLoadData(PREFIX, pRasInfo) \113InitByteBinaryAlphaLoadData(ByteBinary2Bit, PREFIX, pRasInfo)114115#define LoadAlphaFromByteBinary2BitFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \116LoadAlphaFromByteBinaryFor4ByteArgb(ByteBinary2Bit, pRas, PREFIX, \117COMP_PREFIX)118119#define Postload4ByteArgbFromByteBinary2Bit(pRas, PREFIX, COMP_PREFIX) \120Postload4ByteArgbFromByteBinary(ByteBinary2Bit, pRas, PREFIX, COMP_PREFIX)121122123#define ByteBinary2BitIsPremultiplied ByteBinaryIsPremultiplied124125#define StoreByteBinary2BitFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \126StoreByteBinaryFrom4ByteArgbComps(ByteBinary2Bit, pRas, \127PREFIX, x, COMP_PREFIX)128129#endif /* ByteBinary2Bit_h_Included */130131132