blob: b303503ccc0f094e38c258c0290aee7c50eeadf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import java.io.PrintStream;
/**
* Emits a Java interface and Java & C implementation for a C function.
*
* <p> The Java interface will have Buffer and array variants for functions that
* have a typed pointer argument. The array variant will convert a single "<type> *data"
* argument to a pair of arguments "<type>[] data, int offset".
*/
public class GLESCodeEmitter extends JniCodeEmitter {
PrintStream mJavaImplStream;
PrintStream mCStream;
PrintStream mJavaInterfaceStream;
/**
*/
public GLESCodeEmitter(String classPathName,
ParameterChecker checker,
PrintStream javaImplStream,
PrintStream cStream) {
mClassPathName = classPathName;
mChecker = checker;
mJavaImplStream = javaImplStream;
mCStream = cStream;
mUseContextPointer = false;
mUseStaticMethods = true;
}
public void emitCode(CFunc cfunc, String original) {
emitCode(cfunc, original, null, mJavaImplStream,
mCStream);
}
public void emitNativeRegistration(String nativeRegistrationName) {
emitNativeRegistration(nativeRegistrationName, mCStream);
}
}
|