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#ifndef AnyByteBinary_h_Included
0N/A#define AnyByteBinary_h_Included
0N/A
0N/A#include <string.h>
0N/A
0N/A#include "AlphaMacros.h"
0N/A#include "GraphicsPrimitiveMgr.h"
0N/A#include "LoopMacros.h"
0N/A#include "LineUtils.h"
0N/A
0N/A/*
0N/A * This file contains macros that are similar to those found in LoopMacros.h
0N/A * and AlphaMacros.h, yet have been specialized to manipulate any one of the
0N/A * surfaces in the "ByteBinary" family. It also contains generalized versions
0N/A * of some macros that are used by the more specific ByteBinary surfaces.
0N/A */
0N/A
0N/A/* REMIND: the ByteBinary store macros should probably do ordered dithering */
0N/A#define DeclareByteBinaryLoadVars(PREFIX) \
0N/A jint *PREFIX ## Lut;
0N/A
0N/A#define DeclareByteBinaryStoreVars(PREFIX) \
0N/A unsigned char *PREFIX ## InvLut;
0N/A
0N/A#define SetByteBinaryStoreVarsYPos(PREFIX, pRasInfo, LOC)
0N/A#define SetByteBinaryStoreVarsXPos(PREFIX, pRasInfo, LOC)
0N/A
0N/A#define InitByteBinaryLoadVars(PREFIX, pRasInfo) \
0N/A PREFIX ## Lut = (pRasInfo)->lutBase
0N/A
0N/A#define InitByteBinaryStoreVarsY(PREFIX, pRasInfo) \
0N/A PREFIX ## InvLut = (pRasInfo)->invColorTable
0N/A
0N/A#define InitByteBinaryStoreVarsX(PREFIX, pRasInfo)
0N/A#define NextByteBinaryStoreVarsX(PREFIX)
0N/A#define NextByteBinaryStoreVarsY(PREFIX)
0N/A
0N/A
0N/A#define DeclareByteBinaryInitialLoadVars(TYPE, INFO, pRas, PREFIX, x) \
0N/A int PREFIX ## adjx = (x) + (INFO)->pixelBitOffset / TYPE ## BitsPerPixel; \
0N/A int PREFIX ## index = (PREFIX ## adjx) / TYPE ## PixelsPerByte; \
0N/A int PREFIX ## bits = TYPE ## MaxBitOffset - \
0N/A (((PREFIX ## adjx) % TYPE ## PixelsPerByte) * \
0N/A TYPE ## BitsPerPixel); \
0N/A int PREFIX ## bbpix = (pRas)[PREFIX ## index];
0N/A
0N/A#define InitialLoadByteBinary(TYPE, pRas, PREFIX) \
0N/A do { \
0N/A if (PREFIX ## bits < 0) { \
0N/A (pRas)[PREFIX ## index] = (jubyte) PREFIX ## bbpix; \
0N/A PREFIX ## bbpix = (pRas)[++(PREFIX ## index)]; \
0N/A PREFIX ## bits = TYPE ## MaxBitOffset; \
0N/A } \
0N/A } while (0)
0N/A
0N/A#define ShiftBitsByteBinary(TYPE, PREFIX) \
0N/A PREFIX ## bits -= TYPE ## BitsPerPixel
0N/A
0N/A#define FinalStoreByteBinary(TYPE, pRas, PREFIX) \
0N/A (pRas)[PREFIX ## index] = (jubyte) PREFIX ## bbpix
0N/A
0N/A#define CurrentPixelByteBinary(TYPE, PREFIX) \
0N/A ((PREFIX ## bbpix >> PREFIX ## bits) & TYPE ## PixelMask)
0N/A
0N/A
0N/A#define StoreByteBinaryPixel(TYPE, pRas, x, pixel)
0N/A
0N/A#define StoreByteBinaryPixelData(TYPE, pPix, x, pixel, PREFIX) \
0N/A do { \
0N/A PREFIX ## bbpix &= ~(TYPE ## PixelMask << PREFIX ## bits); \
0N/A PREFIX ## bbpix |= (pixel << PREFIX ## bits); \
0N/A } while (0)
0N/A
0N/A#define ByteBinaryPixelFromArgb(TYPE, pixel, rgb, pRasInfo) \
0N/A do { \
0N/A jint r, g, b; \
0N/A ExtractIntDcmComponentsX123(rgb, r, g, b); \
0N/A (pixel) = SurfaceData_InvColorMap((pRasInfo)->invColorTable, \
0N/A r, g, b); \
0N/A } while (0)
0N/A
0N/A#define XorByteBinaryPixelData(TYPE, pDst, x, PREFIX, \
0N/A srcpixel, xorpixel, mask) \
0N/A PREFIX ## bbpix ^= ((((srcpixel) ^ (xorpixel)) & TYPE ## PixelMask) \
0N/A << PREFIX ## bits)
0N/A
0N/A
0N/A#define LoadByteBinaryTo1IntRgb(TYPE, pRas, PREFIX, x, rgb) \
0N/A (rgb) = PREFIX ## Lut[CurrentPixelByteBinary(TYPE, PREFIX)]
0N/A
0N/A#define LoadByteBinaryTo1IntArgb(TYPE, pRas, PREFIX, x, argb) \
0N/A (argb) = PREFIX ## Lut[CurrentPixelByteBinary(TYPE, PREFIX)]
0N/A
0N/A#define LoadByteBinaryTo3ByteRgb(TYPE, pRas, PREFIX, x, r, g, b) \
0N/A do { \
0N/A jint rgb = PREFIX ## Lut[CurrentPixelByteBinary(TYPE, PREFIX)]; \
0N/A ExtractIntDcmComponentsX123(rgb, r, g, b); \
0N/A } while (0)
0N/A
0N/A#define LoadByteBinaryTo4ByteArgb(TYPE, pRas, PREFIX, x, a, r, g, b) \
0N/A do { \
0N/A jint argb = PREFIX ## Lut[CurrentPixelByteBinary(TYPE, PREFIX)]; \
0N/A ExtractIntDcmComponents1234(argb, a, r, g, b); \
0N/A } while (0)
0N/A
0N/A#define StoreByteBinaryFrom1IntRgb(TYPE, pRas, PREFIX, x, rgb) \
0N/A do { \
0N/A int r, g, b; \
0N/A ExtractIntDcmComponentsX123(rgb, r, g, b); \
0N/A StoreByteBinaryFrom3ByteRgb(TYPE, pRas, PREFIX, x, r, g, b); \
0N/A } while (0)
0N/A
0N/A#define StoreByteBinaryFrom1IntArgb(TYPE, pRas, PREFIX, x, argb) \
0N/A StoreByteBinaryFrom1IntRgb(TYPE, pRas, PREFIX, x, argb)
0N/A
0N/A#define StoreByteBinaryFrom3ByteRgb(TYPE, pRas, PREFIX, x, r, g, b) \
0N/A StoreByteBinaryPixelData(TYPE, pRas, x, \
0N/A SurfaceData_InvColorMap(PREFIX ## InvLut, \
0N/A r, g, b), \
0N/A PREFIX)
0N/A
0N/A#define StoreByteBinaryFrom4ByteArgb(TYPE, pRas, PREFIX, x, a, r, g, b) \
0N/A StoreByteBinaryFrom3ByteRgb(TYPE, pRas, PREFIX, x, r, g, b)
0N/A
0N/A
0N/A#define DeclareByteBinaryAlphaLoadData(TYPE, PREFIX) \
0N/A jint *PREFIX ## Lut; \
0N/A jint PREFIX ## rgb;
0N/A
0N/A#define InitByteBinaryAlphaLoadData(TYPE, PREFIX, pRasInfo) \
0N/A PREFIX ## Lut = (pRasInfo)->lutBase
0N/A
0N/A#define LoadAlphaFromByteBinaryFor4ByteArgb(TYPE, pRas, PREFIX, COMP_PREFIX) \
0N/A do { \
0N/A PREFIX ## rgb = PREFIX ## Lut[CurrentPixelByteBinary(TYPE, PREFIX)]; \
0N/A COMP_PREFIX ## A = ((juint) PREFIX ## rgb) >> 24; \
0N/A } while (0)
0N/A
0N/A#define Postload4ByteArgbFromByteBinary(TYPE, pRas, PREFIX, COMP_PREFIX) \
0N/A do { \
0N/A COMP_PREFIX ## R = (PREFIX ## rgb >> 16) & 0xff; \
0N/A COMP_PREFIX ## G = (PREFIX ## rgb >> 8) & 0xff; \
0N/A COMP_PREFIX ## B = (PREFIX ## rgb >> 0) & 0xff; \
0N/A } while (0)
0N/A
0N/A
0N/A#define ByteBinaryIsPremultiplied 0
0N/A
0N/A#define StoreByteBinaryFrom4ByteArgbComps(TYPE, pRas, PREFIX, x, COMP_PREFIX)\
0N/A StoreByteBinaryFrom4ByteArgb(TYPE, pRas, PREFIX, x, \
0N/A COMP_PREFIX ## A, COMP_PREFIX ## R, \
0N/A COMP_PREFIX ## G, COMP_PREFIX ## B)
0N/A
0N/A
0N/A
0N/A
0N/A#define BBBlitLoopWidthHeight(SRCTYPE, SRCPTR, SRCBASE, SRCINFO, SRCPREFIX, \
0N/A DSTTYPE, DSTPTR, DSTBASE, DSTINFO, DSTPREFIX, \
0N/A WIDTH, HEIGHT, BODY) \
0N/A do { \
0N/A SRCTYPE ## DataType *SRCPTR = (SRCTYPE ## DataType *) (SRCBASE); \
0N/A DSTTYPE ## DataType *DSTPTR = (DSTTYPE ## DataType *) (DSTBASE); \
0N/A jint srcScan = (SRCINFO)->scanStride; \
0N/A jint dstScan = (DSTINFO)->scanStride; \
0N/A jint srcx1 = (SRCINFO)->bounds.x1; \
0N/A jint dstx1 = (DSTINFO)->bounds.x1; \
0N/A Init ## DSTTYPE ## StoreVarsY(DSTPREFIX, DSTINFO); \
0N/A srcScan -= (WIDTH) * SRCTYPE ## PixelStride; \
0N/A dstScan -= (WIDTH) * DSTTYPE ## PixelStride; \
0N/A do { \
0N/A Declare ## SRCTYPE ## InitialLoadVars(SRCINFO, SRCPTR, SRCPREFIX, \
0N/A srcx1) \
0N/A Declare ## DSTTYPE ## InitialLoadVars(DSTINFO, DSTPTR, DSTPREFIX, \
0N/A dstx1) \
0N/A juint w = WIDTH; \
0N/A Init ## DSTTYPE ## StoreVarsX(DSTPREFIX, DSTINFO); \
0N/A do { \
0N/A InitialLoad ## SRCTYPE(SRCPTR, SRCPREFIX); \
0N/A InitialLoad ## DSTTYPE(DSTPTR, DSTPREFIX); \
0N/A BODY; \
0N/A ShiftBits ## SRCTYPE(SRCPREFIX); \
0N/A ShiftBits ## DSTTYPE(DSTPREFIX); \
0N/A SRCPTR = PtrAddBytes(SRCPTR, SRCTYPE ## PixelStride); \
0N/A DSTPTR = PtrAddBytes(DSTPTR, DSTTYPE ## PixelStride); \
0N/A Next ## DSTTYPE ## StoreVarsX(DSTPREFIX); \
0N/A } while (--w > 0); \
0N/A FinalStore ## DSTTYPE(DSTPTR, DSTPREFIX); \
0N/A SRCPTR = PtrAddBytes(SRCPTR, srcScan); \
0N/A DSTPTR = PtrAddBytes(DSTPTR, dstScan); \
0N/A Next ## DSTTYPE ## StoreVarsY(DSTPREFIX); \
0N/A } while (--HEIGHT > 0); \
0N/A } while (0)
0N/A
0N/A#define BBXorVia1IntArgb(SRCPTR, SRCTYPE, SRCPREFIX, \
0N/A DSTPTR, DSTTYPE, DSTPREFIX, \
0N/A XVAR, XORPIXEL, MASK, DSTINFOPTR) \
0N/A do { \
0N/A jint srcpixel; \
0N/A Load ## SRCTYPE ## To1IntArgb(SRCPTR, SRCPREFIX, XVAR, srcpixel); \
0N/A \
0N/A if (IsArgbTransparent(srcpixel)) { \
0N/A break; \
0N/A } \
0N/A \
0N/A DSTTYPE ## PixelFromArgb(srcpixel, srcpixel, DSTINFOPTR); \
0N/A \
0N/A Xor ## DSTTYPE ## PixelData(DSTPTR, XVAR, DSTPREFIX, srcpixel, \
0N/A XORPIXEL, MASK); \
0N/A } while (0)
0N/A
0N/A#define DEFINE_BYTE_BINARY_CONVERT_BLIT(SRC, DST, STRATEGY) \
0N/Avoid NAME_CONVERT_BLIT(SRC, DST)(void *srcBase, void *dstBase, \
0N/A juint width, juint height, \
0N/A SurfaceDataRasInfo *pSrcInfo, \
0N/A SurfaceDataRasInfo *pDstInfo, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A Declare ## SRC ## LoadVars(SrcRead) \
0N/A Declare ## DST ## StoreVars(DstWrite) \
0N/A \
0N/A Init ## SRC ## LoadVars(SrcRead, pSrcInfo); \
0N/A BBBlitLoopWidthHeight(SRC, pSrc, srcBase, pSrcInfo, SrcRead, \
0N/A DST, pDst, dstBase, pDstInfo, DstWrite, \
0N/A width, height, \
0N/A ConvertVia ## STRATEGY(pSrc, SRC, SrcRead, \
0N/A pDst, DST, DstWrite, \
0N/A 0, 0)); \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_XOR_BLIT(SRC, DST) \
0N/Avoid NAME_XOR_BLIT(SRC, DST)(void *srcBase, void *dstBase, \
0N/A juint width, juint height, \
0N/A SurfaceDataRasInfo *pSrcInfo, \
0N/A SurfaceDataRasInfo *pDstInfo, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint xorpixel = pCompInfo->details.xorPixel; \
0N/A juint alphamask = pCompInfo->alphaMask; \
0N/A Declare ## SRC ## LoadVars(SrcRead) \
0N/A Declare ## DST ## StoreVars(DstWrite) \
0N/A \
0N/A Init ## SRC ## LoadVars(SrcRead, pSrcInfo); \
0N/A BBBlitLoopWidthHeight(SRC, pSrc, srcBase, pSrcInfo, SrcRead, \
0N/A DST, pDst, dstBase, pDstInfo, DstWrite, \
0N/A width, height, \
0N/A BBXorVia1IntArgb(pSrc, SRC, SrcRead, \
0N/A pDst, DST, DstWrite, \
0N/A 0, xorpixel, \
0N/A alphamask, pDstInfo)); \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_SOLID_FILLRECT(DST) \
0N/Avoid NAME_SOLID_FILLRECT(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A jint lox, jint loy, \
0N/A jint hix, jint hiy, \
0N/A jint pixel, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A DST ## DataType *pPix; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A juint height = hiy - loy; \
0N/A juint width = hix - lox; \
0N/A \
0N/A pPix = PtrCoord(pRasInfo->rasBase, lox, DST ## PixelStride, loy, scan); \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, lox) \
0N/A jint w = width; \
0N/A do { \
0N/A InitialLoad ## DST(pPix, DstPix); \
0N/A Store ## DST ## PixelData(pPix, 0, pixel, DstPix); \
0N/A ShiftBits ## DST(DstPix); \
0N/A } while (--w > 0); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A } while (--height > 0); \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_SOLID_FILLSPANS(DST) \
0N/Avoid NAME_SOLID_FILLSPANS(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A SpanIteratorFuncs *pSpanFuncs, void *siData, \
0N/A jint pixel, NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A void *pBase = pRasInfo->rasBase; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A jint bbox[4]; \
0N/A \
0N/A while ((*pSpanFuncs->nextSpan)(siData, bbox)) { \
0N/A jint x = bbox[0]; \
0N/A jint y = bbox[1]; \
0N/A juint w = bbox[2] - x; \
0N/A juint h = bbox[3] - y; \
0N/A DST ## DataType *pPix = PtrCoord(pBase, \
0N/A x, DST ## PixelStride, \
0N/A y, scan); \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, x) \
0N/A jint relx = w; \
0N/A do { \
0N/A InitialLoad ## DST(pPix, DstPix); \
0N/A Store ## DST ## PixelData(pPix, 0, pixel, DstPix); \
0N/A ShiftBits ## DST(DstPix); \
0N/A } while (--relx > 0); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A } while (--h > 0); \
0N/A } \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_SOLID_DRAWLINE(DST) \
0N/Avoid NAME_SOLID_DRAWLINE(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A jint x1, jint y1, jint pixel, \
0N/A jint steps, jint error, \
0N/A jint bumpmajormask, jint errmajor, \
0N/A jint bumpminormask, jint errminor, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint scan = pRasInfo->scanStride; \
0N/A DST ## DataType *pPix = PtrCoord(pRasInfo->rasBase, \
0N/A x1, DST ## PixelStride, \
0N/A y1, scan); \
0N/A DeclareBumps(bumpmajor, bumpminor) \
0N/A \
0N/A scan *= DST ## PixelsPerByte; \
0N/A InitBumps(bumpmajor, bumpminor, bumpmajormask, bumpminormask, 1, scan); \
0N/A if (errmajor == 0) { \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, x1) \
0N/A Store ## DST ## PixelData(pPix, 0, pixel, DstPix); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A x1 += bumpmajor; \
0N/A } while (--steps > 0); \
0N/A } else { \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, x1) \
0N/A Store ## DST ## PixelData(pPix, 0, pixel, DstPix); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A if (error < 0) { \
0N/A x1 += bumpmajor; \
0N/A error += errmajor; \
0N/A } else { \
0N/A x1 += bumpminor; \
0N/A error -= errminor; \
0N/A } \
0N/A } while (--steps > 0); \
0N/A } \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_XOR_FILLRECT(DST) \
0N/Avoid NAME_XOR_FILLRECT(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A jint lox, jint loy, \
0N/A jint hix, jint hiy, \
0N/A jint pixel, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint xorpixel = pCompInfo->details.xorPixel; \
0N/A juint alphamask = pCompInfo->alphaMask; \
0N/A DST ## DataType *pPix; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A juint height = hiy - loy; \
0N/A juint width = hix - lox; \
0N/A \
0N/A pPix = PtrCoord(pRasInfo->rasBase, lox, DST ## PixelStride, loy, scan); \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, lox) \
0N/A jint w = width; \
0N/A do { \
0N/A InitialLoad ## DST(pPix, DstPix); \
0N/A Xor ## DST ## PixelData(pPix, 0, DstPix, \
0N/A pixel, xorpixel, alphamask); \
0N/A ShiftBits ## DST(DstPix); \
0N/A } while (--w > 0); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A } while (--height > 0); \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_XOR_FILLSPANS(DST) \
0N/Avoid NAME_XOR_FILLSPANS(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A SpanIteratorFuncs *pSpanFuncs, \
0N/A void *siData, jint pixel, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A void *pBase = pRasInfo->rasBase; \
0N/A jint xorpixel = pCompInfo->details.xorPixel; \
0N/A juint alphamask = pCompInfo->alphaMask; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A jint bbox[4]; \
0N/A \
0N/A while ((*pSpanFuncs->nextSpan)(siData, bbox)) { \
0N/A jint x = bbox[0]; \
0N/A jint y = bbox[1]; \
0N/A juint w = bbox[2] - x; \
0N/A juint h = bbox[3] - y; \
0N/A DST ## DataType *pPix = PtrCoord(pBase, \
0N/A x, DST ## PixelStride, \
0N/A y, scan); \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, x) \
0N/A jint relx = w; \
0N/A do { \
0N/A InitialLoad ## DST(pPix, DstPix); \
0N/A Xor ## DST ## PixelData(pPix, 0, DstPix, \
0N/A pixel, xorpixel, alphamask); \
0N/A ShiftBits ## DST(DstPix); \
0N/A } while (--relx > 0); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A } while (--h > 0); \
0N/A } \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_XOR_DRAWLINE(DST) \
0N/Avoid NAME_XOR_DRAWLINE(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A jint x1, jint y1, jint pixel, \
0N/A jint steps, jint error, \
0N/A jint bumpmajormask, jint errmajor, \
0N/A jint bumpminormask, jint errminor, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint xorpixel = pCompInfo->details.xorPixel; \
0N/A juint alphamask = pCompInfo->alphaMask; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A DST ## DataType *pPix = PtrCoord(pRasInfo->rasBase, \
0N/A x1, DST ## PixelStride, \
0N/A y1, scan); \
0N/A DeclareBumps(bumpmajor, bumpminor) \
0N/A \
0N/A scan *= DST ## PixelsPerByte; \
0N/A InitBumps(bumpmajor, bumpminor, bumpmajormask, bumpminormask, 1, scan); \
0N/A \
0N/A if (errmajor == 0) { \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, x1) \
0N/A Xor ## DST ## PixelData(pPix, 0, DstPix, \
0N/A pixel, xorpixel, alphamask); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A x1 += bumpmajor; \
0N/A } while (--steps > 0); \
0N/A } else { \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, x1) \
0N/A Xor ## DST ## PixelData(pPix, 0, DstPix, \
0N/A pixel, xorpixel, alphamask); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A if (error < 0) { \
0N/A x1 += bumpmajor; \
0N/A error += errmajor; \
0N/A } else { \
0N/A x1 += bumpminor; \
0N/A error -= errminor; \
0N/A } \
0N/A } while (--steps > 0); \
0N/A } \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_SOLID_DRAWGLYPHLIST(DST) \
0N/Avoid NAME_SOLID_DRAWGLYPHLIST(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A ImageRef *glyphs, \
0N/A jint totalGlyphs, jint fgpixel, \
0N/A jint argbcolor, \
0N/A jint clipLeft, jint clipTop, \
0N/A jint clipRight, jint clipBottom, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint glyphCounter; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A DST ## DataType *pPix; \
0N/A\
0N/A for (glyphCounter = 0; glyphCounter < totalGlyphs; glyphCounter++) { \
0N/A DeclareDrawGlyphListClipVars(pixels, rowBytes, width, height, \
0N/A left, top, right, bottom) \
0N/A ClipDrawGlyphList(DST, pixels, 1, rowBytes, width, height, \
0N/A left, top, right, bottom, \
0N/A clipLeft, clipTop, clipRight, clipBottom, \
0N/A glyphs, glyphCounter, continue) \
0N/A pPix = PtrCoord(pRasInfo->rasBase,left,DST ## PixelStride,top,scan); \
0N/A\
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, left) \
0N/A jint x = 0; \
0N/A do { \
0N/A InitialLoad ## DST(pPix, DstPix); \
0N/A if (pixels[x]) { \
0N/A Store ## DST ## PixelData(pPix, 0, fgpixel, DstPix); \
0N/A } \
0N/A ShiftBits ## DST(DstPix); \
0N/A } while (++x < width); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A pixels += rowBytes; \
0N/A } while (--height > 0); \
0N/A } \
0N/A}
0N/A
0N/A/*
0N/A * REMIND: we shouldn't be attempting to do antialiased text for the
0N/A * ByteBinary surfaces in the first place
0N/A */
0N/A#define DEFINE_BYTE_BINARY_SOLID_DRAWGLYPHLISTAA(DST, STRATEGY) \
0N/Avoid NAME_SOLID_DRAWGLYPHLISTAA(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A ImageRef *glyphs, \
0N/A jint totalGlyphs, jint fgpixel, \
0N/A jint argbcolor, \
0N/A jint clipLeft, jint clipTop, \
0N/A jint clipRight, jint clipBottom, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint glyphCounter; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A DST ## DataType *pPix; \
0N/A DeclareAlphaVarFor ## STRATEGY(srcA) \
0N/A DeclareCompVarsFor ## STRATEGY(src) \
0N/A\
0N/A Declare ## DST ## LoadVars(pix) \
0N/A Declare ## DST ## StoreVars(pix) \
0N/A\
0N/A Init ## DST ## LoadVars(pix, pRasInfo); \
0N/A Init ## DST ## StoreVarsY(pix, pRasInfo); \
0N/A Init ## DST ## StoreVarsX(pix, pRasInfo); \
0N/A Extract ## STRATEGY ## CompsAndAlphaFromArgb(argbcolor, src); \
0N/A\
0N/A for (glyphCounter = 0; glyphCounter < totalGlyphs; glyphCounter++) { \
0N/A DeclareDrawGlyphListClipVars(pixels, rowBytes, width, height, \
0N/A left, top, right, bottom) \
0N/A ClipDrawGlyphList(DST, pixels, 1, rowBytes, width, height, \
0N/A left, top, right, bottom, \
0N/A clipLeft, clipTop, clipRight, clipBottom, \
0N/A glyphs, glyphCounter, continue) \
0N/A pPix = PtrCoord(pRasInfo->rasBase,left,DST ## PixelStride,top,scan); \
0N/A\
0N/A Set ## DST ## StoreVarsYPos(pix, pRasInfo, top); \
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, pix, left) \
0N/A int x = 0; \
0N/A Set ## DST ## StoreVarsXPos(pix, pRasInfo, left); \
0N/A do { \
0N/A InitialLoad ## DST(pPix, pix); \
0N/A GlyphListAABlend ## STRATEGY(DST, pixels, x, pPix, \
0N/A fgpixel, pix, src); \
0N/A ShiftBits ## DST(pix); \
0N/A Next ## DST ## StoreVarsX(pix); \
0N/A } while (++x < width); \
0N/A FinalStore ## DST(pPix, pix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A pixels += rowBytes; \
0N/A Next ## DST ## StoreVarsY(pix); \
0N/A } while (--height > 0); \
0N/A } \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_XOR_DRAWGLYPHLIST(DST) \
0N/Avoid NAME_XOR_DRAWGLYPHLIST(DST)(SurfaceDataRasInfo *pRasInfo, \
0N/A ImageRef *glyphs, \
0N/A jint totalGlyphs, jint fgpixel, \
0N/A jint argbcolor, \
0N/A jint clipLeft, jint clipTop, \
0N/A jint clipRight, jint clipBottom, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A jint glyphCounter; \
0N/A jint scan = pRasInfo->scanStride; \
0N/A jint xorpixel = pCompInfo->details.xorPixel; \
0N/A juint alphamask = pCompInfo->alphaMask; \
0N/A DST ## DataType *pPix; \
0N/A \
0N/A for (glyphCounter = 0; glyphCounter < totalGlyphs; glyphCounter++) { \
0N/A DeclareDrawGlyphListClipVars(pixels, rowBytes, width, height, \
0N/A left, top, right, bottom) \
0N/A ClipDrawGlyphList(DST, pixels, 1, rowBytes, width, height, \
0N/A left, top, right, bottom, \
0N/A clipLeft, clipTop, clipRight, clipBottom, \
0N/A glyphs, glyphCounter, continue) \
0N/A pPix = PtrCoord(pRasInfo->rasBase,left,DST ## PixelStride,top,scan); \
0N/A\
0N/A do { \
0N/A Declare ## DST ## InitialLoadVars(pRasInfo, pPix, DstPix, left) \
0N/A jint x = 0; \
0N/A do { \
0N/A InitialLoad ## DST(pPix, DstPix); \
0N/A if (pixels[x]) { \
0N/A Xor ## DST ## PixelData(pPix, 0, DstPix, \
0N/A fgpixel, xorpixel, alphamask); \
0N/A } \
0N/A ShiftBits ## DST(DstPix); \
0N/A } while (++x < width); \
0N/A FinalStore ## DST(pPix, DstPix); \
0N/A pPix = PtrAddBytes(pPix, scan); \
0N/A pixels += rowBytes; \
0N/A } while (--height > 0); \
0N/A } \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_ALPHA_MASKBLIT(SRC, DST, STRATEGY) \
0N/Avoid NAME_ALPHA_MASKBLIT(SRC, DST) \
0N/A (void *dstBase, void *srcBase, \
0N/A jubyte *pMask, jint maskOff, jint maskScan, \
0N/A jint width, jint height, \
0N/A SurfaceDataRasInfo *pDstInfo, \
0N/A SurfaceDataRasInfo *pSrcInfo, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A DeclareAndSetOpaqueAlphaVarFor ## STRATEGY(pathA) \
0N/A DeclareAndClearAlphaVarFor ## STRATEGY(srcA) \
0N/A DeclareAndClearAlphaVarFor ## STRATEGY(dstA) \
0N/A DeclareAndInitExtraAlphaFor ## STRATEGY(extraA) \
0N/A jint srcScan = pSrcInfo->scanStride; \
0N/A jint dstScan = pDstInfo->scanStride; \
0N/A jboolean loadsrc, loaddst; \
0N/A jint srcx1 = pSrcInfo->bounds.x1; \
0N/A jint dstx1 = pDstInfo->bounds.x1; \
0N/A SRC ## DataType *pSrc = (SRC ## DataType *) (srcBase); \
0N/A DST ## DataType *pDst = (DST ## DataType *) (dstBase); \
0N/A Declare ## SRC ## AlphaLoadData(SrcRead) \
0N/A Declare ## DST ## AlphaLoadData(DstWrite) \
0N/A Declare ## DST ## StoreVars(DstWrite) \
0N/A DeclareAlphaOperands(SrcOp) \
0N/A DeclareAlphaOperands(DstOp) \
0N/A \
0N/A ExtractAlphaOperandsFor ## STRATEGY(AlphaRules[pCompInfo->rule].srcOps, \
0N/A SrcOp); \
0N/A ExtractAlphaOperandsFor ## STRATEGY(AlphaRules[pCompInfo->rule].dstOps, \
0N/A DstOp); \
0N/A loadsrc = !FuncIsZero(SrcOp) || FuncNeedsAlpha(DstOp); \
0N/A loaddst = pMask || !FuncIsZero(DstOp) || FuncNeedsAlpha(SrcOp); \
0N/A \
0N/A Init ## SRC ## AlphaLoadData(SrcRead, pSrcInfo); \
0N/A Init ## DST ## AlphaLoadData(DstWrite, pDstInfo); \
0N/A srcScan -= width * SRC ## PixelStride; \
0N/A dstScan -= width * DST ## PixelStride; \
0N/A maskScan -= width; \
0N/A if (pMask) { \
0N/A pMask += maskOff; \
0N/A } \
0N/A \
0N/A Init ## DST ## StoreVarsY(DstWrite, pDstInfo); \
0N/A do { \
0N/A Declare ## SRC ## InitialLoadVars(pSrcInfo, pSrc, SrcRead, srcx1) \
0N/A Declare ## DST ## InitialLoadVars(pDstInfo, pDst, DstWrite, dstx1) \
0N/A jint w = width; \
0N/A Init ## DST ## StoreVarsX(DstWrite, pDstInfo); \
0N/A do { \
0N/A DeclareAlphaVarFor ## STRATEGY(resA) \
0N/A DeclareCompVarsFor ## STRATEGY(res) \
0N/A DeclareAlphaVarFor ## STRATEGY(srcF) \
0N/A DeclareAlphaVarFor ## STRATEGY(dstF) \
0N/A \
0N/A InitialLoad ## SRC(pSrc, SrcRead); \
0N/A InitialLoad ## DST(pDst, DstWrite); \
0N/A if (pMask) { \
0N/A pathA = *pMask++; \
0N/A if (!pathA) { \
0N/A ShiftBits ## SRC(SrcRead); \
0N/A ShiftBits ## DST(DstWrite); \
0N/A pSrc = PtrAddBytes(pSrc, SRC ## PixelStride); \
0N/A pDst = PtrAddBytes(pDst, DST ## PixelStride); \
0N/A Next ## DST ## StoreVarsX(DstWrite); \
0N/A continue; \
0N/A } \
0N/A PromoteByteAlphaFor ## STRATEGY(pathA); \
0N/A } \
0N/A if (loadsrc) { \
0N/A LoadAlphaFrom ## SRC ## For ## STRATEGY(pSrc,SrcRead,src); \
0N/A srcA = MultiplyAlphaFor ## STRATEGY(extraA, srcA); \
0N/A } \
0N/A if (loaddst) { \
0N/A LoadAlphaFrom ## DST ## For ## STRATEGY(pDst,DstWrite,dst); \
0N/A } \
0N/A srcF = ApplyAlphaOperands(SrcOp, dstA); \
0N/A dstF = ApplyAlphaOperands(DstOp, srcA); \
0N/A if (pathA != MaxValFor ## STRATEGY) { \
0N/A srcF = MultiplyAlphaFor ## STRATEGY(pathA, srcF); \
0N/A dstF = MaxValFor ## STRATEGY - pathA + \
0N/A MultiplyAlphaFor ## STRATEGY(pathA, dstF); \
0N/A } \
0N/A if (srcF) { \
0N/A resA = MultiplyAlphaFor ## STRATEGY(srcF, srcA); \
0N/A if (!(SRC ## IsPremultiplied)) { \
0N/A srcF = resA; \
0N/A } else { \
0N/A srcF = MultiplyAlphaFor ## STRATEGY(srcF, extraA); \
0N/A } \
0N/A if (srcF) { \
0N/A /* assert(loadsrc); */ \
0N/A Postload ## STRATEGY ## From ## SRC(pSrc, SrcRead, res); \
0N/A if (srcF != MaxValFor ## STRATEGY) { \
0N/A MultiplyAndStore ## STRATEGY ## Comps(res, \
0N/A srcF, res); \
0N/A } \
0N/A } else { \
0N/A Set ## STRATEGY ## CompsToZero(res); \
0N/A } \
0N/A } else { \
0N/A if (dstF == MaxValFor ## STRATEGY) { \
0N/A ShiftBits ## SRC(SrcRead); \
0N/A ShiftBits ## DST(DstWrite); \
0N/A pSrc = PtrAddBytes(pSrc, SRC ## PixelStride); \
0N/A pDst = PtrAddBytes(pDst, DST ## PixelStride); \
0N/A Next ## DST ## StoreVarsX(DstWrite); \
0N/A continue; \
0N/A } \
0N/A resA = 0; \
0N/A Set ## STRATEGY ## CompsToZero(res); \
0N/A } \
0N/A if (dstF) { \
0N/A dstA = MultiplyAlphaFor ## STRATEGY(dstF, dstA); \
0N/A if (!(DST ## IsPremultiplied)) { \
0N/A dstF = dstA; \
0N/A } \
0N/A resA += dstA; \
0N/A if (dstF) { \
0N/A DeclareCompVarsFor ## STRATEGY(tmp) \
0N/A /* assert(loaddst); */ \
0N/A Postload ## STRATEGY ## From ## DST(pDst,DstWrite,tmp); \
0N/A if (dstF != MaxValFor ## STRATEGY) { \
0N/A MultiplyAndStore ## STRATEGY ## Comps(tmp, \
0N/A dstF, tmp); \
0N/A } \
0N/A Store ## STRATEGY ## CompsUsingOp(res, +=, tmp); \
0N/A } \
0N/A } \
0N/A if (!(DST ## IsPremultiplied) && resA && \
0N/A resA < MaxValFor ## STRATEGY) \
0N/A { \
0N/A DivideAndStore ## STRATEGY ## Comps(res, res, resA); \
0N/A } \
0N/A Store ## DST ## From ## STRATEGY ## Comps(pDst, DstWrite, \
0N/A 0, res); \
0N/A ShiftBits ## SRC(SrcRead); \
0N/A ShiftBits ## DST(DstWrite); \
0N/A pSrc = PtrAddBytes(pSrc, SRC ## PixelStride); \
0N/A pDst = PtrAddBytes(pDst, DST ## PixelStride); \
0N/A Next ## DST ## StoreVarsX(DstWrite); \
0N/A } while (--w > 0); \
0N/A FinalStore ## DST(pDst, DstWrite); \
0N/A pSrc = PtrAddBytes(pSrc, srcScan); \
0N/A pDst = PtrAddBytes(pDst, dstScan); \
0N/A Next ## DST ## StoreVarsY(DstWrite); \
0N/A if (pMask) { \
0N/A pMask = PtrAddBytes(pMask, maskScan); \
0N/A } \
0N/A } while (--height > 0); \
0N/A}
0N/A
0N/A#define DEFINE_BYTE_BINARY_ALPHA_MASKFILL(TYPE, STRATEGY) \
0N/Avoid NAME_ALPHA_MASKFILL(TYPE) \
0N/A (void *rasBase, \
0N/A jubyte *pMask, jint maskOff, jint maskScan, \
0N/A jint width, jint height, \
0N/A jint fgColor, \
0N/A SurfaceDataRasInfo *pRasInfo, \
0N/A NativePrimitive *pPrim, \
0N/A CompositeInfo *pCompInfo) \
0N/A{ \
0N/A DeclareAndSetOpaqueAlphaVarFor ## STRATEGY(pathA) \
0N/A DeclareAlphaVarFor ## STRATEGY(srcA) \
0N/A DeclareCompVarsFor ## STRATEGY(src) \
0N/A DeclareAndClearAlphaVarFor ## STRATEGY(dstA) \
0N/A DeclareAlphaVarFor ## STRATEGY(dstF) \
0N/A DeclareAlphaVarFor ## STRATEGY(dstFbase) \
0N/A jint rasScan = pRasInfo->scanStride; \
0N/A jboolean loaddst; \
0N/A jint x1 = pRasInfo->bounds.x1; \
0N/A TYPE ## DataType *pRas = (TYPE ## DataType *) (rasBase); \
0N/A Declare ## TYPE ## AlphaLoadData(DstWrite) \
0N/A Declare ## TYPE ## StoreVars(DstWrite) \
0N/A DeclareAlphaOperands(SrcOp) \
0N/A DeclareAlphaOperands(DstOp) \
0N/A \
0N/A Extract ## STRATEGY ## CompsAndAlphaFromArgb(fgColor, src); \
0N/A if (srcA != MaxValFor ## STRATEGY) { \
0N/A MultiplyAndStore ## STRATEGY ## Comps(src, srcA, src); \
0N/A } \
0N/A \
0N/A ExtractAlphaOperandsFor ## STRATEGY(AlphaRules[pCompInfo->rule].srcOps, \
0N/A SrcOp); \
0N/A ExtractAlphaOperandsFor ## STRATEGY(AlphaRules[pCompInfo->rule].dstOps, \
0N/A DstOp); \
0N/A loaddst = pMask || !FuncIsZero(DstOp) || FuncNeedsAlpha(SrcOp); \
0N/A \
0N/A dstFbase = dstF = ApplyAlphaOperands(DstOp, srcA); \
0N/A \
0N/A Init ## TYPE ## AlphaLoadData(DstWrite, pRasInfo); \
0N/A maskScan -= width; \
0N/A if (pMask) { \
0N/A pMask += maskOff; \
0N/A } \
0N/A \
0N/A Init ## TYPE ## StoreVarsY(DstWrite, pRasInfo); \
0N/A do { \
0N/A Declare ## TYPE ## InitialLoadVars(pRasInfo, pRas, DstWrite, x1) \
0N/A jint w = width; \
0N/A Init ## TYPE ## StoreVarsX(DstWrite, pRasInfo); \
0N/A do { \
0N/A DeclareAlphaVarFor ## STRATEGY(resA) \
0N/A DeclareCompVarsFor ## STRATEGY(res) \
0N/A DeclareAlphaVarFor ## STRATEGY(srcF) \
0N/A \
0N/A InitialLoad ## TYPE(pRas, DstWrite); \
0N/A if (pMask) { \
0N/A pathA = *pMask++; \
0N/A if (!pathA) { \
0N/A ShiftBits ## TYPE(DstWrite); \
0N/A Next ## TYPE ## StoreVarsX(DstWrite); \
0N/A continue; \
0N/A } \
0N/A PromoteByteAlphaFor ## STRATEGY(pathA); \
0N/A dstF = dstFbase; \
0N/A } \
0N/A if (loaddst) { \
0N/A LoadAlphaFrom ## TYPE ## For ## STRATEGY(pRas,DstWrite,dst);\
0N/A } \
0N/A srcF = ApplyAlphaOperands(SrcOp, dstA); \
0N/A if (pathA != MaxValFor ## STRATEGY) { \
0N/A srcF = MultiplyAlphaFor ## STRATEGY(pathA, srcF); \
0N/A dstF = MaxValFor ## STRATEGY - pathA + \
0N/A MultiplyAlphaFor ## STRATEGY(pathA, dstF); \
0N/A } \
0N/A if (srcF) { \
0N/A if (srcF == MaxValFor ## STRATEGY) { \
0N/A resA = srcA; \
0N/A Store ## STRATEGY ## CompsUsingOp(res, =, src); \
0N/A } else { \
0N/A resA = MultiplyAlphaFor ## STRATEGY(srcF, srcA); \
0N/A MultiplyAndStore ## STRATEGY ## Comps(res, srcF, src); \
0N/A } \
0N/A } else { \
0N/A if (dstF == MaxValFor ## STRATEGY) { \
0N/A ShiftBits ## TYPE(DstWrite); \
0N/A Next ## TYPE ## StoreVarsX(DstWrite); \
0N/A continue; \
0N/A } \
0N/A resA = 0; \
0N/A Set ## STRATEGY ## CompsToZero(res); \
0N/A } \
0N/A if (dstF) { \
0N/A dstA = MultiplyAlphaFor ## STRATEGY(dstF, dstA); \
0N/A if (!(TYPE ## IsPremultiplied)) { \
0N/A dstF = dstA; \
0N/A } \
0N/A resA += dstA; \
0N/A if (dstF) { \
0N/A DeclareCompVarsFor ## STRATEGY(tmp) \
0N/A /* assert(loaddst); */ \
0N/A Postload ## STRATEGY ## From ## TYPE(pRas,DstWrite,tmp); \
0N/A if (dstF != MaxValFor ## STRATEGY) { \
0N/A MultiplyAndStore ## STRATEGY ## Comps(tmp, \
0N/A dstF, tmp); \
0N/A } \
0N/A Store ## STRATEGY ## CompsUsingOp(res, +=, tmp); \
0N/A } \
0N/A } \
0N/A if (!(TYPE ## IsPremultiplied) && resA && \
0N/A resA < MaxValFor ## STRATEGY) \
0N/A { \
0N/A DivideAndStore ## STRATEGY ## Comps(res, res, resA); \
0N/A } \
0N/A Store ## TYPE ## From ## STRATEGY ## Comps(pRas, DstWrite, \
0N/A 0, res); \
0N/A ShiftBits ## TYPE(DstWrite); \
0N/A Next ## TYPE ## StoreVarsX(DstWrite); \
0N/A } while (--w > 0); \
0N/A FinalStore ## TYPE(pRas, DstWrite); \
0N/A pRas = PtrAddBytes(pRas, rasScan); \
0N/A Next ## TYPE ## StoreVarsY(DstWrite); \
0N/A if (pMask) { \
0N/A pMask = PtrAddBytes(pMask, maskScan); \
0N/A } \
0N/A } while (--height > 0); \
0N/A}
0N/A
0N/A
0N/A/*
0N/A * The macros defined above use the following macro definitions supplied
0N/A * for the various ByteBinary-specific surface types to manipulate pixel data.
0N/A *
0N/A * In the macro names in the following definitions, the string <stype>
0N/A * is used as a place holder for the SurfaceType name (eg. ByteBinary2Bit).
0N/A * The macros above access these type specific macros using the ANSI
0N/A * CPP token concatenation operator "##".
0N/A *
0N/A * Declare<stype>InitialLoadVars Declare and initialize the variables used
0N/A * for managing byte/bit offsets
0N/A * InitialLoad<stype> Store the current byte, fetch the next
0N/A * byte, and reset the bit offset
0N/A * ShiftBits<stype> Advance to the next pixel by adjusting
0N/A * the bit offset (1, 2, or 4 bits)
0N/A * FinalStore<stype> Store the current byte
0N/A * CurrentPixel<stype> Represents the current pixel by shifting
0N/A * the value with the current bit offset and
0N/A * then masking the value to either 1, 2, or
0N/A * 4 bits
0N/A */
0N/A
0N/A#endif /* AnyByteBinary_h_Included */