2
|
1 |
/*
|
5506
|
2 |
* Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
|
2
|
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
|
5506
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
2
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5506
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
2
|
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 |
*
|
5506
|
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.
|
2
|
24 |
*/
|
|
25 |
|
|
26 |
#include "AnyInt.h"
|
|
27 |
#include "IntArgbBm.h"
|
|
28 |
#include "AlphaMacros.h"
|
|
29 |
|
|
30 |
#include "IntArgb.h"
|
|
31 |
#include "IntArgbPre.h"
|
|
32 |
#include "ByteIndexed.h"
|
|
33 |
|
|
34 |
/*
|
|
35 |
* This file declares, registers, and defines the various graphics
|
|
36 |
* primitive loops to manipulate surfaces of type "IntArgbBm".
|
|
37 |
*
|
|
38 |
* See also LoopMacros.h
|
|
39 |
*/
|
|
40 |
|
|
41 |
RegisterFunc RegisterIntArgbBm;
|
|
42 |
|
|
43 |
DECLARE_CONVERT_BLIT(IntArgbBm, IntArgb);
|
|
44 |
DECLARE_CONVERT_BLIT(IntArgb, IntArgbBm);
|
|
45 |
DECLARE_CONVERT_BLIT(ByteIndexed, IntArgbBm);
|
|
46 |
DECLARE_XPAR_CONVERT_BLIT(ByteIndexedBm, IntArgbBm);
|
|
47 |
|
|
48 |
DECLARE_SCALE_BLIT(IntArgb, IntArgbBm);
|
|
49 |
DECLARE_SCALE_BLIT(ByteIndexed, IntArgbBm);
|
|
50 |
DECLARE_XPAR_SCALE_BLIT(ByteIndexedBm, IntArgbBm);
|
|
51 |
|
|
52 |
DECLARE_XPAR_BLITBG(ByteIndexedBm, IntArgbBm);
|
|
53 |
|
|
54 |
DECLARE_XOR_BLIT(IntArgb, IntArgbBm);
|
|
55 |
DECLARE_ALPHA_MASKFILL(IntArgbBm);
|
|
56 |
DECLARE_ALPHA_MASKBLIT(IntArgb, IntArgbBm);
|
|
57 |
DECLARE_ALPHA_MASKBLIT(IntArgbPre, IntArgbBm);
|
|
58 |
DECLARE_SOLID_DRAWGLYPHLISTAA(IntArgbBm);
|
|
59 |
DECLARE_SOLID_DRAWGLYPHLISTLCD(IntArgbBm);
|
|
60 |
|
|
61 |
DECLARE_TRANSFORMHELPER_FUNCS(IntArgbBm);
|
|
62 |
|
|
63 |
NativePrimitive IntArgbBmPrimitives[] = {
|
|
64 |
REGISTER_ANYINT_ISOCOPY_BLIT(IntArgbBm),
|
|
65 |
REGISTER_ANYINT_ISOSCALE_BLIT(IntArgbBm),
|
|
66 |
REGISTER_ANYINT_ISOXOR_BLIT(IntArgbBm),
|
|
67 |
REGISTER_CONVERT_BLIT(IntArgbBm, IntArgb),
|
|
68 |
REGISTER_CONVERT_BLIT(IntArgb, IntArgbBm),
|
|
69 |
REGISTER_CONVERT_BLIT(ByteIndexed, IntArgbBm),
|
|
70 |
REGISTER_SCALE_BLIT(IntArgb, IntArgbBm),
|
|
71 |
REGISTER_SCALE_BLIT(ByteIndexed, IntArgbBm),
|
|
72 |
REGISTER_XPAR_CONVERT_BLIT(ByteIndexedBm, IntArgbBm),
|
|
73 |
REGISTER_XPAR_SCALE_BLIT(ByteIndexedBm, IntArgbBm),
|
|
74 |
REGISTER_XPAR_BLITBG(ByteIndexedBm, IntArgbBm),
|
|
75 |
|
|
76 |
REGISTER_XOR_BLIT(IntArgb, IntArgbBm),
|
|
77 |
REGISTER_ALPHA_MASKFILL(IntArgbBm),
|
|
78 |
REGISTER_ALPHA_MASKBLIT(IntArgb, IntArgbBm),
|
|
79 |
REGISTER_ALPHA_MASKBLIT(IntArgbPre, IntArgbBm),
|
|
80 |
REGISTER_SOLID_DRAWGLYPHLISTAA(IntArgbBm),
|
|
81 |
REGISTER_SOLID_DRAWGLYPHLISTLCD(IntArgbBm),
|
|
82 |
|
|
83 |
REGISTER_TRANSFORMHELPER_FUNCS(IntArgbBm),
|
|
84 |
};
|
|
85 |
|
|
86 |
jboolean RegisterIntArgbBm(JNIEnv *env)
|
|
87 |
{
|
|
88 |
return RegisterPrimitives(env, IntArgbBmPrimitives,
|
|
89 |
ArraySize(IntArgbBmPrimitives));
|
|
90 |
}
|
|
91 |
|
|
92 |
jint PixelForIntArgbBm(SurfaceDataRasInfo *pRasInfo, jint rgb)
|
|
93 |
{
|
|
94 |
return (rgb | ((rgb >> 31) << 24));
|
|
95 |
}
|
|
96 |
|
|
97 |
DEFINE_CONVERT_BLIT(IntArgbBm, IntArgb, 1IntArgb)
|
|
98 |
|
|
99 |
DEFINE_CONVERT_BLIT(IntArgb, IntArgbBm, 1IntArgb)
|
|
100 |
|
|
101 |
DEFINE_CONVERT_BLIT(ByteIndexed, IntArgbBm, 1IntArgb)
|
|
102 |
|
|
103 |
DEFINE_SCALE_BLIT(IntArgb, IntArgbBm, 1IntArgb)
|
|
104 |
|
|
105 |
DEFINE_SCALE_BLIT(ByteIndexed, IntArgbBm, 1IntArgb)
|
|
106 |
|
|
107 |
DEFINE_XPAR_CONVERT_BLIT_LUT8(ByteIndexedBm, IntArgbBm, PreProcessLut)
|
|
108 |
|
|
109 |
DEFINE_XPAR_SCALE_BLIT_LUT8(ByteIndexedBm, IntArgbBm, PreProcessLut)
|
|
110 |
|
|
111 |
DEFINE_XPAR_BLITBG_LUT8(ByteIndexedBm, IntArgbBm, PreProcessLut)
|
|
112 |
|
|
113 |
DEFINE_XOR_BLIT(IntArgb, IntArgbBm, AnyInt)
|
|
114 |
|
|
115 |
DEFINE_ALPHA_MASKFILL(IntArgbBm, 4ByteArgb)
|
|
116 |
|
|
117 |
DEFINE_ALPHA_MASKBLIT(IntArgb, IntArgbBm, 4ByteArgb)
|
|
118 |
|
|
119 |
DEFINE_ALPHA_MASKBLIT(IntArgbPre, IntArgbBm, 4ByteArgb)
|
|
120 |
|
|
121 |
DEFINE_SOLID_DRAWGLYPHLISTAA(IntArgbBm, 4ByteArgb)
|
|
122 |
|
|
123 |
DEFINE_SOLID_DRAWGLYPHLISTLCD(IntArgbBm, 4ByteArgb)
|
|
124 |
|
|
125 |
DEFINE_TRANSFORMHELPERS(IntArgbBm)
|