Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/AnyInt.h
41159 views
/*1* Copyright (c) 2000, 2001, 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#include "GraphicsPrimitiveMgr.h"26#include "LoopMacros.h"2728/*29* This file contains macro and type definitions used by the macros in30* LoopMacros.h to manipulate a surface of type "AnyInt".31*/3233typedef jint AnyIntDataType;3435#define AnyIntPixelStride 43637#define DeclareAnyIntLoadVars(PREFIX)38#define DeclareAnyIntStoreVars(PREFIX)39#define InitAnyIntLoadVars(PREFIX, pRasInfo)40#define InitAnyIntStoreVarsY(PREFIX, pRasInfo)41#define InitAnyIntStoreVarsX(PREFIX, pRasInfo)42#define NextAnyIntStoreVarsX(PREFIX)43#define NextAnyIntStoreVarsY(PREFIX)4445#define DeclareAnyIntPixelData(PREFIX)4647#define ExtractAnyIntPixelData(PIXEL, PREFIX)4849#define StoreAnyIntPixelData(pPix, x, pixel, PREFIX) \50(pPix)[x] = (pixel)5152#define CopyAnyIntPixelData(pSrc, sx, pDst, dx) \53(pDst)[dx] = (pSrc)[sx]5455#define XorCopyAnyIntPixelData(pSrc, pDst, x, xorpixel, XORPREFIX) \56(pDst)[x] ^= (pSrc)[x] ^ (xorpixel)5758#define XorAnyIntPixelData(srcpixel, SRCPREFIX, pDst, x, \59xorpixel, XORPREFIX, mask, MASKPREFIX) \60(pDst)[x] ^= (((srcpixel) ^ (xorpixel)) & ~(mask))6162DECLARE_ISOCOPY_BLIT(AnyInt);63DECLARE_ISOSCALE_BLIT(AnyInt);64DECLARE_ISOXOR_BLIT(AnyInt);65DECLARE_CONVERT_BLIT(ByteIndexed, IntArgb);66DECLARE_SCALE_BLIT(ByteIndexed, IntArgb);67DECLARE_XPAR_CONVERT_BLIT(ByteIndexedBm, IntArgb);68DECLARE_XPAR_SCALE_BLIT(ByteIndexedBm, IntArgb);69DECLARE_XPAR_BLITBG(ByteIndexedBm, IntArgb);7071#define REGISTER_ANYINT_ISOCOPY_BLIT(INTTYPE) \72REGISTER_ISOCOPY_BLIT(INTTYPE, AnyInt)7374#define REGISTER_ANYINT_ISOSCALE_BLIT(INTTYPE) \75REGISTER_ISOSCALE_BLIT(INTTYPE, AnyInt)7677#define REGISTER_ANYINT_ISOXOR_BLIT(INTTYPE) \78REGISTER_ISOXOR_BLIT(INTTYPE, AnyInt)798081