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 | #include "AnyInt.h" |
27 | #include "IntArgb.h" |
28 | #include "IntArgbBm.h" |
29 | #include "AlphaMacros.h" |
30 | |
31 | #include "IntArgbPre.h" |
32 | #include "IntRgb.h" |
33 | #include "ByteIndexed.h" |
34 | #include "Index12Gray.h" |
35 | |
36 | /* |
37 | * This file declares, registers, and defines the various graphics |
38 | * primitive loops to manipulate surfaces of type "IntArgb". |
39 | * |
40 | * See also LoopMacros.h |
41 | */ |
42 | |
43 | RegisterFunc RegisterIntArgb; |
44 | |
45 | DECLARE_CONVERT_BLIT(Index12Gray, IntArgb); |
46 | DECLARE_XOR_BLIT(IntArgb, IntArgb); |
47 | DECLARE_SRC_MASKFILL(IntArgb); |
48 | DECLARE_SRCOVER_MASKFILL(IntArgb); |
49 | DECLARE_ALPHA_MASKFILL(IntArgb); |
50 | DECLARE_SRCOVER_MASKBLIT(IntArgb, IntArgb); |
51 | DECLARE_ALPHA_MASKBLIT(IntArgb, IntArgb); |
52 | DECLARE_SRCOVER_MASKBLIT(IntArgbPre, IntArgb); |
53 | DECLARE_ALPHA_MASKBLIT(IntArgbPre, IntArgb); |
54 | DECLARE_ALPHA_MASKBLIT(IntRgb, IntArgb); |
55 | DECLARE_SOLID_DRAWGLYPHLISTAA(IntArgb); |
56 | DECLARE_SOLID_DRAWGLYPHLISTLCD(IntArgb); |
57 | DECLARE_XPAR_SCALE_BLIT(IntArgbBm, IntArgb); |
58 | |
59 | DECLARE_TRANSFORMHELPER_FUNCS(IntArgb); |
60 | |
61 | NativePrimitive IntArgbPrimitives[] = { |
62 | REGISTER_ANYINT_ISOCOPY_BLIT(IntArgb), |
63 | REGISTER_ANYINT_ISOSCALE_BLIT(IntArgb), |
64 | REGISTER_CONVERT_BLIT(ByteIndexed, IntArgb), |
65 | REGISTER_CONVERT_BLIT(Index12Gray, IntArgb), |
66 | REGISTER_SCALE_BLIT(ByteIndexed, IntArgb), |
67 | REGISTER_XPAR_CONVERT_BLIT(ByteIndexedBm, IntArgb), |
68 | REGISTER_XPAR_SCALE_BLIT(ByteIndexedBm, IntArgb), |
69 | REGISTER_XPAR_SCALE_BLIT(IntArgbBm, IntArgb), |
70 | REGISTER_XPAR_BLITBG(ByteIndexedBm, IntArgb), |
71 | |
72 | REGISTER_XOR_BLIT(IntArgb, IntArgb), |
73 | REGISTER_SRC_MASKFILL(IntArgb), |
74 | REGISTER_SRCOVER_MASKFILL(IntArgb), |
75 | REGISTER_ALPHA_MASKFILL(IntArgb), |
76 | REGISTER_SRCOVER_MASKBLIT(IntArgb, IntArgb), |
77 | REGISTER_ALPHA_MASKBLIT(IntArgb, IntArgb), |
78 | REGISTER_SRCOVER_MASKBLIT(IntArgbPre, IntArgb), |
79 | REGISTER_ALPHA_MASKBLIT(IntArgbPre, IntArgb), |
80 | REGISTER_ALPHA_MASKBLIT(IntRgb, IntArgb), |
81 | REGISTER_SOLID_DRAWGLYPHLISTAA(IntArgb), |
82 | REGISTER_SOLID_DRAWGLYPHLISTLCD(IntArgb), |
83 | |
84 | REGISTER_TRANSFORMHELPER_FUNCS(IntArgb), |
85 | }; |
86 | |
87 | jboolean RegisterIntArgb(JNIEnv *env) |
88 | { |
89 | return RegisterPrimitives(env, IntArgbPrimitives, |
90 | ArraySize(IntArgbPrimitives)); |
91 | } |
92 | |
93 | DEFINE_CONVERT_BLIT_LUT8(ByteIndexed, IntArgb, ConvertOnTheFly) |
94 | |
95 | DEFINE_CONVERT_BLIT_LUT8(Index12Gray, IntArgb, ConvertOnTheFly) |
96 | |
97 | DEFINE_SCALE_BLIT_LUT8(ByteIndexed, IntArgb, ConvertOnTheFly) |
98 | |
99 | DEFINE_XPAR_CONVERT_BLIT_LUT8(ByteIndexedBm, IntArgb, ConvertOnTheFly) |
100 | |
101 | DEFINE_XPAR_SCALE_BLIT_LUT8(ByteIndexedBm, IntArgb, ConvertOnTheFly) |
102 | |
103 | DEFINE_XPAR_SCALE_BLIT(IntArgbBm, IntArgb, 1IntRgb) |
104 | |
105 | DEFINE_XPAR_BLITBG_LUT8(ByteIndexedBm, IntArgb, ConvertOnTheFly) |
106 | |
107 | DEFINE_XOR_BLIT(IntArgb, IntArgb, AnyInt) |
108 | |
109 | DEFINE_SRC_MASKFILL(IntArgb, 4ByteArgb) |
110 | |
111 | DEFINE_SRCOVER_MASKFILL(IntArgb, 4ByteArgb) |
112 | |
113 | DEFINE_ALPHA_MASKFILL(IntArgb, 4ByteArgb) |
114 | |
115 | DEFINE_SRCOVER_MASKBLIT(IntArgb, IntArgb, 4ByteArgb) |
116 | |
117 | DEFINE_ALPHA_MASKBLIT(IntArgb, IntArgb, 4ByteArgb) |
118 | |
119 | DEFINE_SRCOVER_MASKBLIT(IntArgbPre, IntArgb, 4ByteArgb) |
120 | |
121 | DEFINE_ALPHA_MASKBLIT(IntArgbPre, IntArgb, 4ByteArgb) |
122 | |
123 | DEFINE_ALPHA_MASKBLIT(IntRgb, IntArgb, 4ByteArgb) |
124 | |
125 | DEFINE_SOLID_DRAWGLYPHLISTAA(IntArgb, 4ByteArgb) |
126 | |
127 | DEFINE_SOLID_DRAWGLYPHLISTLCD(IntArgb, 4ByteArgb) |
128 | |
129 | DEFINE_TRANSFORMHELPERS(IntArgb) |
130 | |