Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/ByteBinary1Bit.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 ByteBinary1Bit_h_Included26#define ByteBinary1Bit_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 "ByteBinary1Bit".33*/3435typedef jubyte ByteBinary1BitPixelType;36typedef jubyte ByteBinary1BitDataType;3738#define ByteBinary1BitPixelStride 039#define ByteBinary1BitPixelsPerByte 840#define ByteBinary1BitBitsPerPixel 141#define ByteBinary1BitMaxBitOffset 742#define ByteBinary1BitPixelMask 0x14344#define DeclareByteBinary1BitLoadVars DeclareByteBinaryLoadVars45#define DeclareByteBinary1BitStoreVars DeclareByteBinaryStoreVars46#define SetByteBinary1BitStoreVarsYPos SetByteBinaryStoreVarsYPos47#define SetByteBinary1BitStoreVarsXPos SetByteBinaryStoreVarsXPos48#define InitByteBinary1BitLoadVars InitByteBinaryLoadVars49#define InitByteBinary1BitStoreVarsY InitByteBinaryStoreVarsY50#define InitByteBinary1BitStoreVarsX InitByteBinaryStoreVarsX51#define NextByteBinary1BitStoreVarsY NextByteBinaryStoreVarsY52#define NextByteBinary1BitStoreVarsX NextByteBinaryStoreVarsX5354#define DeclareByteBinary1BitInitialLoadVars(pRasInfo, pRas, PREFIX, x) \55DeclareByteBinaryInitialLoadVars(ByteBinary1Bit, pRasInfo, pRas, PREFIX, x)5657#define InitialLoadByteBinary1Bit(pRas, PREFIX) \58InitialLoadByteBinary(ByteBinary1Bit, pRas, PREFIX)5960#define ShiftBitsByteBinary1Bit(PREFIX) \61ShiftBitsByteBinary(ByteBinary1Bit, PREFIX)6263#define FinalStoreByteBinary1Bit(pRas, PREFIX) \64FinalStoreByteBinary(ByteBinary1Bit, pRas, PREFIX)6566#define CurrentPixelByteBinary1Bit(PREFIX) \67CurrentPixelByteBinary(ByteBinary1Bit, PREFIX)686970#define StoreByteBinary1BitPixel(pRas, x, pixel) \71StoreByteBinaryPixel(ByteBinary1Bit, pRas, x, pixel)7273#define StoreByteBinary1BitPixelData(pPix, x, pixel, PREFIX) \74StoreByteBinaryPixelData(ByteBinary1Bit, pPix, x, pixel, PREFIX)7576#define ByteBinary1BitPixelFromArgb(pixel, rgb, pRasInfo) \77ByteBinaryPixelFromArgb(ByteBinary1Bit, pixel, rgb, pRasInfo)7879#define XorByteBinary1BitPixelData(pDst, x, PREFIX, srcpixel, xorpixel, mask)\80XorByteBinaryPixelData(ByteBinary1Bit, pDst, x, PREFIX, \81srcpixel, xorpixel, mask)828384#define LoadByteBinary1BitTo1IntRgb(pRas, PREFIX, x, rgb) \85LoadByteBinaryTo1IntRgb(ByteBinary1Bit, pRas, PREFIX, x, rgb)8687#define LoadByteBinary1BitTo1IntArgb(pRas, PREFIX, x, argb) \88LoadByteBinaryTo1IntArgb(ByteBinary1Bit, pRas, PREFIX, x, argb)8990#define LoadByteBinary1BitTo3ByteRgb(pRas, PREFIX, x, r, g, b) \91LoadByteBinaryTo3ByteRgb(ByteBinary1Bit, pRas, PREFIX, x, r, g, b)9293#define LoadByteBinary1BitTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \94LoadByteBinaryTo4ByteArgb(ByteBinary1Bit, pRas, PREFIX, x, a, r, g, b)9596#define StoreByteBinary1BitFrom1IntRgb(pRas, PREFIX, x, rgb) \97StoreByteBinaryFrom1IntRgb(ByteBinary1Bit, pRas, PREFIX, x, rgb)9899#define StoreByteBinary1BitFrom1IntArgb(pRas, PREFIX, x, argb) \100StoreByteBinaryFrom1IntArgb(ByteBinary1Bit, pRas, PREFIX, x, argb)101102#define StoreByteBinary1BitFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \103StoreByteBinaryFrom3ByteRgb(ByteBinary1Bit, pRas, PREFIX, x, r, g, b)104105#define StoreByteBinary1BitFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \106StoreByteBinaryFrom4ByteArgb(ByteBinary1Bit, pRas, PREFIX, x, a, r, g, b)107108109#define DeclareByteBinary1BitAlphaLoadData(PREFIX) \110DeclareByteBinaryAlphaLoadData(ByteBinary1Bit, PREFIX)111112#define InitByteBinary1BitAlphaLoadData(PREFIX, pRasInfo) \113InitByteBinaryAlphaLoadData(ByteBinary1Bit, PREFIX, pRasInfo)114115#define LoadAlphaFromByteBinary1BitFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \116LoadAlphaFromByteBinaryFor4ByteArgb(ByteBinary1Bit, pRas, PREFIX, \117COMP_PREFIX)118119#define Postload4ByteArgbFromByteBinary1Bit(pRas, PREFIX, COMP_PREFIX) \120Postload4ByteArgbFromByteBinary(ByteBinary1Bit, pRas, PREFIX, COMP_PREFIX)121122123#define ByteBinary1BitIsPremultiplied ByteBinaryIsPremultiplied124125#define StoreByteBinary1BitFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \126StoreByteBinaryFrom4ByteArgbComps(ByteBinary1Bit, pRas, \127PREFIX, x, COMP_PREFIX)128129#endif /* ByteBinary1Bit_h_Included */130131132