1 | /* |
2 | * Copyright (c) 2000, 2005, 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 | #ifndef ByteBinary2Bit_h_Included |
27 | #define ByteBinary2Bit_h_Included |
28 | |
29 | #include "AnyByteBinary.h" |
30 | |
31 | /* |
32 | * This file contains macro and type definitions used by the macros in |
33 | * LoopMacros.h to manipulate a surface of type "ByteBinary2Bit". |
34 | */ |
35 | |
36 | typedef jubyte ByteBinary2BitPixelType; |
37 | typedef jubyte ByteBinary2BitDataType; |
38 | |
39 | #define ByteBinary2BitPixelStride 0 |
40 | #define ByteBinary2BitPixelsPerByte 4 |
41 | #define ByteBinary2BitBitsPerPixel 2 |
42 | #define ByteBinary2BitMaxBitOffset 6 |
43 | #define ByteBinary2BitPixelMask 0x3 |
44 | |
45 | #define DeclareByteBinary2BitLoadVars DeclareByteBinaryLoadVars |
46 | #define DeclareByteBinary2BitStoreVars DeclareByteBinaryStoreVars |
47 | #define SetByteBinary2BitStoreVarsYPos SetByteBinaryStoreVarsYPos |
48 | #define SetByteBinary2BitStoreVarsXPos SetByteBinaryStoreVarsXPos |
49 | #define InitByteBinary2BitLoadVars InitByteBinaryLoadVars |
50 | #define InitByteBinary2BitStoreVarsY InitByteBinaryStoreVarsY |
51 | #define InitByteBinary2BitStoreVarsX InitByteBinaryStoreVarsX |
52 | #define NextByteBinary2BitStoreVarsY NextByteBinaryStoreVarsY |
53 | #define NextByteBinary2BitStoreVarsX NextByteBinaryStoreVarsX |
54 | |
55 | #define DeclareByteBinary2BitInitialLoadVars(pRasInfo, pRas, PREFIX, x) \ |
56 | DeclareByteBinaryInitialLoadVars(ByteBinary2Bit, pRasInfo, pRas, PREFIX, x) |
57 | |
58 | #define InitialLoadByteBinary2Bit(pRas, PREFIX) \ |
59 | InitialLoadByteBinary(ByteBinary2Bit, pRas, PREFIX) |
60 | |
61 | #define ShiftBitsByteBinary2Bit(PREFIX) \ |
62 | ShiftBitsByteBinary(ByteBinary2Bit, PREFIX) |
63 | |
64 | #define FinalStoreByteBinary2Bit(pRas, PREFIX) \ |
65 | FinalStoreByteBinary(ByteBinary2Bit, pRas, PREFIX) |
66 | |
67 | #define CurrentPixelByteBinary2Bit(PREFIX) \ |
68 | CurrentPixelByteBinary(ByteBinary2Bit, PREFIX) |
69 | |
70 | |
71 | #define StoreByteBinary2BitPixel(pRas, x, pixel) \ |
72 | StoreByteBinaryPixel(ByteBinary2Bit, pRas, x, pixel) |
73 | |
74 | #define StoreByteBinary2BitPixelData(pPix, x, pixel, PREFIX) \ |
75 | StoreByteBinaryPixelData(ByteBinary2Bit, pPix, x, pixel, PREFIX) |
76 | |
77 | #define ByteBinary2BitPixelFromArgb(pixel, rgb, pRasInfo) \ |
78 | ByteBinaryPixelFromArgb(ByteBinary2Bit, pixel, rgb, pRasInfo) |
79 | |
80 | #define XorByteBinary2BitPixelData(pDst, x, PREFIX, srcpixel, xorpixel, mask)\ |
81 | XorByteBinaryPixelData(ByteBinary2Bit, pDst, x, PREFIX, \ |
82 | srcpixel, xorpixel, mask) |
83 | |
84 | |
85 | #define LoadByteBinary2BitTo1IntRgb(pRas, PREFIX, x, rgb) \ |
86 | LoadByteBinaryTo1IntRgb(ByteBinary2Bit, pRas, PREFIX, x, rgb) |
87 | |
88 | #define LoadByteBinary2BitTo1IntArgb(pRas, PREFIX, x, argb) \ |
89 | LoadByteBinaryTo1IntArgb(ByteBinary2Bit, pRas, PREFIX, x, argb) |
90 | |
91 | #define LoadByteBinary2BitTo3ByteRgb(pRas, PREFIX, x, r, g, b) \ |
92 | LoadByteBinaryTo3ByteRgb(ByteBinary2Bit, pRas, PREFIX, x, r, g, b) |
93 | |
94 | #define LoadByteBinary2BitTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \ |
95 | LoadByteBinaryTo4ByteArgb(ByteBinary2Bit, pRas, PREFIX, x, a, r, g, b) |
96 | |
97 | #define StoreByteBinary2BitFrom1IntRgb(pRas, PREFIX, x, rgb) \ |
98 | StoreByteBinaryFrom1IntRgb(ByteBinary2Bit, pRas, PREFIX, x, rgb) |
99 | |
100 | #define StoreByteBinary2BitFrom1IntArgb(pRas, PREFIX, x, argb) \ |
101 | StoreByteBinaryFrom1IntArgb(ByteBinary2Bit, pRas, PREFIX, x, argb) |
102 | |
103 | #define StoreByteBinary2BitFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \ |
104 | StoreByteBinaryFrom3ByteRgb(ByteBinary2Bit, pRas, PREFIX, x, r, g, b) |
105 | |
106 | #define StoreByteBinary2BitFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \ |
107 | StoreByteBinaryFrom4ByteArgb(ByteBinary2Bit, pRas, PREFIX, x, a, r, g, b) |
108 | |
109 | |
110 | #define DeclareByteBinary2BitAlphaLoadData(PREFIX) \ |
111 | DeclareByteBinaryAlphaLoadData(ByteBinary2Bit, PREFIX) |
112 | |
113 | #define InitByteBinary2BitAlphaLoadData(PREFIX, pRasInfo) \ |
114 | InitByteBinaryAlphaLoadData(ByteBinary2Bit, PREFIX, pRasInfo) |
115 | |
116 | #define LoadAlphaFromByteBinary2BitFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \ |
117 | LoadAlphaFromByteBinaryFor4ByteArgb(ByteBinary2Bit, pRas, PREFIX, \ |
118 | COMP_PREFIX) |
119 | |
120 | #define Postload4ByteArgbFromByteBinary2Bit(pRas, PREFIX, COMP_PREFIX) \ |
121 | Postload4ByteArgbFromByteBinary(ByteBinary2Bit, pRas, PREFIX, COMP_PREFIX) |
122 | |
123 | |
124 | #define ByteBinary2BitIsPremultiplied ByteBinaryIsPremultiplied |
125 | |
126 | #define StoreByteBinary2BitFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \ |
127 | StoreByteBinaryFrom4ByteArgbComps(ByteBinary2Bit, pRas, \ |
128 | PREFIX, x, COMP_PREFIX) |
129 | |
130 | #endif /* ByteBinary2Bit_h_Included */ |
131 | |