Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/AnyShort.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 "AnyShort".31*/3233typedef jshort AnyShortDataType;3435#define AnyShortPixelStride 23637#define DeclareAnyShortLoadVars(PREFIX)38#define DeclareAnyShortStoreVars(PREFIX)39#define InitAnyShortLoadVars(PREFIX, pRasInfo)40#define InitAnyShortStoreVarsY(PREFIX, pRasInfo)41#define InitAnyShortStoreVarsX(PREFIX, pRasInfo)42#define NextAnyShortStoreVarsX(PREFIX)43#define NextAnyShortStoreVarsY(PREFIX)4445#define DeclareAnyShortPixelData(PREFIX)4647#define ExtractAnyShortPixelData(PIXEL, PREFIX)4849#define StoreAnyShortPixelData(pPix, x, pixel, PREFIX) \50(pPix)[x] = (jshort) (pixel)5152#define CopyAnyShortPixelData(pSrc, sx, pDst, dx) \53(pDst)[dx] = (pSrc)[sx]5455#define XorCopyAnyShortPixelData(pSrc, pDst, x, xorpixel, XORPREFIX) \56(pDst)[x] ^= (pSrc)[x] ^ (xorpixel)5758#define XorAnyShortPixelData(srcpixel, SRCPREFIX, pDst, x, \59xorpixel, XORPREFIX, mask, MASKPREFIX) \60(pDst)[x] ^= (((srcpixel) ^ (xorpixel)) & ~(mask))6162DECLARE_ISOCOPY_BLIT(AnyShort);63DECLARE_ISOSCALE_BLIT(AnyShort);64DECLARE_ISOXOR_BLIT(AnyShort);6566#define REGISTER_ANYSHORT_ISOCOPY_BLIT(SHORTTYPE) \67REGISTER_ISOCOPY_BLIT(SHORTTYPE, AnyShort)6869#define REGISTER_ANYSHORT_ISOSCALE_BLIT(SHORTTYPE) \70REGISTER_ISOSCALE_BLIT(SHORTTYPE, AnyShort)7172#define REGISTER_ANYSHORT_ISOXOR_BLIT(SHORTTYPE) \73REGISTER_ISOXOR_BLIT(SHORTTYPE, AnyShort)747576