1/* 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26#include <stdlib.h> 27#include <string.h> 28#include <sys/utsname.h> 29#include "GraphicsPrimitiveMgr.h" 30#include "java2d_Mlib.h" 31 32typedef struct { 33 AnyFunc *func_c; 34 AnyFunc *func_vis; 35} AnyFunc_pair; 36 37#define DEF_FUNC(x) \ 38 void x(); \ 39 void ADD_SUFF(x)(); 40 41#define ADD_FUNC(x) \ 42 { & x, & ADD_SUFF(x) } 43 44/***************************************************************/ 45 46DEF_FUNC(AnyByteDrawGlyphList) 47DEF_FUNC(AnyByteDrawGlyphListXor) 48DEF_FUNC(AnyByteIsomorphicCopy) 49DEF_FUNC(AnyByteIsomorphicScaleCopy) 50DEF_FUNC(AnyByteIsomorphicXorCopy) 51DEF_FUNC(AnyByteSetLine) 52DEF_FUNC(AnyByteSetRect) 53DEF_FUNC(AnyByteSetSpans) 54DEF_FUNC(AnyByteSetParallelogram) 55DEF_FUNC(AnyByteXorLine) 56DEF_FUNC(AnyByteXorRect) 57DEF_FUNC(AnyByteXorSpans) 58DEF_FUNC(AnyShortDrawGlyphList) 59DEF_FUNC(AnyShortDrawGlyphListXor) 60DEF_FUNC(AnyShortIsomorphicCopy) 61DEF_FUNC(AnyShortIsomorphicScaleCopy) 62DEF_FUNC(AnyShortIsomorphicXorCopy) 63DEF_FUNC(AnyShortSetLine) 64DEF_FUNC(AnyShortSetRect) 65DEF_FUNC(AnyShortSetSpans) 66DEF_FUNC(AnyShortSetParallelogram) 67DEF_FUNC(AnyShortXorLine) 68DEF_FUNC(AnyShortXorRect) 69DEF_FUNC(AnyShortXorSpans) 70DEF_FUNC(Any3ByteDrawGlyphList) 71DEF_FUNC(Any3ByteDrawGlyphListXor) 72DEF_FUNC(Any3ByteIsomorphicCopy) 73DEF_FUNC(Any3ByteIsomorphicScaleCopy) 74DEF_FUNC(Any3ByteIsomorphicXorCopy) 75DEF_FUNC(Any3ByteSetLine) 76DEF_FUNC(Any3ByteSetRect) 77DEF_FUNC(Any3ByteSetSpans) 78DEF_FUNC(Any3ByteSetParallelogram) 79DEF_FUNC(Any3ByteXorLine) 80DEF_FUNC(Any3ByteXorRect) 81DEF_FUNC(Any3ByteXorSpans) 82DEF_FUNC(Any4ByteDrawGlyphList) 83DEF_FUNC(Any4ByteDrawGlyphListXor) 84DEF_FUNC(Any4ByteIsomorphicCopy) 85DEF_FUNC(Any4ByteIsomorphicScaleCopy) 86DEF_FUNC(Any4ByteIsomorphicXorCopy) 87DEF_FUNC(Any4ByteSetLine) 88DEF_FUNC(Any4ByteSetRect) 89DEF_FUNC(Any4ByteSetSpans) 90DEF_FUNC(Any4ByteSetParallelogram) 91DEF_FUNC(Any4ByteXorLine) 92DEF_FUNC(Any4ByteXorRect) 93DEF_FUNC(Any4ByteXorSpans) 94DEF_FUNC(AnyIntDrawGlyphList) 95DEF_FUNC(AnyIntDrawGlyphListXor) 96DEF_FUNC(AnyIntIsomorphicCopy) 97DEF_FUNC(AnyIntIsomorphicScaleCopy) 98DEF_FUNC(AnyIntIsomorphicXorCopy) 99DEF_FUNC(AnyIntSetLine) 100DEF_FUNC(AnyIntSetRect) 101DEF_FUNC(AnyIntSetSpans) 102DEF_FUNC(AnyIntSetParallelogram) 103DEF_FUNC(AnyIntXorLine) 104DEF_FUNC(AnyIntXorRect) 105DEF_FUNC(AnyIntXorSpans) 106DEF_FUNC(ByteGrayAlphaMaskFill) 107DEF_FUNC(ByteGrayDrawGlyphListAA) 108DEF_FUNC(ByteGraySrcMaskFill) 109DEF_FUNC(ByteGraySrcOverMaskFill) 110DEF_FUNC(ByteGrayToIntArgbConvert) 111DEF_FUNC(ByteGrayToIntArgbScaleConvert) 112DEF_FUNC(ByteIndexedBmToByteGrayScaleXparOver) 113DEF_FUNC(ByteIndexedBmToByteGrayXparBgCopy) 114DEF_FUNC(ByteIndexedBmToByteGrayXparOver) 115DEF_FUNC(ByteIndexedToByteGrayConvert) 116DEF_FUNC(ByteIndexedToByteGrayScaleConvert) 117DEF_FUNC(Index12GrayToByteGrayConvert) 118DEF_FUNC(Index12GrayToByteGrayScaleConvert) 119DEF_FUNC(Index8GrayToByteGrayConvert) 120DEF_FUNC(Index8GrayToByteGrayScaleConvert) 121DEF_FUNC(IntArgbBmToByteGrayScaleXparOver) 122DEF_FUNC(IntArgbBmToByteGrayXparBgCopy) 123DEF_FUNC(IntArgbBmToByteGrayXparOver) 124DEF_FUNC(IntArgbToByteGrayAlphaMaskBlit) 125DEF_FUNC(IntArgbToByteGrayConvert) 126DEF_FUNC(IntArgbToByteGrayScaleConvert) 127DEF_FUNC(IntArgbToByteGraySrcOverMaskBlit) 128DEF_FUNC(IntArgbToByteGrayXorBlit) 129DEF_FUNC(IntRgbToByteGrayAlphaMaskBlit) 130DEF_FUNC(ThreeByteBgrToByteGrayConvert) 131DEF_FUNC(ThreeByteBgrToByteGrayScaleConvert) 132DEF_FUNC(UshortGrayToByteGrayConvert) 133DEF_FUNC(UshortGrayToByteGrayScaleConvert) 134DEF_FUNC(ByteGrayToUshortGrayConvert) 135DEF_FUNC(ByteGrayToUshortGrayScaleConvert) 136DEF_FUNC(ByteIndexedBmToUshortGrayScaleXparOver) 137DEF_FUNC(ByteIndexedBmToUshortGrayXparBgCopy) 138DEF_FUNC(ByteIndexedBmToUshortGrayXparOver) 139DEF_FUNC(ByteIndexedToUshortGrayConvert) 140DEF_FUNC(ByteIndexedToUshortGrayScaleConvert) 141DEF_FUNC(IntArgbBmToUshortGrayScaleXparOver) 142DEF_FUNC(IntArgbToUshortGrayAlphaMaskBlit) 143DEF_FUNC(IntArgbToUshortGrayConvert) 144DEF_FUNC(IntArgbToUshortGrayScaleConvert) 145DEF_FUNC(IntArgbToUshortGraySrcOverMaskBlit) 146DEF_FUNC(IntArgbToUshortGrayXorBlit) 147DEF_FUNC(IntRgbToUshortGrayAlphaMaskBlit) 148DEF_FUNC(ThreeByteBgrToUshortGrayConvert) 149DEF_FUNC(ThreeByteBgrToUshortGrayScaleConvert) 150DEF_FUNC(UshortGrayAlphaMaskFill) 151DEF_FUNC(UshortGrayDrawGlyphListAA) 152DEF_FUNC(UshortGraySrcMaskFill) 153DEF_FUNC(UshortGraySrcOverMaskFill) 154DEF_FUNC(UshortGrayToIntArgbConvert) 155DEF_FUNC(UshortGrayToIntArgbScaleConvert) 156DEF_FUNC(ByteGrayToByteIndexedConvert) 157DEF_FUNC(ByteGrayToByteIndexedScaleConvert) 158DEF_FUNC(ByteIndexedAlphaMaskFill) 159DEF_FUNC(ByteIndexedBmToByteIndexedScaleXparOver) 160DEF_FUNC(ByteIndexedBmToByteIndexedXparBgCopy) 161DEF_FUNC(ByteIndexedBmToByteIndexedXparOver) 162DEF_FUNC(ByteIndexedDrawGlyphListAA) 163DEF_FUNC(ByteIndexedToByteIndexedConvert) 164DEF_FUNC(ByteIndexedToByteIndexedScaleConvert) 165DEF_FUNC(Index12GrayToByteIndexedConvert) 166DEF_FUNC(Index12GrayToByteIndexedScaleConvert) 167DEF_FUNC(IntArgbBmToByteIndexedScaleXparOver) 168DEF_FUNC(IntArgbBmToByteIndexedXparBgCopy) 169DEF_FUNC(IntArgbBmToByteIndexedXparOver) 170DEF_FUNC(IntArgbToByteIndexedAlphaMaskBlit) 171DEF_FUNC(IntArgbToByteIndexedConvert) 172DEF_FUNC(IntArgbToByteIndexedScaleConvert) 173DEF_FUNC(IntArgbToByteIndexedXorBlit) 174DEF_FUNC(IntRgbToByteIndexedAlphaMaskBlit) 175DEF_FUNC(ThreeByteBgrToByteIndexedConvert) 176DEF_FUNC(ThreeByteBgrToByteIndexedScaleConvert) 177DEF_FUNC(ByteGrayToFourByteAbgrConvert) 178DEF_FUNC(ByteGrayToFourByteAbgrScaleConvert) 179DEF_FUNC(ByteIndexedBmToFourByteAbgrScaleXparOver) 180DEF_FUNC(ByteIndexedBmToFourByteAbgrXparBgCopy) 181DEF_FUNC(ByteIndexedBmToFourByteAbgrXparOver) 182DEF_FUNC(ByteIndexedToFourByteAbgrConvert) 183DEF_FUNC(ByteIndexedToFourByteAbgrScaleConvert) 184DEF_FUNC(FourByteAbgrAlphaMaskFill) 185DEF_FUNC(FourByteAbgrDrawGlyphListAA) 186DEF_FUNC(FourByteAbgrSrcMaskFill) 187DEF_FUNC(FourByteAbgrSrcOverMaskFill) 188DEF_FUNC(FourByteAbgrToIntArgbConvert) 189DEF_FUNC(FourByteAbgrToIntArgbScaleConvert) 190DEF_FUNC(IntArgbBmToFourByteAbgrScaleXparOver) 191DEF_FUNC(IntArgbToFourByteAbgrAlphaMaskBlit) 192DEF_FUNC(IntArgbToFourByteAbgrConvert) 193DEF_FUNC(IntArgbToFourByteAbgrScaleConvert) 194DEF_FUNC(IntArgbToFourByteAbgrSrcOverMaskBlit) 195DEF_FUNC(IntArgbToFourByteAbgrXorBlit) 196DEF_FUNC(IntRgbToFourByteAbgrAlphaMaskBlit) 197DEF_FUNC(IntRgbToFourByteAbgrConvert) 198DEF_FUNC(IntRgbToFourByteAbgrScaleConvert) 199DEF_FUNC(ThreeByteBgrToFourByteAbgrConvert) 200DEF_FUNC(ThreeByteBgrToFourByteAbgrScaleConvert) 201DEF_FUNC(ByteGrayToFourByteAbgrPreConvert) 202DEF_FUNC(ByteGrayToFourByteAbgrPreScaleConvert) 203DEF_FUNC(ByteIndexedBmToFourByteAbgrPreScaleXparOver) 204DEF_FUNC(ByteIndexedBmToFourByteAbgrPreXparBgCopy) 205DEF_FUNC(ByteIndexedBmToFourByteAbgrPreXparOver) 206DEF_FUNC(ByteIndexedToFourByteAbgrPreConvert) 207DEF_FUNC(ByteIndexedToFourByteAbgrPreScaleConvert) 208DEF_FUNC(FourByteAbgrPreAlphaMaskFill) 209DEF_FUNC(FourByteAbgrPreDrawGlyphListAA) 210DEF_FUNC(FourByteAbgrPreSrcMaskFill) 211DEF_FUNC(FourByteAbgrPreSrcOverMaskFill) 212DEF_FUNC(FourByteAbgrPreToIntArgbConvert) 213DEF_FUNC(FourByteAbgrPreToIntArgbScaleConvert) 214DEF_FUNC(IntArgbBmToFourByteAbgrPreScaleXparOver) 215DEF_FUNC(IntArgbToFourByteAbgrPreAlphaMaskBlit) 216DEF_FUNC(IntArgbToFourByteAbgrPreConvert) 217DEF_FUNC(IntArgbToFourByteAbgrPreScaleConvert) 218DEF_FUNC(IntArgbToFourByteAbgrPreSrcOverMaskBlit) 219DEF_FUNC(IntArgbToFourByteAbgrPreXorBlit) 220DEF_FUNC(IntRgbToFourByteAbgrPreAlphaMaskBlit) 221DEF_FUNC(IntRgbToFourByteAbgrPreConvert) 222DEF_FUNC(IntRgbToFourByteAbgrPreScaleConvert) 223DEF_FUNC(ThreeByteBgrToFourByteAbgrPreConvert) 224DEF_FUNC(ThreeByteBgrToFourByteAbgrPreScaleConvert) 225DEF_FUNC(ByteIndexedBmToIntArgbScaleXparOver) 226DEF_FUNC(ByteIndexedBmToIntArgbXparBgCopy) 227DEF_FUNC(ByteIndexedBmToIntArgbXparOver) 228DEF_FUNC(ByteIndexedToIntArgbConvert) 229DEF_FUNC(ByteIndexedToIntArgbScaleConvert) 230DEF_FUNC(Index12GrayToIntArgbConvert) 231DEF_FUNC(IntArgbAlphaMaskFill) 232DEF_FUNC(IntArgbBmToIntArgbScaleXparOver) 233DEF_FUNC(IntArgbDrawGlyphListAA) 234DEF_FUNC(IntArgbSrcMaskFill) 235DEF_FUNC(IntArgbSrcOverMaskFill) 236DEF_FUNC(IntArgbToIntArgbAlphaMaskBlit) 237DEF_FUNC(IntArgbToIntArgbSrcOverMaskBlit) 238DEF_FUNC(IntArgbToIntArgbXorBlit) 239DEF_FUNC(IntRgbToIntArgbAlphaMaskBlit) 240DEF_FUNC(ByteIndexedBmToIntArgbBmScaleXparOver) 241DEF_FUNC(ByteIndexedBmToIntArgbBmXparBgCopy) 242DEF_FUNC(ByteIndexedBmToIntArgbBmXparOver) 243DEF_FUNC(ByteIndexedToIntArgbBmConvert) 244DEF_FUNC(ByteIndexedToIntArgbBmScaleConvert) 245DEF_FUNC(IntArgbBmAlphaMaskFill) 246DEF_FUNC(IntArgbBmDrawGlyphListAA) 247DEF_FUNC(IntArgbBmToIntArgbConvert) 248DEF_FUNC(IntArgbToIntArgbBmAlphaMaskBlit) 249DEF_FUNC(IntArgbToIntArgbBmConvert) 250DEF_FUNC(IntArgbToIntArgbBmScaleConvert) 251DEF_FUNC(IntArgbToIntArgbBmXorBlit) 252DEF_FUNC(ByteGrayToIntArgbPreConvert) 253DEF_FUNC(ByteGrayToIntArgbPreScaleConvert) 254DEF_FUNC(ByteIndexedBmToIntArgbPreScaleXparOver) 255DEF_FUNC(ByteIndexedBmToIntArgbPreXparBgCopy) 256DEF_FUNC(ByteIndexedBmToIntArgbPreXparOver) 257DEF_FUNC(ByteIndexedToIntArgbPreConvert) 258DEF_FUNC(ByteIndexedToIntArgbPreScaleConvert) 259DEF_FUNC(IntArgbPreAlphaMaskFill) 260DEF_FUNC(IntArgbPreDrawGlyphListAA) 261DEF_FUNC(IntArgbPreSrcMaskFill) 262DEF_FUNC(IntArgbPreSrcOverMaskFill) 263DEF_FUNC(IntArgbPreToIntArgbConvert) 264DEF_FUNC(IntArgbPreToIntArgbScaleConvert) 265DEF_FUNC(IntArgbToIntArgbPreAlphaMaskBlit) 266DEF_FUNC(IntArgbToIntArgbPreConvert) 267DEF_FUNC(IntArgbToIntArgbPreScaleConvert) 268DEF_FUNC(IntArgbToIntArgbPreSrcOverMaskBlit) 269DEF_FUNC(IntArgbToIntArgbPreXorBlit) 270DEF_FUNC(IntRgbToIntArgbPreAlphaMaskBlit) 271DEF_FUNC(IntRgbToIntArgbPreConvert) 272DEF_FUNC(IntRgbToIntArgbPreScaleConvert) 273DEF_FUNC(ThreeByteBgrToIntArgbPreConvert) 274DEF_FUNC(ThreeByteBgrToIntArgbPreScaleConvert) 275DEF_FUNC(ByteIndexedBmToIntBgrScaleXparOver) 276DEF_FUNC(ByteIndexedBmToIntBgrXparBgCopy) 277DEF_FUNC(ByteIndexedBmToIntBgrXparOver) 278DEF_FUNC(ByteIndexedToIntBgrConvert) 279DEF_FUNC(ByteIndexedToIntBgrScaleConvert) 280DEF_FUNC(IntArgbBmToIntBgrScaleXparOver) 281DEF_FUNC(IntArgbBmToIntBgrXparBgCopy) 282DEF_FUNC(IntArgbBmToIntBgrXparOver) 283DEF_FUNC(IntArgbToIntBgrAlphaMaskBlit) 284DEF_FUNC(IntArgbToIntBgrConvert) 285DEF_FUNC(IntArgbToIntBgrScaleConvert) 286DEF_FUNC(IntArgbToIntBgrSrcOverMaskBlit) 287DEF_FUNC(IntArgbToIntBgrXorBlit) 288DEF_FUNC(IntBgrAlphaMaskFill) 289DEF_FUNC(IntBgrDrawGlyphListAA) 290DEF_FUNC(IntBgrSrcMaskFill) 291DEF_FUNC(IntBgrSrcOverMaskFill) 292DEF_FUNC(IntBgrToIntArgbConvert) 293DEF_FUNC(IntBgrToIntArgbScaleConvert) 294DEF_FUNC(IntBgrToIntBgrAlphaMaskBlit) 295DEF_FUNC(IntRgbToIntBgrAlphaMaskBlit) 296DEF_FUNC(ThreeByteBgrToIntBgrConvert) 297DEF_FUNC(ThreeByteBgrToIntBgrScaleConvert) 298DEF_FUNC(ByteGrayToIntRgbConvert) 299DEF_FUNC(ByteGrayToIntRgbScaleConvert) 300DEF_FUNC(IntArgbBmToIntRgbXparBgCopy) 301DEF_FUNC(IntArgbBmToIntRgbXparOver) 302DEF_FUNC(IntArgbToIntRgbAlphaMaskBlit) 303DEF_FUNC(IntArgbToIntRgbSrcOverMaskBlit) 304DEF_FUNC(IntArgbToIntRgbXorBlit) 305DEF_FUNC(IntRgbAlphaMaskFill) 306DEF_FUNC(IntRgbDrawGlyphListAA) 307DEF_FUNC(IntRgbSrcMaskFill) 308DEF_FUNC(IntRgbSrcOverMaskFill) 309DEF_FUNC(IntRgbToIntArgbConvert) 310DEF_FUNC(IntRgbToIntArgbScaleConvert) 311DEF_FUNC(IntRgbToIntRgbAlphaMaskBlit) 312DEF_FUNC(ThreeByteBgrToIntRgbConvert) 313DEF_FUNC(ThreeByteBgrToIntRgbScaleConvert) 314DEF_FUNC(ByteGrayToIntRgbxConvert) 315DEF_FUNC(ByteGrayToIntRgbxScaleConvert) 316DEF_FUNC(ByteIndexedBmToIntRgbxScaleXparOver) 317DEF_FUNC(ByteIndexedBmToIntRgbxXparBgCopy) 318DEF_FUNC(ByteIndexedBmToIntRgbxXparOver) 319DEF_FUNC(ByteIndexedToIntRgbxConvert) 320DEF_FUNC(ByteIndexedToIntRgbxScaleConvert) 321DEF_FUNC(IntArgbBmToIntRgbxScaleXparOver) 322DEF_FUNC(IntArgbToIntRgbxConvert) 323DEF_FUNC(IntArgbToIntRgbxScaleConvert) 324DEF_FUNC(IntArgbToIntRgbxXorBlit) 325DEF_FUNC(IntRgbxDrawGlyphListAA) 326DEF_FUNC(IntRgbxToIntArgbConvert) 327DEF_FUNC(IntRgbxToIntArgbScaleConvert) 328DEF_FUNC(ThreeByteBgrToIntRgbxConvert) 329DEF_FUNC(ThreeByteBgrToIntRgbxScaleConvert) 330DEF_FUNC(ByteGrayToThreeByteBgrConvert) 331DEF_FUNC(ByteGrayToThreeByteBgrScaleConvert) 332DEF_FUNC(ByteIndexedBmToThreeByteBgrScaleXparOver) 333DEF_FUNC(ByteIndexedBmToThreeByteBgrXparBgCopy) 334DEF_FUNC(ByteIndexedBmToThreeByteBgrXparOver) 335DEF_FUNC(ByteIndexedToThreeByteBgrConvert) 336DEF_FUNC(ByteIndexedToThreeByteBgrScaleConvert) 337DEF_FUNC(IntArgbBmToThreeByteBgrScaleXparOver) 338DEF_FUNC(IntArgbBmToThreeByteBgrXparBgCopy) 339DEF_FUNC(IntArgbBmToThreeByteBgrXparOver) 340DEF_FUNC(IntArgbToThreeByteBgrAlphaMaskBlit) 341DEF_FUNC(IntArgbToThreeByteBgrConvert) 342DEF_FUNC(IntArgbToThreeByteBgrScaleConvert) 343DEF_FUNC(IntArgbToThreeByteBgrSrcOverMaskBlit) 344DEF_FUNC(IntArgbToThreeByteBgrXorBlit) 345DEF_FUNC(IntRgbToThreeByteBgrAlphaMaskBlit) 346DEF_FUNC(ThreeByteBgrAlphaMaskFill) 347DEF_FUNC(ThreeByteBgrDrawGlyphListAA) 348DEF_FUNC(ThreeByteBgrSrcMaskFill) 349DEF_FUNC(ThreeByteBgrSrcOverMaskFill) 350DEF_FUNC(ThreeByteBgrToIntArgbConvert) 351DEF_FUNC(ThreeByteBgrToIntArgbScaleConvert) 352DEF_FUNC(ByteGrayToIndex8GrayConvert) 353DEF_FUNC(ByteGrayToIndex8GrayScaleConvert) 354DEF_FUNC(ByteIndexedBmToIndex8GrayXparBgCopy) 355DEF_FUNC(ByteIndexedBmToIndex8GrayXparOver) 356DEF_FUNC(ByteIndexedToIndex8GrayConvert) 357DEF_FUNC(ByteIndexedToIndex8GrayScaleConvert) 358DEF_FUNC(Index12GrayToIndex8GrayConvert) 359DEF_FUNC(Index12GrayToIndex8GrayScaleConvert) 360DEF_FUNC(Index8GrayAlphaMaskFill) 361DEF_FUNC(Index8GrayDrawGlyphListAA) 362DEF_FUNC(Index8GraySrcOverMaskFill) 363DEF_FUNC(Index8GrayToIndex8GrayConvert) 364DEF_FUNC(Index8GrayToIndex8GrayScaleConvert) 365DEF_FUNC(IntArgbToIndex8GrayAlphaMaskBlit) 366DEF_FUNC(IntArgbToIndex8GrayConvert) 367DEF_FUNC(IntArgbToIndex8GrayScaleConvert) 368DEF_FUNC(IntArgbToIndex8GraySrcOverMaskBlit) 369DEF_FUNC(IntArgbToIndex8GrayXorBlit) 370DEF_FUNC(IntRgbToIndex8GrayAlphaMaskBlit) 371DEF_FUNC(ThreeByteBgrToIndex8GrayConvert) 372DEF_FUNC(ThreeByteBgrToIndex8GrayScaleConvert) 373DEF_FUNC(UshortGrayToIndex8GrayScaleConvert) 374DEF_FUNC(ByteGrayToIndex12GrayConvert) 375DEF_FUNC(ByteGrayToIndex12GrayScaleConvert) 376DEF_FUNC(ByteIndexedBmToIndex12GrayXparBgCopy) 377DEF_FUNC(ByteIndexedBmToIndex12GrayXparOver) 378DEF_FUNC(ByteIndexedToIndex12GrayConvert) 379DEF_FUNC(ByteIndexedToIndex12GrayScaleConvert) 380DEF_FUNC(Index12GrayAlphaMaskFill) 381DEF_FUNC(Index12GrayDrawGlyphListAA) 382DEF_FUNC(Index12GraySrcOverMaskFill) 383DEF_FUNC(Index12GrayToIndex12GrayConvert) 384DEF_FUNC(Index12GrayToIndex12GrayScaleConvert) 385DEF_FUNC(Index12GrayToIntArgbScaleConvert) 386DEF_FUNC(Index8GrayToIndex12GrayConvert) 387DEF_FUNC(Index8GrayToIndex12GrayScaleConvert) 388DEF_FUNC(IntArgbToIndex12GrayAlphaMaskBlit) 389DEF_FUNC(IntArgbToIndex12GrayConvert) 390DEF_FUNC(IntArgbToIndex12GrayScaleConvert) 391DEF_FUNC(IntArgbToIndex12GraySrcOverMaskBlit) 392DEF_FUNC(IntArgbToIndex12GrayXorBlit) 393DEF_FUNC(IntRgbToIndex12GrayAlphaMaskBlit) 394DEF_FUNC(ThreeByteBgrToIndex12GrayConvert) 395DEF_FUNC(ThreeByteBgrToIndex12GrayScaleConvert) 396DEF_FUNC(UshortGrayToIndex12GrayScaleConvert) 397DEF_FUNC(ByteBinary1BitAlphaMaskFill) 398DEF_FUNC(ByteBinary1BitDrawGlyphList) 399DEF_FUNC(ByteBinary1BitDrawGlyphListAA) 400DEF_FUNC(ByteBinary1BitDrawGlyphListXor) 401DEF_FUNC(ByteBinary1BitSetLine) 402DEF_FUNC(ByteBinary1BitSetRect) 403DEF_FUNC(ByteBinary1BitSetSpans) 404DEF_FUNC(ByteBinary1BitToByteBinary1BitConvert) 405DEF_FUNC(ByteBinary1BitToIntArgbAlphaMaskBlit) 406DEF_FUNC(ByteBinary1BitToIntArgbConvert) 407DEF_FUNC(ByteBinary1BitXorLine) 408DEF_FUNC(ByteBinary1BitXorRect) 409DEF_FUNC(ByteBinary1BitXorSpans) 410DEF_FUNC(IntArgbToByteBinary1BitAlphaMaskBlit) 411DEF_FUNC(IntArgbToByteBinary1BitConvert) 412DEF_FUNC(IntArgbToByteBinary1BitXorBlit) 413DEF_FUNC(ByteBinary2BitAlphaMaskFill) 414DEF_FUNC(ByteBinary2BitDrawGlyphList) 415DEF_FUNC(ByteBinary2BitDrawGlyphListAA) 416DEF_FUNC(ByteBinary2BitDrawGlyphListXor) 417DEF_FUNC(ByteBinary2BitSetLine) 418DEF_FUNC(ByteBinary2BitSetRect) 419DEF_FUNC(ByteBinary2BitSetSpans) 420DEF_FUNC(ByteBinary2BitToByteBinary2BitConvert) 421DEF_FUNC(ByteBinary2BitToIntArgbAlphaMaskBlit) 422DEF_FUNC(ByteBinary2BitToIntArgbConvert) 423DEF_FUNC(ByteBinary2BitXorLine) 424DEF_FUNC(ByteBinary2BitXorRect) 425DEF_FUNC(ByteBinary2BitXorSpans) 426DEF_FUNC(IntArgbToByteBinary2BitAlphaMaskBlit) 427DEF_FUNC(IntArgbToByteBinary2BitConvert) 428DEF_FUNC(IntArgbToByteBinary2BitXorBlit) 429DEF_FUNC(ByteBinary4BitAlphaMaskFill) 430DEF_FUNC(ByteBinary4BitDrawGlyphList) 431DEF_FUNC(ByteBinary4BitDrawGlyphListAA) 432DEF_FUNC(ByteBinary4BitDrawGlyphListXor) 433DEF_FUNC(ByteBinary4BitSetLine) 434DEF_FUNC(ByteBinary4BitSetRect) 435DEF_FUNC(ByteBinary4BitSetSpans) 436DEF_FUNC(ByteBinary4BitToByteBinary4BitConvert) 437DEF_FUNC(ByteBinary4BitToIntArgbAlphaMaskBlit) 438DEF_FUNC(ByteBinary4BitToIntArgbConvert) 439DEF_FUNC(ByteBinary4BitXorLine) 440DEF_FUNC(ByteBinary4BitXorRect) 441DEF_FUNC(ByteBinary4BitXorSpans) 442DEF_FUNC(IntArgbToByteBinary4BitAlphaMaskBlit) 443DEF_FUNC(IntArgbToByteBinary4BitConvert) 444DEF_FUNC(IntArgbToByteBinary4BitXorBlit) 445DEF_FUNC(ByteGrayToUshort555RgbConvert) 446DEF_FUNC(ByteGrayToUshort555RgbScaleConvert) 447DEF_FUNC(ByteIndexedBmToUshort555RgbScaleXparOver) 448DEF_FUNC(ByteIndexedBmToUshort555RgbXparBgCopy) 449DEF_FUNC(ByteIndexedBmToUshort555RgbXparOver) 450DEF_FUNC(ByteIndexedToUshort555RgbConvert) 451DEF_FUNC(ByteIndexedToUshort555RgbScaleConvert) 452DEF_FUNC(IntArgbBmToUshort555RgbScaleXparOver) 453DEF_FUNC(IntArgbBmToUshort555RgbXparBgCopy) 454DEF_FUNC(IntArgbBmToUshort555RgbXparOver) 455DEF_FUNC(IntArgbToUshort555RgbAlphaMaskBlit) 456DEF_FUNC(IntArgbToUshort555RgbConvert) 457DEF_FUNC(IntArgbToUshort555RgbScaleConvert) 458DEF_FUNC(IntArgbToUshort555RgbSrcOverMaskBlit) 459DEF_FUNC(IntArgbToUshort555RgbXorBlit) 460DEF_FUNC(IntRgbToUshort555RgbAlphaMaskBlit) 461DEF_FUNC(ThreeByteBgrToUshort555RgbConvert) 462DEF_FUNC(ThreeByteBgrToUshort555RgbScaleConvert) 463DEF_FUNC(Ushort555RgbAlphaMaskFill) 464DEF_FUNC(Ushort555RgbDrawGlyphListAA) 465DEF_FUNC(Ushort555RgbSrcMaskFill) 466DEF_FUNC(Ushort555RgbSrcOverMaskFill) 467DEF_FUNC(Ushort555RgbToIntArgbConvert) 468DEF_FUNC(Ushort555RgbToIntArgbScaleConvert) 469DEF_FUNC(ByteGrayToUshort555RgbxConvert) 470DEF_FUNC(ByteGrayToUshort555RgbxScaleConvert) 471DEF_FUNC(ByteIndexedBmToUshort555RgbxScaleXparOver) 472DEF_FUNC(ByteIndexedBmToUshort555RgbxXparBgCopy) 473DEF_FUNC(ByteIndexedBmToUshort555RgbxXparOver) 474DEF_FUNC(ByteIndexedToUshort555RgbxConvert) 475DEF_FUNC(ByteIndexedToUshort555RgbxScaleConvert) 476DEF_FUNC(IntArgbBmToUshort555RgbxScaleXparOver) 477DEF_FUNC(IntArgbToUshort555RgbxConvert) 478DEF_FUNC(IntArgbToUshort555RgbxScaleConvert) 479DEF_FUNC(IntArgbToUshort555RgbxXorBlit) 480DEF_FUNC(ThreeByteBgrToUshort555RgbxConvert) 481DEF_FUNC(ThreeByteBgrToUshort555RgbxScaleConvert) 482DEF_FUNC(Ushort555RgbxDrawGlyphListAA) 483DEF_FUNC(Ushort555RgbxToIntArgbConvert) 484DEF_FUNC(Ushort555RgbxToIntArgbScaleConvert) 485DEF_FUNC(ByteGrayToUshort565RgbConvert) 486DEF_FUNC(ByteGrayToUshort565RgbScaleConvert) 487DEF_FUNC(ByteIndexedBmToUshort565RgbScaleXparOver) 488DEF_FUNC(ByteIndexedBmToUshort565RgbXparBgCopy) 489DEF_FUNC(ByteIndexedBmToUshort565RgbXparOver) 490DEF_FUNC(ByteIndexedToUshort565RgbConvert) 491DEF_FUNC(ByteIndexedToUshort565RgbScaleConvert) 492DEF_FUNC(IntArgbBmToUshort565RgbScaleXparOver) 493DEF_FUNC(IntArgbBmToUshort565RgbXparBgCopy) 494DEF_FUNC(IntArgbBmToUshort565RgbXparOver) 495DEF_FUNC(IntArgbToUshort565RgbAlphaMaskBlit) 496DEF_FUNC(IntArgbToUshort565RgbConvert) 497DEF_FUNC(IntArgbToUshort565RgbScaleConvert) 498DEF_FUNC(IntArgbToUshort565RgbSrcOverMaskBlit) 499DEF_FUNC(IntArgbToUshort565RgbXorBlit) 500DEF_FUNC(IntRgbToUshort565RgbAlphaMaskBlit) 501DEF_FUNC(ThreeByteBgrToUshort565RgbConvert) 502DEF_FUNC(ThreeByteBgrToUshort565RgbScaleConvert) 503DEF_FUNC(Ushort565RgbAlphaMaskFill) 504DEF_FUNC(Ushort565RgbDrawGlyphListAA) 505DEF_FUNC(Ushort565RgbSrcMaskFill) 506DEF_FUNC(Ushort565RgbSrcOverMaskFill) 507DEF_FUNC(Ushort565RgbToIntArgbConvert) 508DEF_FUNC(Ushort565RgbToIntArgbScaleConvert) 509 510/***************************************************************/ 511 512static AnyFunc_pair vis_func_pair_array[] = { 513 ADD_FUNC(AnyByteDrawGlyphList), 514 ADD_FUNC(AnyByteDrawGlyphListXor), 515 ADD_FUNC(AnyByteIsomorphicCopy), 516 ADD_FUNC(AnyByteIsomorphicScaleCopy), 517 ADD_FUNC(AnyByteIsomorphicXorCopy), 518 ADD_FUNC(AnyByteSetLine), 519 ADD_FUNC(AnyByteSetRect), 520 ADD_FUNC(AnyByteSetSpans), 521 ADD_FUNC(AnyByteSetParallelogram), 522 ADD_FUNC(AnyByteXorLine), 523 ADD_FUNC(AnyByteXorRect), 524 ADD_FUNC(AnyByteXorSpans), 525 ADD_FUNC(AnyShortDrawGlyphList), 526 ADD_FUNC(AnyShortDrawGlyphListXor), 527 ADD_FUNC(AnyShortIsomorphicCopy), 528 ADD_FUNC(AnyShortIsomorphicScaleCopy), 529 ADD_FUNC(AnyShortIsomorphicXorCopy), 530 ADD_FUNC(AnyShortSetLine), 531 ADD_FUNC(AnyShortSetRect), 532 ADD_FUNC(AnyShortSetSpans), 533 ADD_FUNC(AnyShortSetParallelogram), 534 ADD_FUNC(AnyShortXorLine), 535 ADD_FUNC(AnyShortXorRect), 536 ADD_FUNC(AnyShortXorSpans), 537 ADD_FUNC(Any3ByteIsomorphicCopy), 538 ADD_FUNC(Any3ByteIsomorphicScaleCopy), 539 ADD_FUNC(Any3ByteIsomorphicXorCopy), 540 ADD_FUNC(Any3ByteSetLine), 541 ADD_FUNC(Any3ByteSetRect), 542 ADD_FUNC(Any3ByteSetSpans), 543 ADD_FUNC(Any3ByteSetParallelogram), 544 ADD_FUNC(Any3ByteXorLine), 545 ADD_FUNC(Any3ByteXorRect), 546 ADD_FUNC(Any3ByteXorSpans), 547 ADD_FUNC(Any4ByteDrawGlyphList), 548 ADD_FUNC(Any4ByteDrawGlyphListXor), 549 ADD_FUNC(Any4ByteIsomorphicCopy), 550 ADD_FUNC(Any4ByteIsomorphicScaleCopy), 551 ADD_FUNC(Any4ByteIsomorphicXorCopy), 552 ADD_FUNC(Any4ByteSetLine), 553 ADD_FUNC(Any4ByteSetRect), 554 ADD_FUNC(Any4ByteSetSpans), 555 ADD_FUNC(Any4ByteSetParallelogram), 556 ADD_FUNC(Any4ByteXorLine), 557 ADD_FUNC(Any4ByteXorRect), 558 ADD_FUNC(Any4ByteXorSpans), 559 ADD_FUNC(AnyIntDrawGlyphList), 560 ADD_FUNC(AnyIntDrawGlyphListXor), 561 ADD_FUNC(AnyIntIsomorphicCopy), 562 ADD_FUNC(AnyIntIsomorphicScaleCopy), 563 ADD_FUNC(AnyIntIsomorphicXorCopy), 564 ADD_FUNC(AnyIntSetLine), 565 ADD_FUNC(AnyIntSetRect), 566 ADD_FUNC(AnyIntSetSpans), 567 ADD_FUNC(AnyIntSetParallelogram), 568 ADD_FUNC(AnyIntXorLine), 569 ADD_FUNC(AnyIntXorRect), 570 ADD_FUNC(AnyIntXorSpans), 571 ADD_FUNC(ByteGrayAlphaMaskFill), 572 ADD_FUNC(ByteGrayDrawGlyphListAA), 573 ADD_FUNC(ByteGraySrcMaskFill), 574 ADD_FUNC(ByteGraySrcOverMaskFill), 575 ADD_FUNC(ByteGrayToIntArgbConvert), 576 ADD_FUNC(ByteGrayToIntArgbScaleConvert), 577 ADD_FUNC(ByteIndexedBmToByteGrayScaleXparOver), 578 ADD_FUNC(ByteIndexedBmToByteGrayXparBgCopy), 579 ADD_FUNC(ByteIndexedBmToByteGrayXparOver), 580 ADD_FUNC(ByteIndexedToByteGrayConvert), 581 ADD_FUNC(ByteIndexedToByteGrayScaleConvert), 582 ADD_FUNC(Index12GrayToByteGrayConvert), 583 ADD_FUNC(Index12GrayToByteGrayScaleConvert), 584 ADD_FUNC(Index8GrayToByteGrayConvert), 585 ADD_FUNC(Index8GrayToByteGrayScaleConvert), 586 ADD_FUNC(IntArgbBmToByteGrayScaleXparOver), 587 ADD_FUNC(IntArgbBmToByteGrayXparBgCopy), 588 ADD_FUNC(IntArgbBmToByteGrayXparOver), 589 ADD_FUNC(IntArgbToByteGrayAlphaMaskBlit), 590 ADD_FUNC(IntArgbToByteGrayConvert), 591 ADD_FUNC(IntArgbToByteGrayScaleConvert), 592 ADD_FUNC(IntArgbToByteGraySrcOverMaskBlit), 593 ADD_FUNC(IntArgbToByteGrayXorBlit), 594 ADD_FUNC(IntRgbToByteGrayAlphaMaskBlit), 595 ADD_FUNC(ThreeByteBgrToByteGrayConvert), 596 ADD_FUNC(ThreeByteBgrToByteGrayScaleConvert), 597 ADD_FUNC(UshortGrayToByteGrayConvert), 598 ADD_FUNC(UshortGrayToByteGrayScaleConvert), 599 ADD_FUNC(ByteGrayToUshortGrayConvert), 600 ADD_FUNC(ByteGrayToUshortGrayScaleConvert), 601 ADD_FUNC(ByteIndexedBmToUshortGrayScaleXparOver), 602 ADD_FUNC(ByteIndexedBmToUshortGrayXparBgCopy), 603 ADD_FUNC(ByteIndexedBmToUshortGrayXparOver), 604 ADD_FUNC(ByteIndexedToUshortGrayConvert), 605 ADD_FUNC(ByteIndexedToUshortGrayScaleConvert), 606 ADD_FUNC(IntArgbBmToUshortGrayScaleXparOver), 607 ADD_FUNC(IntArgbToUshortGrayConvert), 608 ADD_FUNC(IntArgbToUshortGrayScaleConvert), 609 ADD_FUNC(ThreeByteBgrToUshortGrayConvert), 610 ADD_FUNC(ThreeByteBgrToUshortGrayScaleConvert), 611 ADD_FUNC(UshortGrayToIntArgbConvert), 612 ADD_FUNC(UshortGrayToIntArgbScaleConvert), 613 ADD_FUNC(ByteGrayToByteIndexedConvert), 614 ADD_FUNC(ByteGrayToByteIndexedScaleConvert), 615 ADD_FUNC(ByteIndexedBmToByteIndexedScaleXparOver), 616 ADD_FUNC(ByteIndexedBmToByteIndexedXparBgCopy), 617 ADD_FUNC(ByteIndexedBmToByteIndexedXparOver), 618 ADD_FUNC(ByteIndexedToByteIndexedConvert), 619 ADD_FUNC(ByteIndexedToByteIndexedScaleConvert), 620 ADD_FUNC(Index12GrayToByteIndexedConvert), 621 ADD_FUNC(Index12GrayToByteIndexedScaleConvert), 622 ADD_FUNC(IntArgbBmToByteIndexedScaleXparOver), 623 ADD_FUNC(IntArgbBmToByteIndexedXparBgCopy), 624 ADD_FUNC(IntArgbBmToByteIndexedXparOver), 625 ADD_FUNC(IntArgbToByteIndexedConvert), 626 ADD_FUNC(IntArgbToByteIndexedScaleConvert), 627 ADD_FUNC(IntArgbToByteIndexedXorBlit), 628 ADD_FUNC(ThreeByteBgrToByteIndexedConvert), 629 ADD_FUNC(ThreeByteBgrToByteIndexedScaleConvert), 630 ADD_FUNC(ByteGrayToFourByteAbgrConvert), 631 ADD_FUNC(ByteGrayToFourByteAbgrScaleConvert), 632 ADD_FUNC(ByteIndexedBmToFourByteAbgrScaleXparOver), 633 ADD_FUNC(ByteIndexedBmToFourByteAbgrXparBgCopy), 634 ADD_FUNC(ByteIndexedBmToFourByteAbgrXparOver), 635 ADD_FUNC(ByteIndexedToFourByteAbgrConvert), 636 ADD_FUNC(ByteIndexedToFourByteAbgrScaleConvert), 637 ADD_FUNC(FourByteAbgrAlphaMaskFill), 638 ADD_FUNC(FourByteAbgrDrawGlyphListAA), 639 ADD_FUNC(FourByteAbgrSrcMaskFill), 640 ADD_FUNC(FourByteAbgrSrcOverMaskFill), 641 ADD_FUNC(FourByteAbgrToIntArgbConvert), 642 ADD_FUNC(FourByteAbgrToIntArgbScaleConvert), 643 ADD_FUNC(IntArgbBmToFourByteAbgrScaleXparOver), 644 ADD_FUNC(IntArgbToFourByteAbgrAlphaMaskBlit), 645 ADD_FUNC(IntArgbToFourByteAbgrConvert), 646 ADD_FUNC(IntArgbToFourByteAbgrScaleConvert), 647 ADD_FUNC(IntArgbToFourByteAbgrSrcOverMaskBlit), 648 ADD_FUNC(IntArgbToFourByteAbgrXorBlit), 649 ADD_FUNC(IntRgbToFourByteAbgrAlphaMaskBlit), 650 ADD_FUNC(IntRgbToFourByteAbgrConvert), 651 ADD_FUNC(IntRgbToFourByteAbgrScaleConvert), 652 ADD_FUNC(ThreeByteBgrToFourByteAbgrConvert), 653 ADD_FUNC(ThreeByteBgrToFourByteAbgrScaleConvert), 654 ADD_FUNC(ByteGrayToFourByteAbgrPreConvert), 655 ADD_FUNC(ByteGrayToFourByteAbgrPreScaleConvert), 656 ADD_FUNC(ByteIndexedBmToFourByteAbgrPreScaleXparOver), 657 ADD_FUNC(ByteIndexedBmToFourByteAbgrPreXparBgCopy), 658 ADD_FUNC(ByteIndexedBmToFourByteAbgrPreXparOver), 659 ADD_FUNC(ByteIndexedToFourByteAbgrPreConvert), 660 ADD_FUNC(ByteIndexedToFourByteAbgrPreScaleConvert), 661 ADD_FUNC(FourByteAbgrPreAlphaMaskFill), 662 ADD_FUNC(FourByteAbgrPreDrawGlyphListAA), 663 ADD_FUNC(FourByteAbgrPreSrcMaskFill), 664 ADD_FUNC(FourByteAbgrPreSrcOverMaskFill), 665 ADD_FUNC(FourByteAbgrPreToIntArgbConvert), 666 ADD_FUNC(FourByteAbgrPreToIntArgbScaleConvert), 667 ADD_FUNC(IntArgbBmToFourByteAbgrPreScaleXparOver), 668 ADD_FUNC(IntArgbToFourByteAbgrPreAlphaMaskBlit), 669 ADD_FUNC(IntArgbToFourByteAbgrPreConvert), 670 ADD_FUNC(IntArgbToFourByteAbgrPreScaleConvert), 671 ADD_FUNC(IntArgbToFourByteAbgrPreSrcOverMaskBlit), 672 ADD_FUNC(IntArgbToFourByteAbgrPreXorBlit), 673 ADD_FUNC(IntRgbToFourByteAbgrPreAlphaMaskBlit), 674 ADD_FUNC(IntRgbToFourByteAbgrPreConvert), 675 ADD_FUNC(IntRgbToFourByteAbgrPreScaleConvert), 676 ADD_FUNC(ThreeByteBgrToFourByteAbgrPreConvert), 677 ADD_FUNC(ThreeByteBgrToFourByteAbgrPreScaleConvert), 678 ADD_FUNC(ByteIndexedBmToIntArgbScaleXparOver), 679 ADD_FUNC(ByteIndexedBmToIntArgbXparBgCopy), 680 ADD_FUNC(ByteIndexedBmToIntArgbXparOver), 681 ADD_FUNC(ByteIndexedToIntArgbConvert), 682 ADD_FUNC(ByteIndexedToIntArgbScaleConvert), 683 ADD_FUNC(Index12GrayToIntArgbConvert), 684 ADD_FUNC(IntArgbAlphaMaskFill), 685 ADD_FUNC(IntArgbBmToIntArgbScaleXparOver), 686 ADD_FUNC(IntArgbDrawGlyphListAA), 687 ADD_FUNC(IntArgbSrcMaskFill), 688 ADD_FUNC(IntArgbSrcOverMaskFill), 689 ADD_FUNC(IntArgbToIntArgbAlphaMaskBlit), 690 ADD_FUNC(IntArgbToIntArgbSrcOverMaskBlit), 691 ADD_FUNC(IntArgbToIntArgbXorBlit), 692 ADD_FUNC(IntRgbToIntArgbAlphaMaskBlit), 693 ADD_FUNC(ByteIndexedBmToIntArgbBmScaleXparOver), 694 ADD_FUNC(ByteIndexedBmToIntArgbBmXparBgCopy), 695 ADD_FUNC(ByteIndexedBmToIntArgbBmXparOver), 696 ADD_FUNC(ByteIndexedToIntArgbBmConvert), 697 ADD_FUNC(ByteIndexedToIntArgbBmScaleConvert), 698 ADD_FUNC(IntArgbBmDrawGlyphListAA), 699 ADD_FUNC(IntArgbBmToIntArgbConvert), 700 ADD_FUNC(IntArgbToIntArgbBmConvert), 701 ADD_FUNC(IntArgbToIntArgbBmScaleConvert), 702 ADD_FUNC(IntArgbToIntArgbBmXorBlit), 703 ADD_FUNC(ByteGrayToIntArgbPreConvert), 704 ADD_FUNC(ByteGrayToIntArgbPreScaleConvert), 705 ADD_FUNC(ByteIndexedBmToIntArgbPreScaleXparOver), 706 ADD_FUNC(ByteIndexedBmToIntArgbPreXparBgCopy), 707 ADD_FUNC(ByteIndexedBmToIntArgbPreXparOver), 708 ADD_FUNC(ByteIndexedToIntArgbPreConvert), 709 ADD_FUNC(ByteIndexedToIntArgbPreScaleConvert), 710 ADD_FUNC(IntArgbPreAlphaMaskFill), 711 ADD_FUNC(IntArgbPreDrawGlyphListAA), 712 ADD_FUNC(IntArgbPreSrcMaskFill), 713 ADD_FUNC(IntArgbPreSrcOverMaskFill), 714 ADD_FUNC(IntArgbPreToIntArgbConvert), 715 ADD_FUNC(IntArgbPreToIntArgbScaleConvert), 716 ADD_FUNC(IntArgbToIntArgbPreAlphaMaskBlit), 717 ADD_FUNC(IntArgbToIntArgbPreConvert), 718 ADD_FUNC(IntArgbToIntArgbPreScaleConvert), 719 ADD_FUNC(IntArgbToIntArgbPreSrcOverMaskBlit), 720 ADD_FUNC(IntArgbToIntArgbPreXorBlit), 721 ADD_FUNC(IntRgbToIntArgbPreAlphaMaskBlit), 722 ADD_FUNC(IntRgbToIntArgbPreConvert), 723 ADD_FUNC(IntRgbToIntArgbPreScaleConvert), 724 ADD_FUNC(ThreeByteBgrToIntArgbPreConvert), 725 ADD_FUNC(ThreeByteBgrToIntArgbPreScaleConvert), 726 ADD_FUNC(ByteIndexedBmToIntBgrScaleXparOver), 727 ADD_FUNC(ByteIndexedBmToIntBgrXparBgCopy), 728 ADD_FUNC(ByteIndexedBmToIntBgrXparOver), 729 ADD_FUNC(ByteIndexedToIntBgrConvert), 730 ADD_FUNC(ByteIndexedToIntBgrScaleConvert), 731 ADD_FUNC(IntArgbBmToIntBgrScaleXparOver), 732 ADD_FUNC(IntArgbBmToIntBgrXparBgCopy), 733 ADD_FUNC(IntArgbBmToIntBgrXparOver), 734 ADD_FUNC(IntArgbToIntBgrAlphaMaskBlit), 735 ADD_FUNC(IntArgbToIntBgrConvert), 736 ADD_FUNC(IntArgbToIntBgrScaleConvert), 737 ADD_FUNC(IntArgbToIntBgrSrcOverMaskBlit), 738 ADD_FUNC(IntArgbToIntBgrXorBlit), 739 ADD_FUNC(IntBgrAlphaMaskFill), 740 ADD_FUNC(IntBgrDrawGlyphListAA), 741 ADD_FUNC(IntBgrSrcMaskFill), 742 ADD_FUNC(IntBgrSrcOverMaskFill), 743 ADD_FUNC(IntBgrToIntArgbConvert), 744 ADD_FUNC(IntBgrToIntArgbScaleConvert), 745 ADD_FUNC(IntBgrToIntBgrAlphaMaskBlit), 746 ADD_FUNC(IntRgbToIntBgrAlphaMaskBlit), 747 ADD_FUNC(ThreeByteBgrToIntBgrConvert), 748 ADD_FUNC(ThreeByteBgrToIntBgrScaleConvert), 749 ADD_FUNC(ByteGrayToIntRgbConvert), 750 ADD_FUNC(ByteGrayToIntRgbScaleConvert), 751 ADD_FUNC(IntArgbBmToIntRgbXparBgCopy), 752 ADD_FUNC(IntArgbBmToIntRgbXparOver), 753 ADD_FUNC(IntArgbToIntRgbAlphaMaskBlit), 754 ADD_FUNC(IntArgbToIntRgbSrcOverMaskBlit), 755 ADD_FUNC(IntArgbToIntRgbXorBlit), 756 ADD_FUNC(IntRgbAlphaMaskFill), 757 ADD_FUNC(IntRgbDrawGlyphListAA), 758 ADD_FUNC(IntRgbSrcMaskFill), 759 ADD_FUNC(IntRgbSrcOverMaskFill), 760 ADD_FUNC(IntRgbToIntArgbConvert), 761 ADD_FUNC(IntRgbToIntArgbScaleConvert), 762 ADD_FUNC(IntRgbToIntRgbAlphaMaskBlit), 763 ADD_FUNC(ThreeByteBgrToIntRgbConvert), 764 ADD_FUNC(ThreeByteBgrToIntRgbScaleConvert), 765 ADD_FUNC(ByteGrayToIntRgbxConvert), 766 ADD_FUNC(ByteGrayToIntRgbxScaleConvert), 767 ADD_FUNC(ByteIndexedBmToIntRgbxScaleXparOver), 768 ADD_FUNC(ByteIndexedBmToIntRgbxXparBgCopy), 769 ADD_FUNC(ByteIndexedBmToIntRgbxXparOver), 770 ADD_FUNC(ByteIndexedToIntRgbxConvert), 771 ADD_FUNC(ByteIndexedToIntRgbxScaleConvert), 772 ADD_FUNC(IntArgbBmToIntRgbxScaleXparOver), 773 ADD_FUNC(IntArgbToIntRgbxConvert), 774 ADD_FUNC(IntArgbToIntRgbxScaleConvert), 775 ADD_FUNC(IntArgbToIntRgbxXorBlit), 776 ADD_FUNC(IntRgbxDrawGlyphListAA), 777 ADD_FUNC(IntRgbxToIntArgbConvert), 778 ADD_FUNC(IntRgbxToIntArgbScaleConvert), 779 ADD_FUNC(ThreeByteBgrToIntRgbxConvert), 780 ADD_FUNC(ThreeByteBgrToIntRgbxScaleConvert), 781 ADD_FUNC(ThreeByteBgrAlphaMaskFill), 782 ADD_FUNC(ThreeByteBgrSrcMaskFill), 783 ADD_FUNC(ThreeByteBgrSrcOverMaskFill), 784 ADD_FUNC(ThreeByteBgrToIntArgbConvert), 785 ADD_FUNC(ThreeByteBgrToIntArgbScaleConvert), 786}; 787 788/***************************************************************/ 789 790#define NUM_VIS_FUNCS sizeof(vis_func_pair_array)/sizeof(AnyFunc_pair) 791 792/***************************************************************/ 793 794#define HASH_SIZE 1024 /* must be power of 2 and > number of functions */ 795#define PTR_SHIFT ((sizeof(void*) == 4) ? 2 : 3) 796#define HASH_FUNC(x) (((jint)(x) >> PTR_SHIFT) & (HASH_SIZE - 1)) 797#define NEXT_INDEX(j) ((j + 1) & (HASH_SIZE - 1)) 798 799static AnyFunc* hash_table[HASH_SIZE]; 800static AnyFunc* hash_table_vis[HASH_SIZE]; 801 802/***************************************************************/ 803 804static int initialized; 805static int usevis = JNI_TRUE; 806 807#if defined(__linux__) || defined(MACOSX) 808# define ULTRA_CHIP "sparc64" 809#else 810# define ULTRA_CHIP "sun4u" 811#endif 812 813extern TransformInterpFunc *pBilinearFunc; 814extern TransformInterpFunc *pBicubicFunc; 815extern TransformInterpFunc vis_BilinearBlend; 816extern TransformInterpFunc vis_BicubicBlend; 817 818/* 819 * This function returns a pointer to the VIS accelerated version 820 * of the indicated C function if it exists and if the conditions 821 * are correct to use the VIS functions. 822 */ 823AnyFunc* MapAccelFunction(AnyFunc *func_c) 824{ 825 jint i, j; 826 827 if (!initialized) { 828 struct utsname name; 829 830 /* 831 * Only use the vis loops if the environment variable is set. 832 * Find out the machine name. If it is an SUN ultra, we 833 * can use the vis library 834 */ 835 if (uname(&name) < 0 || strcmp(name.machine, ULTRA_CHIP) != 0) { 836 usevis = JNI_FALSE; 837 } else { 838 char *vis_env = getenv("J2D_USE_VIS_LOOPS"); 839 if (vis_env != 0) { 840 switch (*vis_env) { 841 case 'T': 842 fprintf(stderr, "VIS loops enabled\n"); 843 case 't': 844 usevis = JNI_TRUE; 845 break; 846 847 case 'F': 848 fprintf(stderr, "VIS loops disabled\n"); 849 case 'f': 850 usevis = JNI_FALSE; 851 break; 852 853 default: 854 fprintf(stderr, "VIS loops %s by default\n", 855 usevis ? "enabled" : "disabled"); 856 break; 857 } 858 } 859 } 860 initialized = 1; 861 if (usevis) { 862 /* fill hash table */ 863 memset(hash_table, 0, sizeof(hash_table)); 864 for (i = 0; i < NUM_VIS_FUNCS; i++) { 865 AnyFunc* func = vis_func_pair_array[i].func_c; 866 j = HASH_FUNC(func); 867 while (hash_table[j] != NULL) { 868 j = NEXT_INDEX(j); 869 } 870 hash_table[j] = func; 871 hash_table_vis[j] = vis_func_pair_array[i].func_vis; 872 } 873 pBilinearFunc = vis_BilinearBlend; 874 pBicubicFunc = vis_BicubicBlend; 875 } 876 } 877 if (!usevis) { 878 return func_c; 879 } 880 881 j = HASH_FUNC(func_c); 882 while (hash_table[j] != NULL) { 883 if (hash_table[j] == func_c) { 884 return hash_table_vis[j]; 885 } 886 j = NEXT_INDEX(j); 887 } 888 889 return func_c; 890} 891 892/***************************************************************/ 893