# 1 "frameworks/base/opengl/libagl/matrix.cpp" # 1 "/usr/src/repos/linaro-android/android-iMX53-20111019111252-generic-tc//" # 1 "" # 1 "" # 1 "./system/core/include/arch/linux-arm/AndroidConfig.h" 1 # 1 "" 2 # 1 "frameworks/base/opengl/libagl/matrix.cpp" # 18 "frameworks/base/opengl/libagl/matrix.cpp" # 1 "bionic/libc/include/stdlib.h" 1 # 31 "bionic/libc/include/stdlib.h" # 1 "bionic/libc/include/sys/cdefs.h" 1 # 59 "bionic/libc/include/sys/cdefs.h" # 1 "bionic/libc/include/sys/cdefs_elf.h" 1 # 60 "bionic/libc/include/sys/cdefs.h" 2 # 32 "bionic/libc/include/stdlib.h" 2 # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 38 "bionic/libc/include/stdlib.h" 2 # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 150 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 3 4 typedef int ptrdiff_t; # 212 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 3 4 typedef unsigned int size_t; # 40 "bionic/libc/include/stdlib.h" 2 # 1 "bionic/libc/include/string.h" 1 # 32 "bionic/libc/include/string.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 33 "bionic/libc/include/string.h" 2 # 1 "bionic/libc/include/malloc.h" 1 # 32 "bionic/libc/include/malloc.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 33 "bionic/libc/include/malloc.h" 2 extern "C" { extern __attribute__((malloc)) void* malloc(size_t); extern __attribute__((malloc)) void* calloc(size_t, size_t); extern __attribute__((malloc)) void* realloc(void *, size_t); extern void free(void *); extern void* memalign(size_t alignment, size_t bytesize); extern void* valloc(size_t bytesize); extern void* pvalloc(size_t bytesize); extern int mallopt(int param_number, int param_value); extern size_t malloc_footprint(void); extern size_t malloc_max_footprint(void); struct mallinfo { size_t arena; size_t ordblks; size_t smblks; size_t hblks; size_t hblkhd; size_t usmblks; size_t fsmblks; size_t uordblks; size_t fordblks; size_t keepcost; }; extern struct mallinfo mallinfo(void); # 78 "bionic/libc/include/malloc.h" extern size_t malloc_usable_size(void* block); # 99 "bionic/libc/include/malloc.h" extern void malloc_stats(void); } # 34 "bionic/libc/include/string.h" 2 extern "C" { extern void* memccpy(void *, const void *, int, size_t); extern void* memchr(const void *, int, size_t); extern void* memrchr(const void *, int, size_t); extern int memcmp(const void *, const void *, size_t); extern void* memcpy(void *, const void *, size_t); extern void* memmove(void *, const void *, size_t); extern void* memset(void *, int, size_t); extern void* memmem(const void *, size_t, const void *, size_t); extern void memswap(void *, void *, size_t); extern char* index(const char *, int); extern char* rindex(const char *, int); extern char* strchr(const char *, int); extern char* strrchr(const char *, int); extern size_t strlen(const char *); extern int strcmp(const char *, const char *); extern char* strcpy(char *, const char *); extern char* strcat(char *, const char *); extern int strcasecmp(const char *, const char *); extern int strncasecmp(const char *, const char *, size_t); extern char* strdup(const char *); extern char* strstr(const char *, const char *); extern char* strcasestr(const char *haystack, const char *needle); extern char* strtok(char *, const char *); extern char* strtok_r(char *, const char *, char**); extern char* strerror(int); extern int strerror_r(int errnum, char *buf, size_t n); extern size_t strnlen(const char *, size_t); extern char* strncat(char *, const char *, size_t); extern char* strndup(const char *, size_t); extern int strncmp(const char *, const char *, size_t); extern char* strncpy(char *, const char *, size_t); extern size_t strlcat(char *, const char *, size_t); extern size_t strlcpy(char *, const char *, size_t); extern size_t strcspn(const char *, const char *); extern char* strpbrk(const char *, const char *); extern char* strsep(char **, const char *); extern size_t strspn(const char *, const char *); extern char* strsignal(int sig); extern int strcoll(const char *, const char *); extern size_t strxfrm(char *, const char *, size_t); } # 41 "bionic/libc/include/stdlib.h" 2 # 1 "bionic/libc/include/alloca.h" 1 # 42 "bionic/libc/include/stdlib.h" 2 # 1 "bionic/libc/include/strings.h" 1 # 42 "bionic/libc/include/strings.h" # 1 "bionic/libc/include/sys/types.h" 1 # 33 "bionic/libc/include/sys/types.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 34 "bionic/libc/include/sys/types.h" 2 # 1 "bionic/libc/include/stdint.h" 1 # 31 "bionic/libc/include/stdint.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 32 "bionic/libc/include/stdint.h" 2 # 1 "bionic/libc/include/sys/_types.h" 1 # 40 "bionic/libc/include/sys/_types.h" # 1 "bionic/libc/arch-arm/include/machine/_types.h" 1 # 50 "bionic/libc/arch-arm/include/machine/_types.h" typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; typedef long long __int64_t; typedef unsigned long long __uint64_t; typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; typedef __int32_t __int_fast8_t; typedef __uint32_t __uint_fast8_t; typedef __int32_t __int_fast16_t; typedef __uint32_t __uint_fast16_t; typedef __int32_t __int_fast32_t; typedef __uint32_t __uint_fast32_t; typedef __int64_t __int_fast64_t; typedef __uint64_t __uint_fast64_t; typedef int __intptr_t; typedef unsigned int __uintptr_t; typedef __int64_t __intmax_t; typedef __uint64_t __uintmax_t; typedef __int32_t __register_t; typedef unsigned long __vaddr_t; typedef unsigned long __paddr_t; typedef unsigned long __vsize_t; typedef unsigned long __psize_t; typedef int __clock_t; typedef int __clockid_t; typedef long __ptrdiff_t; typedef int __time_t; typedef int __timer_t; typedef __builtin_va_list __va_list; # 114 "bionic/libc/arch-arm/include/machine/_types.h" typedef int __wint_t; typedef int __rune_t; typedef void * __wctrans_t; typedef void * __wctype_t; # 41 "bionic/libc/include/sys/_types.h" 2 typedef unsigned long __cpuid_t; typedef __int32_t __dev_t; typedef __uint32_t __fixpt_t; typedef __uint32_t __gid_t; typedef __uint32_t __id_t; typedef __uint32_t __in_addr_t; typedef __uint16_t __in_port_t; typedef __uint32_t __ino_t; typedef long __key_t; typedef __uint32_t __mode_t; typedef __uint32_t __nlink_t; typedef __int32_t __pid_t; typedef __uint64_t __rlim_t; typedef __uint16_t __sa_family_t; typedef __int32_t __segsz_t; typedef __uint32_t __socklen_t; typedef __int32_t __swblk_t; typedef __uint32_t __uid_t; typedef __uint32_t __useconds_t; typedef __int32_t __suseconds_t; typedef union { char __mbstate8[128]; __int64_t __mbstateL; } __mbstate_t; # 33 "bionic/libc/include/stdint.h" 2 # 53 "bionic/libc/include/stdint.h" typedef __int8_t int8_t; typedef __uint8_t uint8_t; typedef __int16_t int16_t; typedef __uint16_t uint16_t; typedef __int32_t int32_t; typedef __uint32_t uint32_t; typedef __int64_t int64_t; typedef __uint64_t uint64_t; typedef int8_t int_least8_t; typedef int8_t int_fast8_t; typedef uint8_t uint_least8_t; typedef uint8_t uint_fast8_t; # 102 "bionic/libc/include/stdint.h" typedef int16_t int_least16_t; typedef int32_t int_fast16_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_fast16_t; # 135 "bionic/libc/include/stdint.h" typedef int32_t int_least32_t; typedef int32_t int_fast32_t; typedef uint32_t uint_least32_t; typedef uint32_t uint_fast32_t; # 168 "bionic/libc/include/stdint.h" typedef int64_t int_least64_t; typedef int64_t int_fast64_t; typedef uint64_t uint_least64_t; typedef uint64_t uint_fast64_t; # 211 "bionic/libc/include/stdint.h" typedef int intptr_t; typedef unsigned int uintptr_t; # 230 "bionic/libc/include/stdint.h" typedef uint64_t uintmax_t; typedef int64_t intmax_t; # 258 "bionic/libc/include/stdint.h" typedef long int ssize_t; # 35 "bionic/libc/include/sys/types.h" 2 # 1 "bionic/libc/kernel/common/linux/posix_types.h" 1 # 15 "bionic/libc/kernel/common/linux/posix_types.h" # 1 "bionic/libc/kernel/common/linux/stddef.h" 1 # 15 "bionic/libc/kernel/common/linux/stddef.h" # 1 "bionic/libc/kernel/common/linux/compiler.h" 1 # 16 "bionic/libc/kernel/common/linux/stddef.h" 2 # 16 "bionic/libc/kernel/common/linux/posix_types.h" 2 # 32 "bionic/libc/kernel/common/linux/posix_types.h" typedef struct { unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; typedef int __kernel_mqd_t; # 1 "bionic/libc/kernel/arch-arm/asm/posix_types.h" 1 # 15 "bionic/libc/kernel/arch-arm/asm/posix_types.h" typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_nlink_t; typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; typedef long __kernel_suseconds_t; typedef long __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef int __kernel_daddr_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef unsigned short __kernel_old_dev_t; typedef long long __kernel_loff_t; typedef struct { int __val[2]; } __kernel_fsid_t; # 42 "bionic/libc/kernel/common/linux/posix_types.h" 2 # 38 "bionic/libc/include/sys/types.h" 2 # 1 "bionic/libc/kernel/arch-arm/asm/types.h" 1 # 17 "bionic/libc/kernel/arch-arm/asm/types.h" typedef unsigned short umode_t; typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; typedef __signed__ long long __s64; typedef unsigned long long __u64; # 39 "bionic/libc/include/sys/types.h" 2 # 1 "bionic/libc/kernel/common/linux/types.h" 1 # 21 "bionic/libc/kernel/common/linux/types.h" typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; char f_fname[6]; char f_fpack[6]; }; # 40 "bionic/libc/include/sys/types.h" 2 # 1 "bionic/libc/arch-arm/include/machine/kernel.h" 1 # 34 "bionic/libc/arch-arm/include/machine/kernel.h" typedef unsigned long __kernel_blkcnt_t; typedef unsigned long __kernel_blksize_t; typedef unsigned long __kernel_fsblkcnt_t; typedef unsigned long __kernel_fsfilcnt_t; typedef unsigned int __kernel_id_t; # 41 "bionic/libc/include/sys/types.h" 2 typedef __u32 __kernel_dev_t; # 52 "bionic/libc/include/sys/types.h" typedef __kernel_blkcnt_t blkcnt_t; typedef __kernel_blksize_t blksize_t; typedef __kernel_clock_t clock_t; typedef __kernel_clockid_t clockid_t; typedef __kernel_dev_t dev_t; typedef __kernel_fsblkcnt_t fsblkcnt_t; typedef __kernel_fsfilcnt_t fsfilcnt_t; typedef __kernel_gid32_t gid_t; typedef __kernel_id_t id_t; typedef __kernel_ino_t ino_t; typedef __kernel_key_t key_t; typedef __kernel_mode_t mode_t; typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_loff_t loff_t; typedef loff_t off64_t; typedef __kernel_pid_t pid_t; # 99 "bionic/libc/include/sys/types.h" typedef __kernel_suseconds_t suseconds_t; typedef __kernel_time_t time_t; typedef __kernel_uid32_t uid_t; typedef signed long useconds_t; typedef __kernel_daddr_t daddr_t; typedef __kernel_timer_t timer_t; typedef __kernel_mqd_t mqd_t; typedef __kernel_caddr_t caddr_t; typedef unsigned int uint_t; typedef unsigned int uint; # 1 "bionic/libc/include/sys/sysmacros.h" 1 # 36 "bionic/libc/include/sys/sysmacros.h" static __inline__ int major(dev_t _dev) { return (_dev >> 8) & 0xfff; } static __inline__ int minor(dev_t _dev) { return (_dev & 0xff) | ((_dev >> 12) & 0xfff00); } static __inline__ dev_t makedev(int __ma, int __mi) { return ((__ma & 0xfff) << 8) | (__mi & 0xff) | ((__mi & 0xfff00) << 12); } # 114 "bionic/libc/include/sys/types.h" 2 typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef uint32_t u_int32_t; typedef uint16_t u_int16_t; typedef uint8_t u_int8_t; typedef uint64_t u_int64_t; # 43 "bionic/libc/include/strings.h" 2 extern "C" { int bcmp(const void *, const void *, size_t); void bcopy(const void *, void *, size_t); void bzero(void *, size_t); int ffs(int); char *index(const char *, int); char *rindex(const char *, int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); } # 43 "bionic/libc/include/stdlib.h" 2 # 1 "bionic/libc/include/memory.h" 1 # 44 "bionic/libc/include/stdlib.h" 2 extern "C" { extern __attribute__((__noreturn__)) void exit(int); extern __attribute__((__noreturn__)) void abort(void); extern int atexit(void (*)(void)); extern char *getenv(const char *); extern int putenv(const char *); extern int setenv(const char *, const char *, int); extern int unsetenv(const char *); extern int clearenv(void); extern char *mktemp (char *); extern int mkstemp (char *); extern long strtol(const char *, char **, int); extern long long strtoll(const char *, char **, int); extern unsigned long strtoul(const char *, char **, int); extern unsigned long long strtoull(const char *, char **, int); extern double strtod(const char *nptr, char **endptr); static __inline__ float strtof(const char *nptr, char **endptr) { return (float)strtod(nptr, endptr); } extern int atoi(const char *); extern long atol(const char *); extern long long atoll(const char *); static __inline__ double atof(const char *nptr) { return (strtod(nptr, 0)); } static __inline__ int abs(int __n) { return (__n < 0) ? -__n : __n; } static __inline__ long labs(long __n) { return (__n < 0L) ? -__n : __n; } static __inline__ long long llabs(long long __n) { return (__n < 0LL) ? -__n : __n; } extern char * realpath(const char *path, char *resolved); extern int system(const char * string); extern void * bsearch(const void *key, const void *base0, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); extern long jrand48(unsigned short *); extern long mrand48(void); extern long nrand48(unsigned short *); extern long lrand48(void); extern unsigned short *seed48(unsigned short*); extern double erand48(unsigned short xsubi[3]); extern double drand48(void); extern void srand48(long); extern unsigned int arc4random(void); extern void arc4random_stir(void); extern void arc4random_addrandom(unsigned char *, int); static __inline__ int rand(void) { return (int)lrand48(); } static __inline__ void srand(unsigned int __s) { srand48(__s); } static __inline__ long random(void) { return lrand48(); } static __inline__ void srandom(unsigned int __s) { srand48(__s); } extern int unlockpt(int); extern char* ptsname(int); extern int ptsname_r(int, char*, size_t); extern int getpt(void); static __inline__ int grantpt(int __fd __attribute((unused))) { (void)__fd; return 0; } typedef struct { int quot; int rem; } div_t; extern div_t div(int, int); typedef struct { long int quot; long int rem; } ldiv_t; extern ldiv_t ldiv(long, long); typedef struct { long long int quot; long long int rem; } lldiv_t; extern lldiv_t lldiv(long long, long long); extern int mblen(const char *, size_t); extern size_t mbstowcs(wchar_t *, const char *, size_t); extern int mbtowc(wchar_t *, const char *, size_t); extern int wctomb(char *, wchar_t); extern size_t wcstombs(char *, const wchar_t *, size_t); # 183 "bionic/libc/include/stdlib.h" } # 19 "frameworks/base/opengl/libagl/matrix.cpp" 2 # 1 "bionic/libc/include/stdio.h" 1 # 46 "bionic/libc/include/stdio.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stdarg.h" 1 3 4 # 40 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 47 "bionic/libc/include/stdio.h" 2 # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 51 "bionic/libc/include/stdio.h" 2 # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 53 "bionic/libc/include/stdio.h" 2 # 78 "bionic/libc/include/stdio.h" typedef off_t fpos_t; # 87 "bionic/libc/include/stdio.h" struct __sbuf { unsigned char *_base; int _size; }; # 119 "bionic/libc/include/stdio.h" typedef struct __sFILE { unsigned char *_p; int _r; int _w; short _flags; short _file; struct __sbuf _bf; int _lbfsize; void *_cookie; int (*_close)(void *); int (*_read)(void *, char *, int); fpos_t (*_seek)(void *, fpos_t, int); int (*_write)(void *, const char *, int); struct __sbuf _ext; unsigned char *_up; int _ur; unsigned char _ubuf[3]; unsigned char _nbuf[1]; struct __sbuf _lb; int _blksize; fpos_t _offset; } FILE; extern "C" { extern FILE __sF[]; } # 223 "bionic/libc/include/stdio.h" extern "C" { void clearerr(FILE *); int fclose(FILE *); int feof(FILE *); int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); int fgetpos(FILE *, fpos_t *); char *fgets(char *, int, FILE *); FILE *fopen(const char *, const char *); int fprintf(FILE *, const char *, ...); int fputc(int, FILE *); int fputs(const char *, FILE *); size_t fread(void *, size_t, size_t, FILE *); FILE *freopen(const char *, const char *, FILE *); int fscanf(FILE *, const char *, ...); int fseek(FILE *, long, int); int fseeko(FILE *, off_t, int); int fsetpos(FILE *, const fpos_t *); long ftell(FILE *); off_t ftello(FILE *); size_t fwrite(const void *, size_t, size_t, FILE *); int getc(FILE *); int getchar(void); char *gets(char *); extern int sys_nerr; extern char *sys_errlist[]; void perror(const char *); int printf(const char *, ...); int putc(int, FILE *); int putchar(int); int puts(const char *); int remove(const char *); int rename(const char *, const char *); void rewind(FILE *); int scanf(const char *, ...); void setbuf(FILE *, char *); int setvbuf(FILE *, char *, int, size_t); int sprintf(char *, const char *, ...); int sscanf(const char *, const char *, ...); FILE *tmpfile(void); char *tmpnam(char *); int ungetc(int, FILE *); int vfprintf(FILE *, const char *, __va_list); int vprintf(const char *, __va_list); int vsprintf(char *, const char *, __va_list); int snprintf(char *, size_t, const char *, ...) __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3))); int vfscanf(FILE *, const char *, __va_list) __attribute__((__format__ (scanf, 2, 0))) __attribute__((__nonnull__ (2))); int vscanf(const char *, __va_list) __attribute__((__format__ (scanf, 1, 0))) __attribute__((__nonnull__ (1))); int vsnprintf(char *, size_t, const char *, __va_list) __attribute__((__format__ (printf, 3, 0))) __attribute__((__nonnull__ (3))); int vsscanf(const char *, const char *, __va_list) __attribute__((__format__ (scanf, 2, 0))) __attribute__((__nonnull__ (2))); } # 302 "bionic/libc/include/stdio.h" extern "C" { FILE *fdopen(int, const char *); int fileno(FILE *); int pclose(FILE *); FILE *popen(const char *, const char *); void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); int getc_unlocked(FILE *); int getchar_unlocked(void); int putc_unlocked(int, FILE *); int putchar_unlocked(int); char *tempnam(const char *, const char *); } extern "C" { int asprintf(char **, const char *, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); char *fgetln(FILE *, size_t *); int fpurge(FILE *); int getw(FILE *); int putw(int, FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char **, const char *, __va_list) __attribute__((__format__ (printf, 2, 0))) __attribute__((__nonnull__ (2))); } extern "C" { FILE *funopen(const void *, int (*)(void *, char *, int), int (*)(void *, const char *, int), fpos_t (*)(void *, fpos_t, int), int (*)(void *)); } extern "C" { int __srget(FILE *); int __swbuf(int, FILE *); } static inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else return (__swbuf(_c, _p)); } # 20 "frameworks/base/opengl/libagl/matrix.cpp" 2 # 1 "frameworks/base/opengl/libagl/context.h" 1 # 18 "frameworks/base/opengl/libagl/context.h" # 1 "frameworks/base/include/private/opengles/gl_context.h" 1 # 21 "frameworks/base/include/private/opengles/gl_context.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 22 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "bionic/libc/include/pthread.h" 1 # 31 "bionic/libc/include/pthread.h" # 1 "bionic/libc/include/time.h" 1 # 32 "bionic/libc/include/time.h" # 1 "bionic/libc/include/sys/time.h" 1 # 33 "bionic/libc/include/sys/time.h" # 1 "bionic/libc/kernel/common/linux/time.h" 1 # 19 "bionic/libc/kernel/common/linux/time.h" struct timespec { time_t tv_sec; long tv_nsec; }; struct timeval { time_t tv_sec; suseconds_t tv_usec; }; struct timezone { int tz_minuteswest; int tz_dsttime; }; # 47 "bionic/libc/kernel/common/linux/time.h" struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; # 34 "bionic/libc/include/sys/time.h" 2 extern "C" { extern int gettimeofday(struct timeval *, struct timezone *); extern int settimeofday(const struct timeval *, const struct timezone *); extern int getitimer(int, struct itimerval *); extern int setitimer(int, const struct itimerval *, struct itimerval *); extern int utimes(const char *, const struct timeval *); # 76 "bionic/libc/include/sys/time.h" } # 33 "bionic/libc/include/time.h" 2 # 1 "bionic/libc/kernel/arch-arm/asm/siginfo.h" 1 # 15 "bionic/libc/kernel/arch-arm/asm/siginfo.h" # 1 "bionic/libc/kernel/common/asm-generic/siginfo.h" 1 # 18 "bionic/libc/kernel/common/asm-generic/siginfo.h" typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; # 42 "bionic/libc/kernel/common/asm-generic/siginfo.h" typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 - (3 * sizeof(int))) / sizeof(int))]; struct { pid_t _pid; __kernel_uid32_t _uid; } _kill; struct { timer_t _tid; int _overrun; char _pad[sizeof( __kernel_uid32_t) - sizeof(int)]; sigval_t _sigval; int _sys_private; } _timer; struct { pid_t _pid; __kernel_uid32_t _uid; sigval_t _sigval; } _rt; struct { pid_t _pid; __kernel_uid32_t _uid; int _status; clock_t _utime; clock_t _stime; } _sigchld; struct { void *_addr; } _sigfault; struct { long _band; int _fd; } _sigpoll; } _sifields; } siginfo_t; # 194 "bionic/libc/kernel/common/asm-generic/siginfo.h" typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))]; int _tid; struct { void (*_function)(sigval_t); void *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; # 16 "bionic/libc/kernel/arch-arm/asm/siginfo.h" 2 # 36 "bionic/libc/include/time.h" 2 extern "C" { extern time_t time(time_t *); extern int nanosleep(const struct timespec *, struct timespec *); extern char *strtotimeval(const char *str, struct timeval *tv); struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; const char *tm_zone; }; extern char* asctime(const struct tm* a); extern char* asctime_r(const struct tm* a, char* buf); extern double difftime (time_t __time1, time_t __time0); extern time_t mktime (struct tm *a); extern struct tm* localtime(const time_t *t); extern struct tm* localtime_r(const time_t *timep, struct tm *result); extern struct tm* gmtime(const time_t *timep); extern struct tm* gmtime_r(const time_t *timep, struct tm *result); extern char* strptime(const char *buf, const char *fmt, struct tm *tm); extern size_t strftime(char *s, size_t max, const char *format, const struct tm *tm); struct strftime_locale { const char * mon[12]; const char * month[12]; const char * standalone_month[12]; const char * wday[7]; const char * weekday[7]; const char * X_fmt; const char * x_fmt; const char * c_fmt; const char * am; const char * pm; const char * date_fmt; }; extern size_t strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale* lc); extern char *ctime(const time_t *timep); extern char *ctime_r(const time_t *timep, char *buf); extern void tzset(void); extern char* tzname[]; extern int daylight; extern long int timezone; extern clock_t clock(void); extern int clock_getres(int, struct timespec *); extern int clock_gettime(int, struct timespec *); # 125 "bionic/libc/include/time.h" extern int timer_create(int, struct sigevent*, timer_t*); extern int timer_delete(timer_t); extern int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); extern int timer_gettime(timer_t timerid, struct itimerspec *value); extern int timer_getoverrun(timer_t timerid); } # 32 "bionic/libc/include/pthread.h" 2 # 1 "bionic/libc/include/signal.h" 1 # 32 "bionic/libc/include/signal.h" # 1 "bionic/libc/include/limits.h" 1 # 86 "bionic/libc/include/limits.h" # 1 "bionic/libc/include/sys/limits.h" 1 # 30 "bionic/libc/include/sys/limits.h" # 1 "bionic/libc/kernel/common/linux/limits.h" 1 # 31 "bionic/libc/include/sys/limits.h" 2 # 44 "bionic/libc/include/sys/limits.h" # 1 "bionic/libc/arch-arm/include/machine/internal_types.h" 1 # 45 "bionic/libc/include/sys/limits.h" 2 # 1 "bionic/libc/arch-arm/include/machine/limits.h" 1 # 48 "bionic/libc/include/sys/limits.h" 2 # 87 "bionic/libc/include/limits.h" 2 # 1 "bionic/libc/include/sys/syslimits.h" 1 # 90 "bionic/libc/include/limits.h" 2 # 33 "bionic/libc/include/signal.h" 2 # 1 "bionic/libc/kernel/arch-arm/asm/signal.h" 1 # 17 "bionic/libc/kernel/arch-arm/asm/signal.h" struct siginfo; typedef unsigned long sigset_t; # 82 "bionic/libc/kernel/arch-arm/asm/signal.h" # 1 "bionic/libc/kernel/common/asm-generic/signal.h" 1 # 28 "bionic/libc/kernel/common/asm-generic/signal.h" typedef void __signalfn_t(int); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; # 83 "bionic/libc/kernel/arch-arm/asm/signal.h" 2 struct sigaction { union { __sighandler_t _sa_handler; void (*_sa_sigaction)(int, struct siginfo *, void *); } _u; sigset_t sa_mask; unsigned long sa_flags; void (*sa_restorer)(void); }; typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 36 "bionic/libc/include/signal.h" 2 extern "C" { typedef int sig_atomic_t; # 53 "bionic/libc/include/signal.h" extern const char * const sys_siglist[]; extern const char * const sys_signame[]; static __inline__ int sigismember(sigset_t *set, int signum) { unsigned long *local_set = (unsigned long *)set; signum--; return (int)((local_set[signum/32] >> (signum%32)) & 1); } static __inline__ int sigaddset(sigset_t *set, int signum) { unsigned long *local_set = (unsigned long *)set; signum--; local_set[signum/32] |= 1UL << (signum%32); return 0; } static __inline__ int sigdelset(sigset_t *set, int signum) { unsigned long *local_set = (unsigned long *)set; signum--; local_set[signum/32] &= ~(1UL << (signum%32)); return 0; } static __inline__ int sigemptyset(sigset_t *set) { memset(set, 0, sizeof *set); return 0; } static __inline__ int sigfillset(sigset_t *set) { memset(set, ~0, sizeof *set); return 0; } typedef void (*sig_t)(int); typedef sig_t sighandler_t; extern __sighandler_t sysv_signal(int, __sighandler_t); extern __sighandler_t bsd_signal(int, __sighandler_t); static __inline__ __sighandler_t signal(int s, __sighandler_t f) { return bsd_signal(s,f); } extern __sighandler_t __signal(int, __sighandler_t, int); extern int sigprocmask(int, const sigset_t *, sigset_t *); extern int sigaction(int, const struct sigaction *, struct sigaction *); extern int sigpending(sigset_t *); extern int sigsuspend(const sigset_t *); extern int sigwait(const sigset_t *set, int *sig); extern int siginterrupt(int sig, int flag); extern int raise(int); extern int kill(pid_t, int); extern int killpg(int pgrp, int sig); extern int sigaltstack(const stack_t *ss, stack_t *oss); } # 33 "bionic/libc/include/pthread.h" 2 # 1 "bionic/libc/include/sched.h" 1 # 34 "bionic/libc/include/sched.h" extern "C" { struct sched_param { int sched_priority; }; extern int sched_setscheduler(pid_t, int, const struct sched_param *); extern int sched_getscheduler(pid_t); extern int sched_yield(void); extern int sched_get_priority_max(int policy); extern int sched_get_priority_min(int policy); extern int sched_setparam(pid_t, const struct sched_param *); extern int sched_getparam(pid_t, struct sched_param *); extern int sched_rr_get_interval(pid_t pid, struct timespec *tp); # 76 "bionic/libc/include/sched.h" } # 34 "bionic/libc/include/pthread.h" 2 typedef struct { int volatile value; } pthread_mutex_t; enum { PTHREAD_MUTEX_NORMAL = 0, PTHREAD_MUTEX_RECURSIVE = 1, PTHREAD_MUTEX_ERRORCHECK = 2, PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL }; typedef struct { int volatile value; } pthread_cond_t; typedef struct { uint32_t flags; void * stack_base; size_t stack_size; size_t guard_size; int32_t sched_policy; int32_t sched_priority; } pthread_attr_t; typedef long pthread_mutexattr_t; typedef long pthread_condattr_t; typedef int pthread_key_t; typedef long pthread_t; typedef volatile int pthread_once_t; # 107 "bionic/libc/include/pthread.h" extern "C" { int pthread_attr_init(pthread_attr_t * attr); int pthread_attr_destroy(pthread_attr_t * attr); int pthread_attr_setdetachstate(pthread_attr_t * attr, int state); int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state); int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy); int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy); int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param); int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param); int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size); int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size); int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr); int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr); int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size); int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size); int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size); int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size); int pthread_attr_setscope(pthread_attr_t *attr, int scope); int pthread_attr_getscope(pthread_attr_t const *attr); int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr); int pthread_create(pthread_t *thread, pthread_attr_t const * attr, void *(*start_routine)(void *), void * arg); void pthread_exit(void * retval); int pthread_join(pthread_t thid, void ** ret_val); int pthread_detach(pthread_t thid); pthread_t pthread_self(void); int pthread_equal(pthread_t one, pthread_t two); int pthread_getschedparam(pthread_t thid, int * policy, struct sched_param * param); int pthread_setschedparam(pthread_t thid, int poilcy, struct sched_param const * param); int pthread_mutexattr_init(pthread_mutexattr_t *attr); int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type); int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared); int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared); int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); int pthread_mutex_destroy(pthread_mutex_t *mutex); int pthread_mutex_lock(pthread_mutex_t *mutex); int pthread_mutex_unlock(pthread_mutex_t *mutex); int pthread_mutex_trylock(pthread_mutex_t *mutex); int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts); int pthread_condattr_init(pthread_condattr_t *attr); int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared); int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared); int pthread_condattr_destroy(pthread_condattr_t *attr); int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); int pthread_cond_destroy(pthread_cond_t *cond); int pthread_cond_broadcast(pthread_cond_t *cond); int pthread_cond_signal(pthread_cond_t *cond); int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t * mutex, const struct timespec *abstime); int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime); int pthread_cond_timedwait_monotonic(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime); int pthread_cond_timedwait_relative_np(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *reltime); int pthread_cond_timeout_np(pthread_cond_t *cond, pthread_mutex_t * mutex, unsigned msecs); int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs); typedef int pthread_rwlockattr_t; typedef struct { pthread_mutex_t lock; pthread_cond_t cond; int numLocks; int writerThreadId; int pendingReaders; int pendingWriters; void* reserved[4]; } pthread_rwlock_t; int pthread_rwlockattr_init(pthread_rwlockattr_t *attr); int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr); int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared); int pthread_rwlockattr_getpshared(pthread_rwlockattr_t *attr, int *pshared); int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr); int pthread_rwlock_destroy(pthread_rwlock_t *rwlock); int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock); int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout); int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock); int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout); int pthread_rwlock_unlock(pthread_rwlock_t *rwlock); int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *)); int pthread_key_delete (pthread_key_t); int pthread_setspecific(pthread_key_t key, const void *value); void *pthread_getspecific(pthread_key_t key); int pthread_kill(pthread_t tid, int sig); int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset); int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid); int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)); int pthread_setname_np(pthread_t thid, const char *thname); typedef void (*__pthread_cleanup_func_t)(void*); typedef struct __pthread_cleanup_t { struct __pthread_cleanup_t* __cleanup_prev; __pthread_cleanup_func_t __cleanup_routine; void* __cleanup_arg; } __pthread_cleanup_t; extern void __pthread_cleanup_push(__pthread_cleanup_t* c, __pthread_cleanup_func_t routine, void* arg); extern void __pthread_cleanup_pop(__pthread_cleanup_t* c, int execute); # 304 "bionic/libc/include/pthread.h" } # 24 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "bionic/libc/private/bionic_tls.h" 1 # 33 "bionic/libc/private/bionic_tls.h" extern "C" { # 84 "bionic/libc/private/bionic_tls.h" extern void __init_tls(void** tls, void* thread_info); extern int __set_tls(void *ptr); # 135 "bionic/libc/private/bionic_tls.h" extern void* __get_stack_base(int *p_stack_size); } # 26 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "system/core/include/private/pixelflinger/ggl_context.h" 1 # 21 "system/core/include/private/pixelflinger/ggl_context.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 22 "system/core/include/private/pixelflinger/ggl_context.h" 2 # 1 "bionic/libc/arch-arm/include/endian.h" 1 # 10 "bionic/libc/arch-arm/include/endian.h" # 1 "bionic/libc/include/sys/endian.h" 1 # 162 "bionic/libc/include/sys/endian.h" extern "C" { __uint64_t htobe64(__uint64_t); __uint32_t htobe32(__uint32_t); __uint16_t htobe16(__uint16_t); __uint64_t betoh64(__uint64_t); __uint32_t betoh32(__uint32_t); __uint16_t betoh16(__uint16_t); __uint64_t htole64(__uint64_t); __uint32_t htole32(__uint32_t); __uint16_t htole16(__uint16_t); __uint64_t letoh64(__uint64_t); __uint32_t letoh32(__uint32_t); __uint16_t letoh16(__uint16_t); } # 10 "bionic/libc/arch-arm/include/endian.h" 2 # 25 "system/core/include/private/pixelflinger/ggl_context.h" 2 # 1 "system/core/include/pixelflinger/pixelflinger.h" 1 # 23 "system/core/include/pixelflinger/pixelflinger.h" # 1 "system/core/include/pixelflinger/format.h" 1 # 23 "system/core/include/pixelflinger/format.h" enum GGLPixelFormat { GGL_PIXEL_FORMAT_UNKNOWN = 0, GGL_PIXEL_FORMAT_NONE = 0, GGL_PIXEL_FORMAT_RGBA_8888 = 1, GGL_PIXEL_FORMAT_RGBX_8888 = 2, GGL_PIXEL_FORMAT_RGB_888 = 3, GGL_PIXEL_FORMAT_RGB_565 = 4, GGL_PIXEL_FORMAT_BGRA_8888 = 5, GGL_PIXEL_FORMAT_RGBA_5551 = 6, GGL_PIXEL_FORMAT_RGBA_4444 = 7, GGL_PIXEL_FORMAT_A_8 = 8, GGL_PIXEL_FORMAT_L_8 = 9, GGL_PIXEL_FORMAT_LA_88 = 0xA, GGL_PIXEL_FORMAT_RGB_332 = 0xB, GGL_PIXEL_FORMAT_RESERVED_10 = 0x10, GGL_PIXEL_FORMAT_RESERVED_11 = 0x11, GGL_PIXEL_FORMAT_RESERVED_12 = 0x12, GGL_PIXEL_FORMAT_RESERVED_13 = 0x13, GGL_PIXEL_FORMAT_RESERVED_14 = 0x14, GGL_PIXEL_FORMAT_RESERVED_15 = 0x15, GGL_PIXEL_FORMAT_RESERVED_16 = 0x16, GGL_PIXEL_FORMAT_RESERVED_17 = 0x17, GGL_PIXEL_FORMAT_Z_16 = 0x18, GGL_PIXEL_FORMAT_S_8 = 0x19, GGL_PIXEL_FORMAT_SZ_24 = 0x1A, GGL_PIXEL_FORMAT_SZ_8 = 0x1B, GGL_PIXEL_FORMAT_RESERVED_20 = 0x20, GGL_PIXEL_FORMAT_RESERVED_21 = 0x21, }; enum GGLFormatComponents { GGL_STENCIL_INDEX = 0x1901, GGL_DEPTH_COMPONENT = 0x1902, GGL_ALPHA = 0x1906, GGL_RGB = 0x1907, GGL_RGBA = 0x1908, GGL_LUMINANCE = 0x1909, GGL_LUMINANCE_ALPHA = 0x190A, }; enum GGLFormatComponentIndex { GGL_INDEX_ALPHA = 0, GGL_INDEX_RED = 1, GGL_INDEX_GREEN = 2, GGL_INDEX_BLUE = 3, GGL_INDEX_STENCIL = 0, GGL_INDEX_DEPTH = 1, GGL_INDEX_Y = 0, GGL_INDEX_CB = 1, GGL_INDEX_CR = 2, }; typedef struct { enum { ALPHA = GGL_INDEX_ALPHA, RED = GGL_INDEX_RED, GREEN = GGL_INDEX_GREEN, BLUE = GGL_INDEX_BLUE, STENCIL = GGL_INDEX_STENCIL, DEPTH = GGL_INDEX_DEPTH, LUMA = GGL_INDEX_Y, CHROMAB = GGL_INDEX_CB, CHROMAR = GGL_INDEX_CR, }; inline uint32_t mask(int i) const { return ((1<<(c[i].h-c[i].l))-1)<>FIXED_BITS; } GGLfixed gglFixedToIntFloor(GGLfixed f) { return f>>FIXED_BITS; } GGLfixed gglFixedToIntCeil(GGLfixed f) { return (f + ((1<>FIXED_BITS; } GGLfixed gglFracx(GGLfixed v) { return v & ((1<> (30-lz); } inline GGLfixed gglClampx(GGLfixed c) __attribute__((const)); inline GGLfixed gglClampx(GGLfixed c) { # 290 "system/core/include/private/pixelflinger/ggl_fixed.h" asm("bic %0, %1, %1, asr #31\n" : "=r"(c) : "r"(c)); if (c>FIXED_ONE) c = FIXED_ONE; return c; } # 28 "system/core/include/private/pixelflinger/ggl_context.h" 2 namespace android { inline uint32_t GGL_RGBA_TO_HOST(uint32_t v) { return v; } inline uint32_t GGL_HOST_TO_RGBA(uint32_t v) { return v; } # 55 "system/core/include/private/pixelflinger/ggl_context.h" const int GGL_DITHER_BITS = 6; const int GGL_DITHER_ORDER_SHIFT= 3; const int GGL_DITHER_ORDER = (1< struct CTA; template<> struct CTA { }; # 111 "system/core/include/private/pixelflinger/ggl_context.h" const int GGL_TEXTURE_UNIT_COUNT = 2; const int GGL_TMU_STATE = 0x00000001; const int GGL_CB_STATE = 0x00000002; const int GGL_PIXEL_PIPELINE_STATE = 0x00000004; # 131 "system/core/include/private/pixelflinger/ggl_context.h" const uint32_t GGL_NEEDS_CB_FORMAT_MASK = (((1LU<<(6))-1)<<0); const uint32_t GGL_NEEDS_CB_FORMAT_SHIFT = (0); const uint32_t GGL_NEEDS_SHADE_MASK = (((1LU<<(1))-1)<<6); const uint32_t GGL_NEEDS_SHADE_SHIFT = (6); const uint32_t GGL_NEEDS_W_MASK = (((1LU<<(1))-1)<<7); const uint32_t GGL_NEEDS_W_SHIFT = (7); const uint32_t GGL_NEEDS_BLEND_SRC_MASK = (((1LU<<(4))-1)<<8); const uint32_t GGL_NEEDS_BLEND_SRC_SHIFT = (8); const uint32_t GGL_NEEDS_BLEND_DST_MASK = (((1LU<<(4))-1)<<12); const uint32_t GGL_NEEDS_BLEND_DST_SHIFT = (12); const uint32_t GGL_NEEDS_BLEND_SRCA_MASK = (((1LU<<(4))-1)<<16); const uint32_t GGL_NEEDS_BLEND_SRCA_SHIFT = (16); const uint32_t GGL_NEEDS_BLEND_DSTA_MASK = (((1LU<<(4))-1)<<20); const uint32_t GGL_NEEDS_BLEND_DSTA_SHIFT = (20); const uint32_t GGL_NEEDS_LOGIC_OP_MASK = (((1LU<<(4))-1)<<24); const uint32_t GGL_NEEDS_LOGIC_OP_SHIFT = (24); const uint32_t GGL_NEEDS_MASK_ARGB_MASK = (((1LU<<(4))-1)<<28); const uint32_t GGL_NEEDS_MASK_ARGB_SHIFT = (28); const uint32_t GGL_NEEDS_P_ALPHA_TEST_MASK = (((1LU<<(3))-1)<<0); const uint32_t GGL_NEEDS_P_ALPHA_TEST_SHIFT = (0); const uint32_t GGL_NEEDS_P_AA_MASK = (((1LU<<(1))-1)<<3); const uint32_t GGL_NEEDS_P_AA_SHIFT = (3); const uint32_t GGL_NEEDS_P_DEPTH_TEST_MASK = (((1LU<<(3))-1)<<4); const uint32_t GGL_NEEDS_P_DEPTH_TEST_SHIFT = (4); const uint32_t GGL_NEEDS_P_MASK_Z_MASK = (((1LU<<(1))-1)<<7); const uint32_t GGL_NEEDS_P_MASK_Z_SHIFT = (7); const uint32_t GGL_NEEDS_P_DITHER_MASK = (((1LU<<(1))-1)<<8); const uint32_t GGL_NEEDS_P_DITHER_SHIFT = (8); const uint32_t GGL_NEEDS_P_FOG_MASK = (((1LU<<(1))-1)<<9); const uint32_t GGL_NEEDS_P_FOG_SHIFT = (9); const uint32_t GGL_NEEDS_P_RESERVED1_MASK = (((1LU<<(22))-1)<<10); const uint32_t GGL_NEEDS_P_RESERVED1_SHIFT = (10); const uint32_t GGL_NEEDS_T_FORMAT_MASK = (((1LU<<(6))-1)<<0); const uint32_t GGL_NEEDS_T_FORMAT_SHIFT = (0); const uint32_t GGL_NEEDS_T_RESERVED0_MASK = (((1LU<<(1))-1)<<6); const uint32_t GGL_NEEDS_T_RESERVED0_SHIFT = (6); const uint32_t GGL_NEEDS_T_POT_MASK = (((1LU<<(1))-1)<<7); const uint32_t GGL_NEEDS_T_POT_SHIFT = (7); const uint32_t GGL_NEEDS_T_S_WRAP_MASK = (((1LU<<(2))-1)<<8); const uint32_t GGL_NEEDS_T_S_WRAP_SHIFT = (8); const uint32_t GGL_NEEDS_T_T_WRAP_MASK = (((1LU<<(2))-1)<<10); const uint32_t GGL_NEEDS_T_T_WRAP_SHIFT = (10); const uint32_t GGL_NEEDS_T_ENV_MASK = (((1LU<<(3))-1)<<12); const uint32_t GGL_NEEDS_T_ENV_SHIFT = (12); const uint32_t GGL_NEEDS_T_LINEAR_MASK = (((1LU<<(1))-1)<<15); const uint32_t GGL_NEEDS_T_LINEAR_SHIFT = (15); const int GGL_NEEDS_WRAP_CLAMP_TO_EDGE = 0; const int GGL_NEEDS_WRAP_REPEAT = 1; const int GGL_NEEDS_WRAP_11 = 2; inline uint32_t ggl_wrap_to_needs(uint32_t e) { switch (e) { case GGL_CLAMP: return GGL_NEEDS_WRAP_CLAMP_TO_EDGE; case GGL_REPEAT: return GGL_NEEDS_WRAP_REPEAT; } return 0; } inline uint32_t ggl_blendfactor_to_needs(uint32_t b) { if (b <= 1) return b; return (b & 0xF)+2; } inline uint32_t ggl_needs_to_blendfactor(uint32_t n) { if (n <= 1) return n; return (n - 2) + 0x300; } inline uint32_t ggl_env_to_needs(uint32_t e) { switch (e) { case GGL_REPLACE: return 0; case GGL_MODULATE: return 1; case GGL_DECAL: return 2; case GGL_BLEND: return 3; case GGL_ADD: return 4; } return 0; } inline uint32_t ggl_needs_to_env(uint32_t n) { const uint32_t envs[] = { GGL_REPLACE, GGL_MODULATE, GGL_DECAL, GGL_BLEND, GGL_ADD }; return envs[n]; } enum { GGL_ENABLE_BLENDING = 0x00000001, GGL_ENABLE_SMOOTH = 0x00000002, GGL_ENABLE_AA = 0x00000004, GGL_ENABLE_LOGIC_OP = 0x00000008, GGL_ENABLE_ALPHA_TEST = 0x00000010, GGL_ENABLE_SCISSOR_TEST = 0x00000020, GGL_ENABLE_TMUS = 0x00000040, GGL_ENABLE_DEPTH_TEST = 0x00000080, GGL_ENABLE_STENCIL_TEST = 0x00000100, GGL_ENABLE_W = 0x00000200, GGL_ENABLE_DITHER = 0x00000400, GGL_ENABLE_FOG = 0x00000800, GGL_ENABLE_POINT_AA_NICE= 0x00001000 }; class needs_filter_t; struct needs_t { inline int match(const needs_filter_t& filter); inline bool operator == (const needs_t& rhs) const { return (n==rhs.n) && (p==rhs.p) && (t[0]==rhs.t[0]) && (t[1]==rhs.t[1]); } inline bool operator != (const needs_t& rhs) const { return !operator == (rhs); } uint32_t n; uint32_t p; uint32_t t[GGL_TEXTURE_UNIT_COUNT]; }; inline int compare_type(const needs_t& lhs, const needs_t& rhs) { return memcmp(&lhs, &rhs, sizeof(needs_t)); } struct needs_filter_t { needs_t value; needs_t mask; }; int needs_t::match(const needs_filter_t& filter) { uint32_t result = ((filter.value.n ^ n) & filter.mask.n) | ((filter.value.p ^ p) & filter.mask.p) | ((filter.value.t[0] ^ t[0]) & filter.mask.t[0]) | ((filter.value.t[1] ^ t[1]) & filter.mask.t[1]); return (result == 0); } struct context_t; class Assembly; struct blend_state_t { uint32_t src; uint32_t dst; uint32_t src_alpha; uint32_t dst_alpha; uint8_t reserved; uint8_t alpha_separate; uint8_t operation; uint8_t equation; }; struct mask_state_t { uint8_t color; uint8_t depth; uint32_t stencil; }; struct clear_state_t { GGLclampx r; GGLclampx g; GGLclampx b; GGLclampx a; GGLclampx depth; GGLint stencil; uint32_t colorPacked; uint32_t depthPacked; uint32_t stencilPacked; uint32_t dirty; }; struct fog_state_t { uint8_t color[4]; }; struct logic_op_state_t { uint16_t opcode; }; struct alpha_test_state_t { uint16_t func; GGLcolor ref; }; struct depth_test_state_t { uint16_t func; GGLclampx clearValue; }; struct scissor_t { uint32_t user_left; uint32_t user_right; uint32_t user_top; uint32_t user_bottom; uint32_t left; uint32_t right; uint32_t top; uint32_t bottom; }; struct pixel_t { uint32_t c[4]; uint8_t s[4]; }; struct surface_t { union { GGLSurface s; struct { uint32_t reserved; uint32_t width; uint32_t height; int32_t stride; uint8_t* data; uint8_t format; uint8_t dirty; uint8_t pad[2]; }; }; void (*read) (const surface_t* s, context_t* c, uint32_t x, uint32_t y, pixel_t* pixel); void (*write)(const surface_t* s, context_t* c, uint32_t x, uint32_t y, const pixel_t* pixel); }; struct texture_shade_t { union { struct { int32_t is0; int32_t idsdx; int32_t idsdy; int sscale; int32_t it0; int32_t idtdx; int32_t idtdy; int tscale; }; struct { int32_t v; int32_t dx; int32_t dy; int scale; } st[2]; }; }; struct texture_iterators_t { union { struct { GGLfixed ydsdy; GGLfixed dsdx; GGLfixed dsdy; int sscale; GGLfixed ydtdy; GGLfixed dtdx; GGLfixed dtdy; int tscale; }; struct { GGLfixed ydvdy; GGLfixed dvdx; GGLfixed dvdy; int scale; } st[2]; }; }; struct texture_t { surface_t surface; texture_iterators_t iterators; texture_shade_t shade; uint32_t s_coord; uint32_t t_coord; uint16_t s_wrap; uint16_t t_wrap; uint16_t min_filter; uint16_t mag_filter; uint16_t env; uint8_t env_color[4]; uint8_t enable; uint8_t dirty; }; struct raster_t { GGLfixed x; GGLfixed y; }; struct framebuffer_t { surface_t color; surface_t read; surface_t depth; surface_t stencil; int16_t *coverage; size_t coverageBufferSize; }; struct iterators_t { int32_t xl; int32_t xr; int32_t y; GGLcolor ydady; GGLcolor ydrdy; GGLcolor ydgdy; GGLcolor ydbdy; GGLfixed ydzdy; GGLfixed ydwdy; GGLfixed ydfdy; }; struct shade_t { GGLcolor a0; GGLcolor dadx; GGLcolor dady; GGLcolor r0; GGLcolor drdx; GGLcolor drdy; GGLcolor g0; GGLcolor dgdx; GGLcolor dgdy; GGLcolor b0; GGLcolor dbdx; GGLcolor dbdy; uint32_t z0; GGLfixed32 dzdx; GGLfixed32 dzdy; GGLfixed w0; GGLfixed dwdx; GGLfixed dwdy; uint32_t f0; GGLfixed dfdx; GGLfixed dfdy; }; struct generated_tex_vars_t { uint32_t width; uint32_t height; uint32_t stride; int32_t data; int32_t dsdx; int32_t dtdx; int32_t spill[2]; }; struct generated_vars_t { struct { int32_t c; int32_t dx; } argb[4]; int32_t aref; int32_t dzdx; int32_t zbase; int32_t f; int32_t dfdx; int32_t spill[3]; generated_tex_vars_t texture[GGL_TEXTURE_UNIT_COUNT]; int32_t rt; int32_t lb; }; struct state_t { framebuffer_t buffers; texture_t texture[GGL_TEXTURE_UNIT_COUNT]; scissor_t scissor; raster_t raster; blend_state_t blend; alpha_test_state_t alpha_test; depth_test_state_t depth_test; mask_state_t mask; clear_state_t clear; fog_state_t fog; logic_op_state_t logic_op; uint32_t enables; uint32_t enabled_tmu; needs_t needs; }; struct context_t { GGLContext procs; state_t state; shade_t shade; iterators_t iterators; generated_vars_t generated_vars __attribute__((aligned(32))); uint8_t ditherMatrix[GGL_DITHER_SIZE] __attribute__((aligned(32))); uint32_t packed; uint32_t packed8888; const GGLFormat* formats; uint32_t dirty; texture_t* activeTMU; uint32_t activeTMUIndex; void (*init_y)(context_t* c, int32_t y); void (*step_y)(context_t* c); void (*scanline)(context_t* c); void (*span)(context_t* c); void (*rect)(context_t* c, size_t yc); void* base; Assembly* scanline_as; GGLenum error; }; void ggl_init_context(context_t* context); void ggl_uninit_context(context_t* context); void ggl_error(context_t* c, GGLenum error); int64_t ggl_system_time(); }; # 29 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "hardware/libhardware/include/hardware/copybit.h" 1 # 20 "hardware/libhardware/include/hardware/copybit.h" # 1 "hardware/libhardware/include/hardware/hardware.h" 1 # 23 "hardware/libhardware/include/hardware/hardware.h" # 1 "system/core/include/cutils/native_handle.h" 1 # 21 "system/core/include/cutils/native_handle.h" extern "C" { typedef struct { int version; int numFds; int numInts; int data[0]; } native_handle_t; typedef native_handle_t native_handle; # 44 "system/core/include/cutils/native_handle.h" int native_handle_close(const native_handle_t* h); # 54 "system/core/include/cutils/native_handle.h" native_handle_t* native_handle_create(int numFds, int numInts); # 66 "system/core/include/cutils/native_handle.h" int native_handle_delete(native_handle_t* h); } # 24 "hardware/libhardware/include/hardware/hardware.h" 2 extern "C" { # 36 "hardware/libhardware/include/hardware/hardware.h" struct hw_module_t; struct hw_module_methods_t; struct hw_device_t; typedef struct hw_module_t { uint32_t tag; uint16_t version_major; uint16_t version_minor; const char *id; const char *name; const char *author; struct hw_module_methods_t* methods; void* dso; uint32_t reserved[32-7]; } hw_module_t; typedef struct hw_module_methods_t { int (*open)(const struct hw_module_t* module, const char* id, struct hw_device_t** device); } hw_module_methods_t; typedef struct hw_device_t { uint32_t tag; uint32_t version; struct hw_module_t* module; uint32_t reserved[12]; int (*close)(struct hw_device_t* device); } hw_device_t; # 118 "hardware/libhardware/include/hardware/hardware.h" int hw_get_module(const char *id, const struct hw_module_t **module); enum { HAL_PIXEL_FORMAT_RGBA_8888 = 1, HAL_PIXEL_FORMAT_RGBX_8888 = 2, HAL_PIXEL_FORMAT_RGB_888 = 3, HAL_PIXEL_FORMAT_RGB_565 = 4, HAL_PIXEL_FORMAT_BGRA_8888 = 5, HAL_PIXEL_FORMAT_RGBA_5551 = 6, HAL_PIXEL_FORMAT_RGBA_4444 = 7, # 171 "hardware/libhardware/include/hardware/hardware.h" HAL_PIXEL_FORMAT_YV12 = 0x32315659, HAL_PIXEL_FORMAT_YCbCr_422_SP = 0x10, HAL_PIXEL_FORMAT_YCrCb_420_SP = 0x11, HAL_PIXEL_FORMAT_YCbCr_422_I = 0x14, }; # 190 "hardware/libhardware/include/hardware/hardware.h" enum { HAL_TRANSFORM_FLIP_H = 0x01, HAL_TRANSFORM_FLIP_V = 0x02, HAL_TRANSFORM_ROT_90 = 0x04, HAL_TRANSFORM_ROT_180 = 0x03, HAL_TRANSFORM_ROT_270 = 0x07, }; } # 21 "hardware/libhardware/include/hardware/copybit.h" 2 extern "C" { # 41 "hardware/libhardware/include/hardware/copybit.h" enum { COPYBIT_FORMAT_RGBA_8888 = HAL_PIXEL_FORMAT_RGBA_8888, COPYBIT_FORMAT_RGBX_8888 = HAL_PIXEL_FORMAT_RGBX_8888, COPYBIT_FORMAT_RGB_888 = HAL_PIXEL_FORMAT_RGB_888, COPYBIT_FORMAT_RGB_565 = HAL_PIXEL_FORMAT_RGB_565, COPYBIT_FORMAT_BGRA_8888 = HAL_PIXEL_FORMAT_BGRA_8888, COPYBIT_FORMAT_RGBA_5551 = HAL_PIXEL_FORMAT_RGBA_5551, COPYBIT_FORMAT_RGBA_4444 = HAL_PIXEL_FORMAT_RGBA_4444, COPYBIT_FORMAT_YCbCr_422_SP = 0x10, COPYBIT_FORMAT_YCrCb_420_SP = 0x11, }; enum { COPYBIT_ROTATION_DEG = 1, COPYBIT_PLANE_ALPHA = 2, COPYBIT_DITHER = 3, COPYBIT_TRANSFORM = 4, COPYBIT_BLUR = 5 }; enum { COPYBIT_TRANSFORM_FLIP_H = HAL_TRANSFORM_FLIP_H, COPYBIT_TRANSFORM_FLIP_V = HAL_TRANSFORM_FLIP_V, COPYBIT_TRANSFORM_ROT_90 = HAL_TRANSFORM_ROT_90, COPYBIT_TRANSFORM_ROT_180 = HAL_TRANSFORM_ROT_180, COPYBIT_TRANSFORM_ROT_270 = HAL_TRANSFORM_ROT_270, }; enum { COPYBIT_DISABLE = 0, COPYBIT_ENABLE = 1 }; enum { COPYBIT_MINIFICATION_LIMIT = 1, COPYBIT_MAGNIFICATION_LIMIT = 2, COPYBIT_SCALING_FRAC_BITS = 3, COPYBIT_ROTATION_STEP_DEG = 4, }; struct copybit_image_t { uint32_t w; uint32_t h; int32_t format; void *base; native_handle_t* handle; }; struct copybit_rect_t { int l; int t; int r; int b; }; struct copybit_region_t { int (*next)(struct copybit_region_t const *region, struct copybit_rect_t *rect); }; struct copybit_module_t { struct hw_module_t common; }; struct copybit_device_t { struct hw_device_t common; # 156 "hardware/libhardware/include/hardware/copybit.h" int (*set_parameter)(struct copybit_device_t *dev, int name, int value); # 166 "hardware/libhardware/include/hardware/copybit.h" int (*get)(struct copybit_device_t *dev, int name); # 178 "hardware/libhardware/include/hardware/copybit.h" int (*blit)(struct copybit_device_t *dev, struct copybit_image_t const *dst, struct copybit_image_t const *src, struct copybit_region_t const *region); # 195 "hardware/libhardware/include/hardware/copybit.h" int (*stretch)(struct copybit_device_t *dev, struct copybit_image_t const *dst, struct copybit_image_t const *src, struct copybit_rect_t const *dst_rect, struct copybit_rect_t const *src_rect, struct copybit_region_t const *region); }; static inline int copybit_open(const struct hw_module_t* module, struct copybit_device_t** device) { return module->methods->open(module, "copybit0", (struct hw_device_t**)device); } static inline int copybit_close(struct copybit_device_t* device) { return device->common.close(&device->common); } } # 30 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "hardware/libhardware/include/hardware/gralloc.h" 1 # 29 "hardware/libhardware/include/hardware/gralloc.h" extern "C" { # 43 "hardware/libhardware/include/hardware/gralloc.h" enum { GRALLOC_USAGE_SW_READ_NEVER = 0x00000000, GRALLOC_USAGE_SW_READ_RARELY = 0x00000002, GRALLOC_USAGE_SW_READ_OFTEN = 0x00000003, GRALLOC_USAGE_SW_READ_MASK = 0x0000000F, GRALLOC_USAGE_SW_WRITE_NEVER = 0x00000000, GRALLOC_USAGE_SW_WRITE_RARELY = 0x00000020, GRALLOC_USAGE_SW_WRITE_OFTEN = 0x00000030, GRALLOC_USAGE_SW_WRITE_MASK = 0x000000F0, GRALLOC_USAGE_HW_TEXTURE = 0x00000100, GRALLOC_USAGE_HW_RENDER = 0x00000200, GRALLOC_USAGE_HW_2D = 0x00000400, GRALLOC_USAGE_HW_FB = 0x00001000, GRALLOC_USAGE_HW_MASK = 0x00001F00, GRALLOC_USAGE_PRIVATE_0 = 0x10000000, GRALLOC_USAGE_PRIVATE_1 = 0x20000000, GRALLOC_USAGE_PRIVATE_2 = 0x40000000, GRALLOC_USAGE_PRIVATE_3 = 0x80000000, GRALLOC_USAGE_PRIVATE_MASK = 0xF0000000, }; typedef const native_handle* buffer_handle_t; enum { GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER = 0x080000001, }; typedef struct gralloc_module_t { struct hw_module_t common; # 116 "hardware/libhardware/include/hardware/gralloc.h" int (*registerBuffer)(struct gralloc_module_t const* module, buffer_handle_t handle); # 131 "hardware/libhardware/include/hardware/gralloc.h" int (*unregisterBuffer)(struct gralloc_module_t const* module, buffer_handle_t handle); # 165 "hardware/libhardware/include/hardware/gralloc.h" int (*lock)(struct gralloc_module_t const* module, buffer_handle_t handle, int usage, int l, int t, int w, int h, void** vaddr); int (*unlock)(struct gralloc_module_t const* module, buffer_handle_t handle); int (*perform)(struct gralloc_module_t const* module, int operation, ... ); void* reserved_proc[7]; } gralloc_module_t; # 195 "hardware/libhardware/include/hardware/gralloc.h" typedef struct alloc_device_t { struct hw_device_t common; # 208 "hardware/libhardware/include/hardware/gralloc.h" int (*alloc)(struct alloc_device_t* dev, int w, int h, int format, int usage, buffer_handle_t* handle, int* stride); # 222 "hardware/libhardware/include/hardware/gralloc.h" int (*free)(struct alloc_device_t* dev, buffer_handle_t handle); } alloc_device_t; typedef struct framebuffer_device_t { struct hw_device_t common; const uint32_t flags; const uint32_t width; const uint32_t height; const int stride; const int format; const float xdpi; const float ydpi; const float fps; const int minSwapInterval; const int maxSwapInterval; int reserved[8]; int (*setSwapInterval)(struct framebuffer_device_t* window, int interval); # 287 "hardware/libhardware/include/hardware/gralloc.h" int (*setUpdateRect)(struct framebuffer_device_t* window, int left, int top, int width, int height); # 309 "hardware/libhardware/include/hardware/gralloc.h" int (*post)(struct framebuffer_device_t* dev, buffer_handle_t buffer); int (*compositionComplete)(struct framebuffer_device_t* dev); void* reserved_proc[8]; } framebuffer_device_t; static inline int gralloc_open(const struct hw_module_t* module, struct alloc_device_t** device) { return module->methods->open(module, "gpu0", (struct hw_device_t**)device); } static inline int gralloc_close(struct alloc_device_t* device) { return device->common.close(&device->common); } static inline int framebuffer_open(const struct hw_module_t* module, struct framebuffer_device_t** device) { return module->methods->open(module, "fb0", (struct hw_device_t**)device); } static inline int framebuffer_close(struct framebuffer_device_t* device) { return device->common.close(&device->common); } } # 31 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "frameworks/base/opengl/include/GLES/gl.h" 1 # 1 "frameworks/base/opengl/include/GLES/glplatform.h" 1 # 20 "frameworks/base/opengl/include/GLES/glplatform.h" # 1 "frameworks/base/opengl/include/KHR/khrplatform.h" 1 # 134 "frameworks/base/opengl/include/KHR/khrplatform.h" typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; typedef int64_t khronos_int64_t; typedef uint64_t khronos_uint64_t; # 212 "frameworks/base/opengl/include/KHR/khrplatform.h" typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; typedef signed long int khronos_intptr_t; typedef unsigned long int khronos_uintptr_t; typedef signed long int khronos_ssize_t; typedef unsigned long int khronos_usize_t; typedef float khronos_float_t; # 238 "frameworks/base/opengl/include/KHR/khrplatform.h" typedef khronos_uint64_t khronos_utime_nanoseconds_t; typedef khronos_int64_t khronos_stime_nanoseconds_t; # 21 "frameworks/base/opengl/include/GLES/glplatform.h" 2 # 7 "frameworks/base/opengl/include/GLES/gl.h" 2 extern "C" { typedef void GLvoid; typedef char GLchar; typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef khronos_int8_t GLbyte; typedef short GLshort; typedef int GLint; typedef int GLsizei; typedef khronos_uint8_t GLubyte; typedef unsigned short GLushort; typedef unsigned int GLuint; typedef khronos_float_t GLfloat; typedef khronos_float_t GLclampf; typedef khronos_int32_t GLfixed; typedef khronos_int32_t GLclampx; typedef khronos_intptr_t GLintptr; typedef khronos_ssize_t GLsizeiptr; # 593 "frameworks/base/opengl/include/GLES/gl.h" __attribute__((visibility("default"))) void glAlphaFunc (GLenum func, GLclampf ref); __attribute__((visibility("default"))) void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); __attribute__((visibility("default"))) void glClearDepthf (GLclampf depth); __attribute__((visibility("default"))) void glClipPlanef (GLenum plane, const GLfloat *equation); __attribute__((visibility("default"))) void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); __attribute__((visibility("default"))) void glDepthRangef (GLclampf zNear, GLclampf zFar); __attribute__((visibility("default"))) void glFogf (GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glFogfv (GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); __attribute__((visibility("default"))) void glGetClipPlanef (GLenum pname, GLfloat eqn[4]); __attribute__((visibility("default"))) void glGetFloatv (GLenum pname, GLfloat *params); __attribute__((visibility("default"))) void glGetLightfv (GLenum light, GLenum pname, GLfloat *params); __attribute__((visibility("default"))) void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); __attribute__((visibility("default"))) void glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params); __attribute__((visibility("default"))) void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); __attribute__((visibility("default"))) void glLightModelf (GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glLightModelfv (GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glLightf (GLenum light, GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glLightfv (GLenum light, GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glLineWidth (GLfloat width); __attribute__((visibility("default"))) void glLoadMatrixf (const GLfloat *m); __attribute__((visibility("default"))) void glMaterialf (GLenum face, GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glMultMatrixf (const GLfloat *m); __attribute__((visibility("default"))) void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); __attribute__((visibility("default"))) void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); __attribute__((visibility("default"))) void glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); __attribute__((visibility("default"))) void glPointParameterf (GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glPointParameterfv (GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glPointSize (GLfloat size); __attribute__((visibility("default"))) void glPolygonOffset (GLfloat factor, GLfloat units); __attribute__((visibility("default"))) void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); __attribute__((visibility("default"))) void glScalef (GLfloat x, GLfloat y, GLfloat z); __attribute__((visibility("default"))) void glTexEnvf (GLenum target, GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glTexParameterf (GLenum target, GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glTranslatef (GLfloat x, GLfloat y, GLfloat z); __attribute__((visibility("default"))) void glActiveTexture (GLenum texture); __attribute__((visibility("default"))) void glAlphaFuncx (GLenum func, GLclampx ref); __attribute__((visibility("default"))) void glBindBuffer (GLenum target, GLuint buffer); __attribute__((visibility("default"))) void glBindTexture (GLenum target, GLuint texture); __attribute__((visibility("default"))) void glBlendFunc (GLenum sfactor, GLenum dfactor); __attribute__((visibility("default"))) void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); __attribute__((visibility("default"))) void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); __attribute__((visibility("default"))) void glClear (GLbitfield mask); __attribute__((visibility("default"))) void glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); __attribute__((visibility("default"))) void glClearDepthx (GLclampx depth); __attribute__((visibility("default"))) void glClearStencil (GLint s); __attribute__((visibility("default"))) void glClientActiveTexture (GLenum texture); __attribute__((visibility("default"))) void glClipPlanex (GLenum plane, const GLfixed *equation); __attribute__((visibility("default"))) void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); __attribute__((visibility("default"))) void glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); __attribute__((visibility("default"))) void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); __attribute__((visibility("default"))) void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); __attribute__((visibility("default"))) void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); __attribute__((visibility("default"))) void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); __attribute__((visibility("default"))) void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); __attribute__((visibility("default"))) void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); __attribute__((visibility("default"))) void glCullFace (GLenum mode); __attribute__((visibility("default"))) void glDeleteBuffers (GLsizei n, const GLuint *buffers); __attribute__((visibility("default"))) void glDeleteTextures (GLsizei n, const GLuint *textures); __attribute__((visibility("default"))) void glDepthFunc (GLenum func); __attribute__((visibility("default"))) void glDepthMask (GLboolean flag); __attribute__((visibility("default"))) void glDepthRangex (GLclampx zNear, GLclampx zFar); __attribute__((visibility("default"))) void glDisable (GLenum cap); __attribute__((visibility("default"))) void glDisableClientState (GLenum array); __attribute__((visibility("default"))) void glDrawArrays (GLenum mode, GLint first, GLsizei count); __attribute__((visibility("default"))) void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); __attribute__((visibility("default"))) void glEnable (GLenum cap); __attribute__((visibility("default"))) void glEnableClientState (GLenum array); __attribute__((visibility("default"))) void glFinish (void); __attribute__((visibility("default"))) void glFlush (void); __attribute__((visibility("default"))) void glFogx (GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glFogxv (GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glFrontFace (GLenum mode); __attribute__((visibility("default"))) void glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); __attribute__((visibility("default"))) void glGetBooleanv (GLenum pname, GLboolean *params); __attribute__((visibility("default"))) void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); __attribute__((visibility("default"))) void glGetClipPlanex (GLenum pname, GLfixed eqn[4]); __attribute__((visibility("default"))) void glGenBuffers (GLsizei n, GLuint *buffers); __attribute__((visibility("default"))) void glGenTextures (GLsizei n, GLuint *textures); __attribute__((visibility("default"))) GLenum glGetError (void); __attribute__((visibility("default"))) void glGetFixedv (GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetIntegerv (GLenum pname, GLint *params); __attribute__((visibility("default"))) void glGetLightxv (GLenum light, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetPointerv (GLenum pname, GLvoid **params); __attribute__((visibility("default"))) const GLubyte * glGetString (GLenum name); __attribute__((visibility("default"))) void glGetTexEnviv (GLenum env, GLenum pname, GLint *params); __attribute__((visibility("default"))) void glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); __attribute__((visibility("default"))) void glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glHint (GLenum target, GLenum mode); __attribute__((visibility("default"))) GLboolean glIsBuffer (GLuint buffer); __attribute__((visibility("default"))) GLboolean glIsEnabled (GLenum cap); __attribute__((visibility("default"))) GLboolean glIsTexture (GLuint texture); __attribute__((visibility("default"))) void glLightModelx (GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glLightModelxv (GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glLightx (GLenum light, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glLightxv (GLenum light, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glLineWidthx (GLfixed width); __attribute__((visibility("default"))) void glLoadIdentity (void); __attribute__((visibility("default"))) void glLoadMatrixx (const GLfixed *m); __attribute__((visibility("default"))) void glLogicOp (GLenum opcode); __attribute__((visibility("default"))) void glMaterialx (GLenum face, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glMatrixMode (GLenum mode); __attribute__((visibility("default"))) void glMultMatrixx (const GLfixed *m); __attribute__((visibility("default"))) void glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); __attribute__((visibility("default"))) void glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); __attribute__((visibility("default"))) void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); __attribute__((visibility("default"))) void glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); __attribute__((visibility("default"))) void glPixelStorei (GLenum pname, GLint param); __attribute__((visibility("default"))) void glPointParameterx (GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glPointParameterxv (GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glPointSizex (GLfixed size); __attribute__((visibility("default"))) void glPolygonOffsetx (GLfixed factor, GLfixed units); __attribute__((visibility("default"))) void glPopMatrix (void); __attribute__((visibility("default"))) void glPushMatrix (void); __attribute__((visibility("default"))) void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); __attribute__((visibility("default"))) void glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); __attribute__((visibility("default"))) void glSampleCoverage (GLclampf value, GLboolean invert); __attribute__((visibility("default"))) void glSampleCoveragex (GLclampx value, GLboolean invert); __attribute__((visibility("default"))) void glScalex (GLfixed x, GLfixed y, GLfixed z); __attribute__((visibility("default"))) void glScissor (GLint x, GLint y, GLsizei width, GLsizei height); __attribute__((visibility("default"))) void glShadeModel (GLenum mode); __attribute__((visibility("default"))) void glStencilFunc (GLenum func, GLint ref, GLuint mask); __attribute__((visibility("default"))) void glStencilMask (GLuint mask); __attribute__((visibility("default"))) void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); __attribute__((visibility("default"))) void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); __attribute__((visibility("default"))) void glTexEnvi (GLenum target, GLenum pname, GLint param); __attribute__((visibility("default"))) void glTexEnvx (GLenum target, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glTexEnviv (GLenum target, GLenum pname, const GLint *params); __attribute__((visibility("default"))) void glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); __attribute__((visibility("default"))) void glTexParameteri (GLenum target, GLenum pname, GLint param); __attribute__((visibility("default"))) void glTexParameterx (GLenum target, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glTexParameteriv (GLenum target, GLenum pname, const GLint *params); __attribute__((visibility("default"))) void glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); __attribute__((visibility("default"))) void glTranslatex (GLfixed x, GLfixed y, GLfixed z); __attribute__((visibility("default"))) void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); __attribute__((visibility("default"))) void glViewport (GLint x, GLint y, GLsizei width, GLsizei height); # 757 "frameworks/base/opengl/include/GLES/gl.h" __attribute__((visibility("default"))) void glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer); # 766 "frameworks/base/opengl/include/GLES/gl.h" } # 33 "frameworks/base/include/private/opengles/gl_context.h" 2 # 1 "frameworks/base/opengl/include/GLES/glext.h" 1 extern "C" { # 68 "frameworks/base/opengl/include/GLES/glext.h" typedef void* GLeglImageOES; # 433 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); typedef void (* PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); __attribute__((visibility("default"))) void glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); typedef void (* PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); __attribute__((visibility("default"))) void glBlendEquationOES (GLenum mode); typedef void (* PFNGLBLENDEQUATIONOESPROC) (GLenum mode); # 480 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); __attribute__((visibility("default"))) void glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); __attribute__((visibility("default"))) void glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); __attribute__((visibility("default"))) void glDrawTexsvOES (const GLshort *coords); __attribute__((visibility("default"))) void glDrawTexivOES (const GLint *coords); __attribute__((visibility("default"))) void glDrawTexxvOES (const GLfixed *coords); __attribute__((visibility("default"))) void glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); __attribute__((visibility("default"))) void glDrawTexfvOES (const GLfloat *coords); typedef void (* PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); typedef void (* PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); typedef void (* PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); typedef void (* PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); typedef void (* PFNGLDRAWTEXIVOESPROC) (const GLint *coords); typedef void (* PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); typedef void (* PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); typedef void (* PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); __attribute__((visibility("default"))) void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); __attribute__((visibility("default"))) void glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); typedef void (* PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); typedef void (* PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); # 529 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glAlphaFuncxOES (GLenum func, GLclampx ref); __attribute__((visibility("default"))) void glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); __attribute__((visibility("default"))) void glClearDepthxOES (GLclampx depth); __attribute__((visibility("default"))) void glClipPlanexOES (GLenum plane, const GLfixed *equation); __attribute__((visibility("default"))) void glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); __attribute__((visibility("default"))) void glDepthRangexOES (GLclampx zNear, GLclampx zFar); __attribute__((visibility("default"))) void glFogxOES (GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glFogxvOES (GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); __attribute__((visibility("default"))) void glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]); __attribute__((visibility("default"))) void glGetFixedvOES (GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); __attribute__((visibility("default"))) void glLightModelxOES (GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glLightModelxvOES (GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glLightxOES (GLenum light, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glLineWidthxOES (GLfixed width); __attribute__((visibility("default"))) void glLoadMatrixxOES (const GLfixed *m); __attribute__((visibility("default"))) void glMaterialxOES (GLenum face, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glMultMatrixxOES (const GLfixed *m); __attribute__((visibility("default"))) void glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); __attribute__((visibility("default"))) void glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); __attribute__((visibility("default"))) void glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); __attribute__((visibility("default"))) void glPointParameterxOES (GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glPointParameterxvOES (GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glPointSizexOES (GLfixed size); __attribute__((visibility("default"))) void glPolygonOffsetxOES (GLfixed factor, GLfixed units); __attribute__((visibility("default"))) void glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); __attribute__((visibility("default"))) void glSampleCoveragexOES (GLclampx value, GLboolean invert); __attribute__((visibility("default"))) void glScalexOES (GLfixed x, GLfixed y, GLfixed z); __attribute__((visibility("default"))) void glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); typedef void (* PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref); typedef void (* PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); typedef void (* PFNGLCLEARDEPTHXOESPROC) (GLclampx depth); typedef void (* PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); typedef void (* PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); typedef void (* PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar); typedef void (* PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); typedef void (* PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params); typedef void (* PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); typedef void (* PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]); typedef void (* PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); typedef void (* PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); typedef void (* PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); typedef void (* PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params); typedef void (* PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); typedef void (* PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); typedef void (* PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params); typedef void (* PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); typedef void (* PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); typedef void (* PFNGLLINEWIDTHXOESPROC) (GLfixed width); typedef void (* PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); typedef void (* PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); typedef void (* PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params); typedef void (* PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); typedef void (* PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); typedef void (* PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); typedef void (* PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); typedef void (* PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); typedef void (* PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); typedef void (* PFNGLPOINTSIZEXOESPROC) (GLfixed size); typedef void (* PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); typedef void (* PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); typedef void (* PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); typedef void (* PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); typedef void (* PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); typedef void (* PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); typedef void (* PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); typedef void (* PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); typedef void (* PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); __attribute__((visibility("default"))) GLboolean glIsRenderbufferOES (GLuint renderbuffer); __attribute__((visibility("default"))) void glBindRenderbufferOES (GLenum target, GLuint renderbuffer); __attribute__((visibility("default"))) void glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers); __attribute__((visibility("default"))) void glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers); __attribute__((visibility("default"))) void glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); __attribute__((visibility("default"))) void glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params); __attribute__((visibility("default"))) GLboolean glIsFramebufferOES (GLuint framebuffer); __attribute__((visibility("default"))) void glBindFramebufferOES (GLenum target, GLuint framebuffer); __attribute__((visibility("default"))) void glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers); __attribute__((visibility("default"))) void glGenFramebuffersOES (GLsizei n, GLuint* framebuffers); __attribute__((visibility("default"))) GLenum glCheckFramebufferStatusOES (GLenum target); __attribute__((visibility("default"))) void glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); __attribute__((visibility("default"))) void glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); __attribute__((visibility("default"))) void glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params); __attribute__((visibility("default"))) void glGenerateMipmapOES (GLenum target); typedef GLboolean (* PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); typedef void (* PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); typedef void (* PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); typedef void (* PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); typedef void (* PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); typedef void (* PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); typedef GLboolean (* PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); typedef void (* PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); typedef void (* PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); typedef void (* PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); typedef GLenum (* PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); typedef void (* PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void (* PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (* PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); typedef void (* PFNGLGENERATEMIPMAPOESPROC) (GLenum target); __attribute__((visibility("default"))) void* glMapBufferOES (GLenum target, GLenum access); __attribute__((visibility("default"))) GLboolean glUnmapBufferOES (GLenum target); __attribute__((visibility("default"))) void glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params); typedef void* (* PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); typedef GLboolean (* PFNGLUNMAPBUFFEROESPROC) (GLenum target); typedef void (* PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params); # 669 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); __attribute__((visibility("default"))) void glLoadPaletteFromModelViewMatrixOES (void); __attribute__((visibility("default"))) void glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); __attribute__((visibility("default"))) void glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (* PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); typedef void (* PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); typedef void (* PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (* PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); # 689 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) GLbitfield glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]); typedef GLbitfield (* PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]); # 703 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glDepthRangefOES (GLclampf zNear, GLclampf zFar); __attribute__((visibility("default"))) void glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); __attribute__((visibility("default"))) void glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); __attribute__((visibility("default"))) void glClipPlanefOES (GLenum plane, const GLfloat *equation); __attribute__((visibility("default"))) void glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); __attribute__((visibility("default"))) void glClearDepthfOES (GLclampf depth); typedef void (* PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar); typedef void (* PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); typedef void (* PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); typedef void (* PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); typedef void (* PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]); typedef void (* PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); # 742 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); __attribute__((visibility("default"))) void glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); __attribute__((visibility("default"))) void glTexGeniOES (GLenum coord, GLenum pname, GLint param); __attribute__((visibility("default"))) void glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); __attribute__((visibility("default"))) void glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); __attribute__((visibility("default"))) void glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); __attribute__((visibility("default"))) void glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); __attribute__((visibility("default"))) void glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); __attribute__((visibility("default"))) void glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); typedef void (* PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); typedef void (* PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); typedef void (* PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); typedef void (* PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); typedef void (* PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); typedef void (* PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); typedef void (* PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); typedef void (* PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); typedef void (* PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); # 777 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glBindVertexArrayOES (GLuint array); __attribute__((visibility("default"))) void glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); __attribute__((visibility("default"))) void glGenVertexArraysOES (GLsizei n, GLuint *arrays); __attribute__((visibility("default"))) GLboolean glIsVertexArrayOES (GLuint array); typedef void (* PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); typedef void (* PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); typedef void (* PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); typedef GLboolean (* PFNGLISVERTEXARRAYOESPROC) (GLuint array); # 829 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); typedef void (* PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); __attribute__((visibility("default"))) void glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); __attribute__((visibility("default"))) void glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); typedef void (* PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (* PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); # 888 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glClipPlanefIMG (GLenum p, const GLfloat *eqn); __attribute__((visibility("default"))) void glClipPlanexIMG (GLenum p, const GLfixed *eqn); typedef void (* PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); typedef void (* PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); __attribute__((visibility("default"))) void glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); __attribute__((visibility("default"))) void glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); typedef void (* PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); typedef void (* PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); # 914 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glDeleteFencesNV (GLsizei n, const GLuint *fences); __attribute__((visibility("default"))) void glGenFencesNV (GLsizei n, GLuint *fences); __attribute__((visibility("default"))) GLboolean glIsFenceNV (GLuint fence); __attribute__((visibility("default"))) GLboolean glTestFenceNV (GLuint fence); __attribute__((visibility("default"))) void glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); __attribute__((visibility("default"))) void glFinishFenceNV (GLuint fence); __attribute__((visibility("default"))) void glSetFenceNV (GLuint fence, GLenum condition); typedef void (* PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); typedef void (* PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef GLboolean (* PFNGLISFENCENVPROC) (GLuint fence); typedef GLboolean (* PFNGLTESTFENCENVPROC) (GLuint fence); typedef void (* PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); typedef void (* PFNGLFINISHFENCENVPROC) (GLuint fence); typedef void (* PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); # 939 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); __attribute__((visibility("default"))) void glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); __attribute__((visibility("default"))) void glEnableDriverControlQCOM (GLuint driverControl); __attribute__((visibility("default"))) void glDisableDriverControlQCOM (GLuint driverControl); typedef void (* PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); typedef void (* PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); typedef void (* PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); typedef void (* PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); __attribute__((visibility("default"))) void glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); __attribute__((visibility("default"))) void glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); __attribute__((visibility("default"))) void glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); __attribute__((visibility("default"))) void glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); __attribute__((visibility("default"))) void glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); __attribute__((visibility("default"))) void glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); __attribute__((visibility("default"))) void glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); __attribute__((visibility("default"))) void glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); typedef void (* PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); typedef void (* PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); typedef void (* PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); typedef void (* PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); typedef void (* PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); typedef void (* PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); typedef void (* PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); typedef void (* PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); __attribute__((visibility("default"))) void glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); __attribute__((visibility("default"))) void glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); __attribute__((visibility("default"))) GLboolean glExtIsProgramBinaryQCOM (GLuint program); __attribute__((visibility("default"))) void glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); typedef void (* PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); typedef void (* PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); typedef GLboolean (* PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); typedef void (* PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); # 1002 "frameworks/base/opengl/include/GLES/glext.h" __attribute__((visibility("default"))) void glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); __attribute__((visibility("default"))) void glEndTilingQCOM (GLbitfield preserveMask); typedef void (* PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); typedef void (* PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); } # 34 "frameworks/base/include/private/opengles/gl_context.h" 2 struct android_native_buffer_t; namespace android { const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10 + 1 ; class EGLTextureObject; class EGLSurfaceManager; class EGLBufferObjectManager; namespace gl { struct ogles_context_t; struct matrixx_t; struct transform_t; struct buffer_t; ogles_context_t* getGlContext(); template static inline void swap(T& a, T& b) { T t(a); a = b; b = t; } template inline T max(T a, T b) { return a inline T max(T a, T b, T c) { return max(a, max(b, c)); } template inline T min(T a, T b) { return a inline T min(T a, T b, T c) { return min(a, min(b, c)); } template inline T min(T a, T b, T c, T d) { return min(min(a,b), min(c,d)); } struct vec3_t { union { struct { GLfixed x, y, z; }; struct { GLfixed r, g, b; }; struct { GLfixed S, T, R; }; GLfixed v[3]; }; }; struct vec4_t { union { struct { GLfixed x, y, z, w; }; struct { GLfixed r, g, b, a; }; struct { GLfixed S, T, R, Q; }; GLfixed v[4]; }; }; struct vertex_t { enum { CLIP_L = 0x0001, CLIP_R = 0x0002, CLIP_B = 0x0004, CLIP_T = 0x0008, CLIP_N = 0x0010, CLIP_F = 0x0020, EYE = 0x0040, RESERVED = 0x0080, USER_CLIP_0 = 0x0100, USER_CLIP_1 = 0x0200, USER_CLIP_2 = 0x0400, USER_CLIP_3 = 0x0800, USER_CLIP_4 = 0x1000, USER_CLIP_5 = 0x2000, LIT = 0x4000, TT = 0x8000, FRUSTUM_CLIP_ALL= 0x003F, USER_CLIP_ALL = 0x3F00, CLIP_ALL = 0x3F3F, }; union { vec4_t obj; vec4_t eye; }; vec4_t clip; uint32_t flags; size_t index; GLfixed fog; uint8_t locked; uint8_t mru; uint8_t reserved[2]; vec4_t window; vec4_t color; vec4_t texture[GGL_TEXTURE_UNIT_COUNT]; uint32_t reserved1[4]; inline void clear() { flags = index = locked = mru = 0; } }; struct point_size_t { GGLcoord size; GLboolean smooth; }; struct line_width_t { GGLcoord width; GLboolean smooth; }; struct polygon_offset_t { GLfixed factor; GLfixed units; GLboolean enable; }; struct array_t { typedef void (*fetcher_t)(ogles_context_t*, GLfixed*, const GLvoid*); fetcher_t fetch; GLvoid const* physical_pointer; GLint size; GLsizei stride; GLvoid const* pointer; buffer_t const* bo; uint16_t type; GLboolean enable; GLboolean pad; GLsizei bounds; void init(GLint, GLenum, GLsizei, const GLvoid *, const buffer_t*, GLsizei); inline void resolve(); inline const GLubyte* element(GLint i) const { return (const GLubyte*)physical_pointer + i * stride; } }; struct array_machine_t { array_t vertex; array_t normal; array_t color; array_t texture[GGL_TEXTURE_UNIT_COUNT]; uint8_t activeTexture; uint8_t tmu; uint16_t cull; uint32_t flags; GLenum indicesType; buffer_t const* array_buffer; buffer_t const* element_array_buffer; void (*compileElements)(ogles_context_t*, vertex_t*, GLint, GLsizei); void (*compileElement)(ogles_context_t*, vertex_t*, GLint); void (*mvp_transform)(transform_t const*, vec4_t*, vec4_t const*); void (*mv_transform)(transform_t const*, vec4_t*, vec4_t const*); void (*tex_transform[2])(transform_t const*, vec4_t*, vec4_t const*); void (*perspective)(ogles_context_t*c, vertex_t* v); void (*clipVertex)(ogles_context_t* c, vertex_t* nv, GGLfixed t, const vertex_t* s, const vertex_t* p); void (*clipEye)(ogles_context_t* c, vertex_t* nv, GGLfixed t, const vertex_t* s, const vertex_t* p); }; struct vertex_cache_t { enum { VERTEX_BUFFER_SIZE = 8, VERTEX_CACHE_SIZE = 64, INDEX_BITS = 16, INDEX_MASK = ((1LU< 88.0f) { u.r = __builtin_inf(); } else { const float kOneOverLogTwo = (1L<<23) / 0.69314718055994530942; const int32_t kExponentBias = 127L<<23; const int32_t e = int32_t(y*kOneOverLogTwo); u.i = e + kExponentBias; } return u.r; } bool cmpf(GLfloat a, GLfloat b) { union { float f; uint32_t i; } ua, ub; ua.f = a; ub.f = b; return ua.i == ub.i; } bool isZerof(GLfloat v) { union { float f; int32_t i; }; f = v; return (i<<1) == 0; } bool isOnef(GLfloat v) { return cmpf(v, 1.0f); } int isZeroOrNegativef(GLfloat v) { union { float f; int32_t i; }; f = v; return isZerof(v) | (i>>31); } int exponent(GLfloat v) { union { float f; uint32_t i; }; f = v; return ((i << 1) >> 24) - 127; } int32_t mantissa(GLfloat v) { union { float f; uint32_t i; }; f = v; if (!(i&0x7F800000)) return 0; const int s = i >> 31; i |= (1L<<23); i &= ~0xFF000000; return s ? -i : i; } GLfloat clampToZerof(GLfloat v) { union { float f; int32_t i; }; f = v; i &= ~(i>>31); return f; } GLfloat reciprocalf(GLfloat v) { return 1.0f / v; } GLfloat rsqrtf(GLfloat v) { return 1.0f / sqrtf(v); } GLfloat sqrf(GLfloat v) { return v*v; } GLfloat addExpf(GLfloat v, int e) { union { float f; int32_t i; }; f = v; if (i<<1) { i += int32_t(e)<<23; } return f; } GLfloat mul2f(GLfloat v) { return addExpf(v, 1); } GLfloat div2f(GLfloat v) { return addExpf(v, -1); } GLfloat absf(GLfloat v) { union { float f; int32_t i; }; f = v; i &= ~0x80000000; return f; } }; }; # 23 "frameworks/base/opengl/libagl/matrix.cpp" 2 # 1 "frameworks/base/opengl/libagl/state.h" 1 # 22 "frameworks/base/opengl/libagl/state.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 23 "frameworks/base/opengl/libagl/state.h" 2 # 31 "frameworks/base/opengl/libagl/state.h" namespace android { ogles_context_t *ogles_init(size_t extra); void ogles_uninit(ogles_context_t* c); void _ogles_error(ogles_context_t* c, GLenum error); # 51 "frameworks/base/opengl/libagl/state.h" }; # 24 "frameworks/base/opengl/libagl/matrix.cpp" 2 # 1 "frameworks/base/opengl/libagl/matrix.h" 1 # 22 "frameworks/base/opengl/libagl/matrix.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 23 "frameworks/base/opengl/libagl/matrix.h" 2 # 1 "frameworks/base/include/utils/Log.h" 1 # 31 "frameworks/base/include/utils/Log.h" # 1 "system/core/include/cutils/log.h" 1 # 34 "system/core/include/cutils/log.h" # 1 "bionic/libc/include/unistd.h" 1 # 31 "bionic/libc/include/unistd.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 32 "bionic/libc/include/unistd.h" 2 # 1 "bionic/libc/include/sys/select.h" 1 # 36 "bionic/libc/include/sys/select.h" extern "C" { typedef __kernel_fd_set fd_set; extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); extern int pselect(int n, fd_set *readfds, fd_set *writefds, fd_set *errfds, const struct timespec *timeout, const sigset_t *sigmask); } # 35 "bionic/libc/include/unistd.h" 2 # 1 "bionic/libc/include/sys/sysconf.h" 1 # 33 "bionic/libc/include/sys/sysconf.h" extern "C" { # 131 "bionic/libc/include/sys/sysconf.h" extern int sysconf (int name); } # 36 "bionic/libc/include/unistd.h" 2 # 1 "bionic/libc/kernel/common/linux/capability.h" 1 # 20 "bionic/libc/kernel/common/linux/capability.h" typedef struct __user_cap_header_struct { __u32 version; int pid; } *cap_user_header_t; typedef struct __user_cap_data_struct { __u32 effective; __u32 permitted; __u32 inheritable; } *cap_user_data_t; # 37 "bionic/libc/include/unistd.h" 2 # 1 "bionic/libc/include/pathconf.h" 1 # 33 "bionic/libc/include/pathconf.h" extern "C" { # 58 "bionic/libc/include/pathconf.h" extern long fpathconf(int fildes, int name); extern long pathconf(const char *path, int name); } # 38 "bionic/libc/include/unistd.h" 2 extern "C" { # 51 "bionic/libc/include/unistd.h" extern char **environ; extern __attribute__((__noreturn__)) void _exit(int); extern pid_t fork(void); extern pid_t vfork(void); extern pid_t getpid(void); extern pid_t gettid(void); extern pid_t getpgid(pid_t); extern int setpgid(pid_t, pid_t); extern pid_t getppid(void); extern pid_t getpgrp(void); extern int setpgrp(void); extern pid_t setsid(void); extern int execv(const char *, char * const *); extern int execvp(const char *, char * const *); extern int execve(const char *, char * const *, char * const *); extern int execl(const char *, const char *, ...); extern int execlp(const char *, const char *, ...); extern int execle(const char *, const char *, ...); extern int capget(cap_user_header_t hdrp, cap_user_data_t datap); extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap); extern int prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5); extern int nice(int); extern int setuid(uid_t); extern uid_t getuid(void); extern int seteuid(uid_t); extern uid_t geteuid(void); extern int setgid(gid_t); extern gid_t getgid(void); extern int setegid(gid_t); extern gid_t getegid(void); extern int getgroups(int, gid_t *); extern int setgroups(size_t, const gid_t *); extern int setreuid(uid_t, uid_t); extern int setregid(gid_t, gid_t); extern int setresuid(uid_t, uid_t, uid_t); extern int setresgid(gid_t, gid_t, gid_t); extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); extern int issetugid(void); extern char* getlogin(void); extern char* getusershell(void); extern void setusershell(void); extern void endusershell(void); # 108 "bionic/libc/include/unistd.h" extern int access(const char *, int); extern int link(const char *, const char *); extern int unlink(const char *); extern int chdir(const char *); extern int fchdir(int); extern int rmdir(const char *); extern int pipe(int *); extern int chroot(const char *); extern int symlink(const char *, const char *); extern int readlink(const char *, char *, size_t); extern int chown(const char *, uid_t, gid_t); extern int fchown(int, uid_t, gid_t); extern int lchown(const char *, uid_t, gid_t); extern int truncate(const char *, off_t); extern char *getcwd(char *, size_t); extern int sync(void); extern int close(int); extern off_t lseek(int, off_t, int); extern loff_t lseek64(int, loff_t, int); extern ssize_t read(int, void *, size_t); extern ssize_t write(int, const void *, size_t); extern ssize_t pread(int, void *, size_t, off_t); extern ssize_t pwrite(int, void *, size_t, off_t); extern int dup(int); extern int dup2(int, int); extern int fcntl(int, int, ...); extern int ioctl(int, int, ...); extern int flock(int, int); extern int fsync(int); extern int fdatasync(int); extern int ftruncate(int, off_t); extern int pause(void); extern unsigned int alarm(unsigned int); extern unsigned int sleep(unsigned int); extern int usleep(unsigned long); extern int gethostname(char *, size_t); extern int getdtablesize(void); extern void *__brk(void *); extern int brk(void *); extern void *sbrk(ptrdiff_t); extern int getopt(int, char * const *, const char *); extern char *optarg; extern int optind, opterr, optopt; extern int isatty(int); extern char* ttyname(int); extern int ttyname_r(int, char*, size_t); extern int acct(const char* filepath); static __inline__ int getpagesize(void) { extern unsigned int __page_size; return __page_size; } static __inline__ int __getpageshift(void) { extern unsigned int __page_shift; return __page_shift; } extern int sysconf(int name); extern int daemon(int, int); extern int cacheflush(long start, long end, long flags); extern pid_t tcgetpgrp(int fd); extern int tcsetpgrp(int fd, pid_t _pid); # 209 "bionic/libc/include/unistd.h" } # 35 "system/core/include/cutils/log.h" 2 # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stdarg.h" 1 3 4 # 102 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; # 39 "system/core/include/cutils/log.h" 2 # 1 "system/core/include/cutils/uio.h" 1 # 24 "system/core/include/cutils/uio.h" # 1 "bionic/libc/include/sys/uio.h" 1 # 33 "bionic/libc/include/sys/uio.h" # 1 "bionic/libc/kernel/common/linux/uio.h" 1 # 18 "bionic/libc/kernel/common/linux/uio.h" struct iovec { void *iov_base; __kernel_size_t iov_len; }; # 34 "bionic/libc/include/sys/uio.h" 2 extern "C" { int readv(int, const struct iovec *, int); int writev(int, const struct iovec *, int); } # 25 "system/core/include/cutils/uio.h" 2 # 41 "system/core/include/cutils/log.h" 2 # 1 "system/core/include/cutils/logd.h" 1 # 23 "system/core/include/cutils/logd.h" # 1 "system/core/include/android/log.h" 1 # 73 "system/core/include/android/log.h" extern "C" { typedef enum android_LogPriority { ANDROID_LOG_UNKNOWN = 0, ANDROID_LOG_DEFAULT, ANDROID_LOG_VERBOSE, ANDROID_LOG_DEBUG, ANDROID_LOG_INFO, ANDROID_LOG_WARN, ANDROID_LOG_ERROR, ANDROID_LOG_FATAL, ANDROID_LOG_SILENT, } android_LogPriority; int __android_log_write(int prio, const char *tag, const char *text); int __android_log_print(int prio, const char *tag, const char *fmt, ...) __attribute__ ((format(printf, 3, 4))) ; int __android_log_vprint(int prio, const char *tag, const char *fmt, va_list ap); void __android_log_assert(const char *cond, const char *tag, const char *fmt, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 3, 4))) ; } # 24 "system/core/include/cutils/logd.h" 2 # 38 "system/core/include/cutils/logd.h" extern "C" { int __android_log_bwrite(int32_t tag, const void *payload, size_t len); int __android_log_btwrite(int32_t tag, char type, const void *payload, size_t len); } # 42 "system/core/include/cutils/log.h" 2 extern "C" { # 372 "system/core/include/cutils/log.h" typedef enum { EVENT_TYPE_INT = 0, EVENT_TYPE_LONG = 1, EVENT_TYPE_STRING = 2, EVENT_TYPE_LIST = 3, } AndroidEventLogType; # 426 "system/core/include/cutils/log.h" typedef enum { LOG_ID_MAIN = 0, LOG_ID_RADIO = 1, LOG_ID_EVENTS = 2, LOG_ID_SYSTEM = 3, LOG_ID_MAX } log_id_t; int __android_log_buf_write(int bufID, int prio, const char *tag, const char *text); int __android_log_buf_print(int bufID, int prio, const char *tag, const char *fmt, ...); } # 32 "frameworks/base/include/utils/Log.h" 2 # 25 "frameworks/base/opengl/libagl/matrix.h" 2 namespace android { const int OGLES_MODELVIEW_STACK_DEPTH = 16; const int OGLES_PROJECTION_STACK_DEPTH = 2; const int OGLES_TEXTURE_STACK_DEPTH = 2; void ogles_init_matrix(ogles_context_t*); void ogles_uninit_matrix(ogles_context_t*); void ogles_invalidate_perspective(ogles_context_t* c); void ogles_validate_transform_impl(ogles_context_t* c, uint32_t want); int ogles_surfaceport(ogles_context_t* c, GLint x, GLint y); void ogles_scissor(ogles_context_t* c, GLint x, GLint y, GLsizei w, GLsizei h); void ogles_viewport(ogles_context_t* c, GLint x, GLint y, GLsizei w, GLsizei h); inline void ogles_validate_transform( ogles_context_t* c, uint32_t want) { if (c->transforms.dirty & want) ogles_validate_transform_impl(c, want); } inline GLfixed vsquare3(GLfixed a, GLfixed b, GLfixed c) { GLfixed r; int32_t t; asm( "smull %0, %1, %2, %2 \n" "smlal %0, %1, %3, %3 \n" "smlal %0, %1, %4, %4 \n" "movs %0, %0, lsr #16 \n" "adc %0, %0, %1, lsl #16 \n" : "=&r"(r), "=&r"(t) : "%r"(a), "r"(b), "r"(c) : "cc" ); return r; # 84 "frameworks/base/opengl/libagl/matrix.h" } static inline GLfixed mla2a( GLfixed a0, GLfixed b0, GLfixed a1, GLfixed b1, GLfixed c) { GLfixed r; int32_t t; asm( "smull %0, %1, %2, %3 \n" "smlal %0, %1, %4, %5 \n" "add %0, %6, %0, lsr #16 \n" "add %0, %0, %1, lsl #16 \n" : "=&r"(r), "=&r"(t) : "%r"(a0), "r"(b0), "%r"(a1), "r"(b1), "r"(c) : ); return r; } static inline GLfixed mla3a( GLfixed a0, GLfixed b0, GLfixed a1, GLfixed b1, GLfixed a2, GLfixed b2, GLfixed c) { GLfixed r; int32_t t; asm( "smull %0, %1, %2, %3 \n" "smlal %0, %1, %4, %5 \n" "smlal %0, %1, %6, %7 \n" "add %0, %8, %0, lsr #16 \n" "add %0, %0, %1, lsl #16 \n" : "=&r"(r), "=&r"(t) : "%r"(a0), "r"(b0), "%r"(a1), "r"(b1), "%r"(a2), "r"(b2), "r"(c) : ); return r; # 146 "frameworks/base/opengl/libagl/matrix.h" } static inline GLfixed mla3a16( GLfixed a0, int32_t b1b0, GLfixed a1, GLfixed a2, int32_t b2, GLint shift, GLfixed c) { GLfixed r; asm( "smulwb %0, %1, %2 \n" "smlawt %0, %3, %2, %0 \n" "smlawb %0, %4, %5, %0 \n" "add %0, %7, %0, lsl %6 \n" : "=&r"(r) : "r"(a0), "r"(b1b0), "r"(a1), "r"(a2), "r"(b2), "r"(shift), "r"(c) : ); return r; # 187 "frameworks/base/opengl/libagl/matrix.h" } static inline GLfixed mla3a16_btb( GLfixed a0, GLfixed a1, GLfixed a2, int32_t b1b0, int32_t xxb2, GLint shift, GLfixed c) { GLfixed r; asm( "smulwb %0, %1, %4 \n" "smlawt %0, %2, %4, %0 \n" "smlawb %0, %3, %5, %0 \n" "add %0, %7, %0, lsl %6 \n" : "=&r"(r) : "r"(a0), "r"(a1), "r"(a2), "r"(b1b0), "r"(xxb2), "r"(shift), "r"(c) : ); return r; # 229 "frameworks/base/opengl/libagl/matrix.h" } static inline GLfixed mla3a16_btt( GLfixed a0, GLfixed a1, GLfixed a2, int32_t b1b0, int32_t b2xx, GLint shift, GLfixed c) { GLfixed r; asm( "smulwb %0, %1, %4 \n" "smlawt %0, %2, %4, %0 \n" "smlawt %0, %3, %5, %0 \n" "add %0, %7, %0, lsl %6 \n" : "=&r"(r) : "r"(a0), "r"(a1), "r"(a2), "r"(b1b0), "r"(b2xx), "r"(shift), "r"(c) : ); return r; # 270 "frameworks/base/opengl/libagl/matrix.h" } static inline GLfixed mla3( GLfixed a0, GLfixed b0, GLfixed a1, GLfixed b1, GLfixed a2, GLfixed b2) { GLfixed r; int32_t t; asm( "smull %0, %1, %2, %3 \n" "smlal %0, %1, %4, %5 \n" "smlal %0, %1, %6, %7 \n" "movs %0, %0, lsr #16 \n" "adc %0, %0, %1, lsl #16 \n" : "=&r"(r), "=&r"(t) : "%r"(a0), "r"(b0), "%r"(a1), "r"(b1), "%r"(a2), "r"(b2) : "cc" ); return r; # 301 "frameworks/base/opengl/libagl/matrix.h" } static inline GLfixed mla4( GLfixed a0, GLfixed b0, GLfixed a1, GLfixed b1, GLfixed a2, GLfixed b2, GLfixed a3, GLfixed b3) { GLfixed r; int32_t t; asm( "smull %0, %1, %2, %3 \n" "smlal %0, %1, %4, %5 \n" "smlal %0, %1, %6, %7 \n" "smlal %0, %1, %8, %9 \n" "movs %0, %0, lsr #16 \n" "adc %0, %0, %1, lsl #16 \n" : "=&r"(r), "=&r"(t) : "%r"(a0), "r"(b0), "%r"(a1), "r"(b1), "%r"(a2), "r"(b2), "%r"(a3), "r"(b3) : "cc" ); return r; # 336 "frameworks/base/opengl/libagl/matrix.h" } inline GLfixed dot4(const GLfixed* a, const GLfixed* b) { return mla4(a[0], b[0], a[1], b[1], a[2], b[2], a[3], b[3]); } inline GLfixed dot3(const GLfixed* a, const GLfixed* b) { return mla3(a[0], b[0], a[1], b[1], a[2], b[2]); } }; # 25 "frameworks/base/opengl/libagl/matrix.cpp" 2 # 1 "frameworks/base/opengl/libagl/vertex.h" 1 # 22 "frameworks/base/opengl/libagl/vertex.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 23 "frameworks/base/opengl/libagl/vertex.h" 2 namespace android { namespace gl { struct vertex_t; struct ogles_context_t; }; void ogles_init_vertex(ogles_context_t* c); void ogles_uninit_vertex(ogles_context_t* c); void ogles_vertex_perspective2D(ogles_context_t*, vertex_t*); void ogles_vertex_perspective3D(ogles_context_t*, vertex_t*); void ogles_vertex_perspective3DZ(ogles_context_t*, vertex_t*); void ogles_vertex_clipAllPerspective3D(ogles_context_t*, vertex_t*); void ogles_vertex_clipAllPerspective3DZ(ogles_context_t*, vertex_t*); void ogles_vertex_project(ogles_context_t* c, vertex_t*); }; # 26 "frameworks/base/opengl/libagl/matrix.cpp" 2 # 1 "frameworks/base/opengl/libagl/light.h" 1 # 22 "frameworks/base/opengl/libagl/light.h" # 1 "/opt/android-toolchain-eabi/bin/../lib/gcc/arm-eabi/4.6.2/include/stddef.h" 1 3 4 # 23 "frameworks/base/opengl/libagl/light.h" 2 # 32 "frameworks/base/opengl/libagl/light.h" namespace android { namespace gl { struct ogles_context_t; }; void ogles_init_light(ogles_context_t* c); void ogles_uninit_light(ogles_context_t* c); void ogles_invalidate_lighting_mvui(ogles_context_t* c); }; # 27 "frameworks/base/opengl/libagl/matrix.cpp" 2 namespace android { static const GLfloat gIdentityf[16] = { 1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1 }; static const matrixx_t gIdentityx = { { 0x10000,0,0,0, 0,0x10000,0,0, 0,0,0x10000,0, 0,0,0,0x10000 } }; static void point2__nop(transform_t const*, vec4_t* c, vec4_t const* o); static void point3__nop(transform_t const*, vec4_t* c, vec4_t const* o); static void point4__nop(transform_t const*, vec4_t* c, vec4_t const* o); static void normal__nop(transform_t const*, vec4_t* c, vec4_t const* o); static void point2__generic(transform_t const*, vec4_t* c, vec4_t const* o); static void point3__generic(transform_t const*, vec4_t* c, vec4_t const* o); static void point4__generic(transform_t const*, vec4_t* c, vec4_t const* o); static void point3__mvui(transform_t const*, vec4_t* c, vec4_t const* o); static void point4__mvui(transform_t const*, vec4_t* c, vec4_t const* o); void ogles_init_matrix(ogles_context_t* c) { c->transforms.modelview.init(OGLES_MODELVIEW_STACK_DEPTH); c->transforms.projection.init(OGLES_PROJECTION_STACK_DEPTH); for (int i=0; itransforms.texture[i].init(OGLES_TEXTURE_STACK_DEPTH); c->transforms.current = &c->transforms.modelview; c->transforms.matrixMode = 0x1700; c->transforms.dirty = transform_state_t::VIEWPORT | transform_state_t::MVUI | transform_state_t::MVIT | transform_state_t::MVP; c->transforms.mvp.loadIdentity(); c->transforms.mvp4.loadIdentity(); c->transforms.mvit4.loadIdentity(); c->transforms.mvui.loadIdentity(); c->transforms.vpt.loadIdentity(); c->transforms.vpt.zNear = 0.0f; c->transforms.vpt.zFar = 1.0f; } void ogles_uninit_matrix(ogles_context_t* c) { c->transforms.modelview.uninit(); c->transforms.projection.uninit(); for (int i=0; itransforms.texture[i].uninit(); } static void validate_perspective(ogles_context_t* c, vertex_t* v) { const uint32_t enables = c->rasterizer.state.enables; c->arrays.perspective = (c->clipPlanes.enable) ? ogles_vertex_clipAllPerspective3D : ogles_vertex_perspective3D; if (enables & (GGL_ENABLE_DEPTH_TEST|GGL_ENABLE_FOG)) { c->arrays.perspective = ogles_vertex_perspective3DZ; if (c->clipPlanes.enable || (enables&GGL_ENABLE_FOG)) c->arrays.perspective = ogles_vertex_clipAllPerspective3DZ; } if ((c->arrays.vertex.size != 4) && (c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION)) { c->arrays.perspective = ogles_vertex_perspective2D; } c->arrays.perspective(c, v); } void ogles_invalidate_perspective(ogles_context_t* c) { c->arrays.perspective = validate_perspective; } void ogles_validate_transform_impl(ogles_context_t* c, uint32_t want) { int dirty = c->transforms.dirty & want; if (dirty & transform_state_t::MODELVIEW) { c->transforms.modelview.validate(); } if (dirty & transform_state_t::PROJECTION) { c->transforms.projection.validate(); } if (dirty & transform_state_t::VIEWPORT) { vp_transform_t& vpt = c->transforms.vpt; vpt.transform.matrix.load(vpt.matrix); vpt.transform.picker(); } if (dirty & transform_state_t::MVP) { c->transforms.update_mvp(); ogles_invalidate_perspective(c); } if (dirty & transform_state_t::MVUI) { c->transforms.update_mvui(); ogles_invalidate_lighting_mvui(c); } if (dirty & transform_state_t::TEXTURE) { for (int i=0; itransforms.texture[i].validate(); } if (dirty & transform_state_t::MVIT) { c->transforms.update_mvit(); } c->transforms.dirty &= ~want; } void transform_t::loadIdentity() { matrix = gIdentityx; flags = 0; ops = OP_IDENTITY; point2 = point2__nop; point3 = point3__nop; point4 = point4__nop; } static inline int notZero(GLfixed v) { return abs(v) & ~0x3; } static inline int notOne(GLfixed v) { return notZero(v - 0x10000); } void transform_t::picker() { const GLfixed* const m = matrix.m; flags = 0; ops = OP_ALL; point2 = point2__generic; point3 = point3__generic; point4 = point4__generic; if (!(notZero(m[3]) | notZero(m[7]) | notZero(m[11]) | notOne(m[15]))) { flags |= FLAGS_2D_PROJECTION; } } void mvui_transform_t::picker() { flags = 0; ops = OP_ALL; point3 = point3__mvui; point4 = point4__mvui; } void transform_t::dump(const char* what) { GLfixed const * const m = matrix.m; ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "%s:", what)); for (int i=0 ; i<4 ; i++) ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "[%08x %08x %08x %08x] [%f %f %f %f]\n", m[((i)+ 4*(0))], m[((i)+ 4*(1))], m[((i)+ 4*(2))], m[((i)+ 4*(3))], fixedToFloat(m[((i)+ 4*(0))]), fixedToFloat(m[((i)+ 4*(1))]), fixedToFloat(m[((i)+ 4*(2))]), fixedToFloat(m[((i)+ 4*(3))]))) ; } void matrixx_t::load(const matrixf_t& rhs) { GLfixed* xp = m; GLfloat const* fp = rhs.elements(); unsigned int i = 16; do { const GLfloat f = *fp++; *xp++ = isZerof(f) ? 0 : gglFloatToFixed(f); } while (--i); } void matrixf_t::multiply(matrixf_t& r, const matrixf_t& lhs, const matrixf_t& rhs) { GLfloat const* const m = lhs.m; for (int i=0 ; i<4 ; i++) { register const float rhs_i0 = rhs.m[ ((0)+ 4*(i)) ]; register float ri0 = m[ ((0)+ 4*(0)) ] * rhs_i0; register float ri1 = m[ ((1)+ 4*(0)) ] * rhs_i0; register float ri2 = m[ ((2)+ 4*(0)) ] * rhs_i0; register float ri3 = m[ ((3)+ 4*(0)) ] * rhs_i0; for (int j=1 ; j<4 ; j++) { register const float rhs_ij = rhs.m[ ((j)+ 4*(i)) ]; ri0 += m[ ((0)+ 4*(j)) ] * rhs_ij; ri1 += m[ ((1)+ 4*(j)) ] * rhs_ij; ri2 += m[ ((2)+ 4*(j)) ] * rhs_ij; ri3 += m[ ((3)+ 4*(j)) ] * rhs_ij; } r.m[ ((0)+ 4*(i)) ] = ri0; r.m[ ((1)+ 4*(i)) ] = ri1; r.m[ ((2)+ 4*(i)) ] = ri2; r.m[ ((3)+ 4*(i)) ] = ri3; } } void matrixf_t::dump(const char* what) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "%s", what)); ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "[ %9f %9f %9f %9f ]", m[((0)+ 4*(0))], m[((0)+ 4*(1))], m[((0)+ 4*(2))], m[((0)+ 4*(3))])); ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "[ %9f %9f %9f %9f ]", m[((1)+ 4*(0))], m[((1)+ 4*(1))], m[((1)+ 4*(2))], m[((1)+ 4*(3))])); ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "[ %9f %9f %9f %9f ]", m[((2)+ 4*(0))], m[((2)+ 4*(1))], m[((2)+ 4*(2))], m[((2)+ 4*(3))])); ((void)__android_log_print(ANDROID_LOG_DEBUG, "libagl", "[ %9f %9f %9f %9f ]", m[((3)+ 4*(0))], m[((3)+ 4*(1))], m[((3)+ 4*(2))], m[((3)+ 4*(3))])); } void matrixf_t::loadIdentity() { memcpy(m, gIdentityf, sizeof(m)); } void matrixf_t::set(const GLfixed* rhs) { load(rhs); } void matrixf_t::set(const GLfloat* rhs) { load(rhs); } void matrixf_t::load(const GLfixed* rhs) { GLfloat* fp = m; unsigned int i = 16; do { *fp++ = fixedToFloat(*rhs++); } while (--i); } void matrixf_t::load(const GLfloat* rhs) { memcpy(m, rhs, sizeof(m)); } void matrixf_t::load(const matrixf_t& rhs) { operator = (rhs); } void matrixf_t::multiply(const matrixf_t& rhs) { matrixf_t r; multiply(r, *this, rhs); operator = (r); } void matrixf_t::translate(GLfloat x, GLfloat y, GLfloat z) { for (int i=0 ; i<4 ; i++) { m[12+i] += m[i]*x + m[4+i]*y + m[8+i]*z; } } void matrixf_t::scale(GLfloat x, GLfloat y, GLfloat z) { for (int i=0 ; i<4 ; i++) { m[ i] *= x; m[4+i] *= y; m[8+i] *= z; } } void matrixf_t::rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z) { matrixf_t rotation; GLfloat* r = rotation.m; GLfloat c, s; r[3] = 0; r[7] = 0; r[11]= 0; r[12]= 0; r[13]= 0; r[14]= 0; r[15]= 1; a *= GLfloat(3.14159265358979323846 / 180.0f); sincosf(a, &s, &c); if (isOnef(x) && isZerof(y) && isZerof(z)) { r[5] = c; r[10]= c; r[6] = s; r[9] = -s; r[1] = 0; r[2] = 0; r[4] = 0; r[8] = 0; r[0] = 1; } else if (isZerof(x) && isOnef(y) && isZerof(z)) { r[0] = c; r[10]= c; r[8] = s; r[2] = -s; r[1] = 0; r[4] = 0; r[6] = 0; r[9] = 0; r[5] = 1; } else if (isZerof(x) && isZerof(y) && isOnef(z)) { r[0] = c; r[5] = c; r[1] = s; r[4] = -s; r[2] = 0; r[6] = 0; r[8] = 0; r[9] = 0; r[10]= 1; } else { const GLfloat len = sqrtf(x*x + y*y + z*z); if (!isOnef(len)) { const GLfloat recipLen = reciprocalf(len); x *= recipLen; y *= recipLen; z *= recipLen; } const GLfloat nc = 1.0f - c; const GLfloat xy = x * y; const GLfloat yz = y * z; const GLfloat zx = z * x; const GLfloat xs = x * s; const GLfloat ys = y * s; const GLfloat zs = z * s; r[ 0] = x*x*nc + c; r[ 4] = xy*nc - zs; r[ 8] = zx*nc + ys; r[ 1] = xy*nc + zs; r[ 5] = y*y*nc + c; r[ 9] = yz*nc - xs; r[ 2] = zx*nc - ys; r[ 6] = yz*nc + xs; r[10] = z*z*nc + c; } multiply(rotation); } void matrix_stack_t::init(int depth) { stack = new matrixf_t[depth]; ops = new uint8_t[depth]; maxDepth = depth; depth = 0; dirty = 0; loadIdentity(); } void matrix_stack_t::uninit() { delete [] stack; delete [] ops; } void matrix_stack_t::loadIdentity() { transform.loadIdentity(); stack[depth].loadIdentity(); ops[depth] = OP_IDENTITY; } void matrix_stack_t::load(const GLfixed* rhs) { memcpy(transform.matrix.m, rhs, sizeof(transform.matrix.m)); stack[depth].load(rhs); ops[depth] = OP_ALL; } void matrix_stack_t::load(const GLfloat* rhs) { stack[depth].load(rhs); ops[depth] = OP_ALL; } void matrix_stack_t::multiply(const matrixf_t& rhs) { stack[depth].multiply(rhs); ops[depth] = OP_ALL; } void matrix_stack_t::translate(GLfloat x, GLfloat y, GLfloat z) { stack[depth].translate(x,y,z); ops[depth] |= OP_TRANSLATE; } void matrix_stack_t::scale(GLfloat x, GLfloat y, GLfloat z) { stack[depth].scale(x,y,z); if (x==y && y==z) { ops[depth] |= OP_UNIFORM_SCALE; } else { ops[depth] |= OP_SCALE; } } void matrix_stack_t::rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z) { stack[depth].rotate(a,x,y,z); ops[depth] |= OP_ROTATE; } void matrix_stack_t::validate() { if (dirty & DO_FLOAT_TO_FIXED) { transform.matrix.load(top()); } if (dirty & DO_PICKER) { transform.picker(); } dirty = 0; } GLint matrix_stack_t::push() { if (depth >= (maxDepth-1)) { return 0x0503; } stack[depth+1] = stack[depth]; ops[depth+1] = ops[depth]; depth++; return 0; } GLint matrix_stack_t::pop() { if (depth == 0) { return 0x0504; } depth--; return 0; } void vp_transform_t::loadIdentity() { transform.loadIdentity(); matrix.loadIdentity(); } void transform_state_t::invalidate() { switch (matrixMode) { case 0x1700: dirty |= MODELVIEW | MVP | MVUI | MVIT; break; case 0x1701: dirty |= PROJECTION | MVP; break; case 0x1702: dirty |= TEXTURE | MVP; break; } current->dirty = matrix_stack_t::DO_PICKER | matrix_stack_t::DO_FLOAT_TO_FIXED; } void transform_state_t::update_mvp() { matrixf_t temp_mvp; matrixf_t::multiply(temp_mvp, projection.top(), modelview.top()); mvp4.matrix.load(temp_mvp); mvp4.picker(); if (mvp4.flags & transform_t::FLAGS_2D_PROJECTION) { matrixf_t mvpv; matrixf_t::multiply(mvpv, vpt.matrix, temp_mvp); mvp.matrix.load(mvpv); mvp.picker(); } else { mvp = mvp4; } } static inline GLfloat det22(GLfloat a, GLfloat b, GLfloat c, GLfloat d) { return a*d - b*c; } static inline GLfloat ndet22(GLfloat a, GLfloat b, GLfloat c, GLfloat d) { return b*c - a*d; } static __attribute__((noinline)) void invert(GLfloat* inverse, const GLfloat* src) { double t; int i, j, k, swap; GLfloat tmp[4][4]; memcpy(inverse, gIdentityf, sizeof(gIdentityf)); memcpy(tmp, src, sizeof(GLfloat)*16); for (i = 0; i < 4; i++) { swap = i; for (j = i + 1; j < 4; j++) { if (fabs(tmp[j][i]) > fabs(tmp[i][i])) { swap = j; } } if (swap != i) { for (k = 0; k < 4; k++) { t = tmp[i][k]; tmp[i][k] = tmp[swap][k]; tmp[swap][k] = t; t = inverse[i*4+k]; inverse[i*4+k] = inverse[swap*4+k]; inverse[swap*4+k] = t; } } t = 1.0f / tmp[i][i]; for (k = 0; k < 4; k++) { tmp[i][k] *= t; inverse[i*4+k] *= t; } for (j = 0; j < 4; j++) { if (j != i) { t = tmp[j][i]; for (k = 0; k < 4; k++) { tmp[j][k] -= tmp[i][k]*t; inverse[j*4+k] -= inverse[i*4+k]*t; } } } } } void transform_state_t::update_mvit() { GLfloat r[16]; const GLfloat* const mv = modelview.top().elements(); invert(r, mv); GLfixed* const x = mvit4.matrix.m; for (int i=0 ; i<4 ; i++) for (int j=0 ; j<4 ; j++) x[((j)+ 4*(i))] = gglFloatToFixed(r[((i)+ 4*(j))]); mvit4.picker(); } void transform_state_t::update_mvui() { GLfloat r[16]; const GLfloat* const mv = modelview.top().elements(); # 615 "frameworks/base/opengl/libagl/matrix.cpp" invert(r, mv); GLfixed* const x = mvui.matrix.m; for (int i=0 ; i<4 ; i++) for (int j=0 ; j<4 ; j++) x[((j)+ 4*(i))] = gglFloatToFixed(r[((i)+ 4*(j))]); mvui.picker(); } # 641 "frameworks/base/opengl/libagl/matrix.cpp" int ogles_surfaceport(ogles_context_t* c, GLint x, GLint y) { c->viewport.surfaceport.x = x; c->viewport.surfaceport.y = y; ogles_viewport(c, c->viewport.x, c->viewport.y, c->viewport.w, c->viewport.h); ogles_scissor(c, c->viewport.scissor.x, c->viewport.scissor.y, c->viewport.scissor.w, c->viewport.scissor.h); return 0; } void ogles_scissor(ogles_context_t* c, GLint x, GLint y, GLsizei w, GLsizei h) { if ((w|h) < 0) { _ogles_error((c), (0x0501)); return; } c->viewport.scissor.x = x; c->viewport.scissor.y = y; c->viewport.scissor.w = w; c->viewport.scissor.h = h; x += c->viewport.surfaceport.x; y += c->viewport.surfaceport.y; y = c->rasterizer.state.buffers.color.height - (y + h); c->rasterizer.procs.scissor(c, x, y, w, h); } void ogles_viewport(ogles_context_t* c, GLint x, GLint y, GLsizei w, GLsizei h) { if ((w|h)<0) { _ogles_error((c), (0x0501)); return; } c->viewport.x = x; c->viewport.y = y; c->viewport.w = w; c->viewport.h = h; x += c->viewport.surfaceport.x; y += c->viewport.surfaceport.y; GLint H = c->rasterizer.state.buffers.color.height; GLfloat sx = div2f(w); GLfloat ox = sx + x; GLfloat sy = div2f(h); GLfloat oy = sy - y + (H - h); GLfloat near = c->transforms.vpt.zNear; GLfloat far = c->transforms.vpt.zFar; GLfloat A = div2f(far - near); GLfloat B = div2f(far + near); GLfloat* const f = c->transforms.vpt.matrix.editElements(); f[0] = sx; f[4] = 0; f[ 8] = 0; f[12] = ox; f[1] = 0; f[5] =-sy; f[ 9] = 0; f[13] = oy; f[2] = 0; f[6] = 0; f[10] = A; f[14] = B; f[3] = 0; f[7] = 0; f[11] = 0; f[15] = 1; c->transforms.dirty |= transform_state_t::VIEWPORT; if (c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION) c->transforms.dirty |= transform_state_t::MVP; } void point2__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; lhs->x = mla2a(rx, m[ 0], ry, m[ 4], m[12]); lhs->y = mla2a(rx, m[ 1], ry, m[ 5], m[13]); lhs->z = mla2a(rx, m[ 2], ry, m[ 6], m[14]); lhs->w = mla2a(rx, m[ 3], ry, m[ 7], m[15]); } void point3__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; const GLfixed rz = rhs->z; lhs->x = mla3a(rx, m[ 0], ry, m[ 4], rz, m[ 8], m[12]); lhs->y = mla3a(rx, m[ 1], ry, m[ 5], rz, m[ 9], m[13]); lhs->z = mla3a(rx, m[ 2], ry, m[ 6], rz, m[10], m[14]); lhs->w = mla3a(rx, m[ 3], ry, m[ 7], rz, m[11], m[15]); } void point4__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; const GLfixed rz = rhs->z; const GLfixed rw = rhs->w; lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]); lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]); lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]); lhs->w = mla4(rx, m[ 3], ry, m[ 7], rz, m[11], rw, m[15]); } void point3__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; const GLfixed rz = rhs->z; lhs->x = mla3(rx, m[ 0], ry, m[ 4], rz, m[ 8]); lhs->y = mla3(rx, m[ 1], ry, m[ 5], rz, m[ 9]); lhs->z = mla3(rx, m[ 2], ry, m[ 6], rz, m[10]); lhs->w = 0; } void point4__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; const GLfixed rz = rhs->z; const GLfixed rw = rhs->w; lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]); lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]); lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]); lhs->w = rw; } void point2__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) { lhs->z = 0; lhs->w = 0x10000; if (lhs != rhs) { lhs->x = rhs->x; lhs->y = rhs->y; } } void point3__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) { lhs->w = 0x10000; if (lhs != rhs) { lhs->x = rhs->x; lhs->y = rhs->y; lhs->z = rhs->z; } } void point4__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) { if (lhs != rhs) *lhs = *rhs; } static void frustumf( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar, ogles_context_t* c) { if (cmpf(left,right) || cmpf(top, bottom) || cmpf(zNear, zFar) || isZeroOrNegativef(zNear) || isZeroOrNegativef(zFar)) { _ogles_error((c), (0x0501)); return; } const GLfloat r_width = reciprocalf(right - left); const GLfloat r_height = reciprocalf(top - bottom); const GLfloat r_depth = reciprocalf(zNear - zFar); const GLfloat x = mul2f(zNear * r_width); const GLfloat y = mul2f(zNear * r_height); const GLfloat A = mul2f((right + left) * r_width); const GLfloat B = (top + bottom) * r_height; const GLfloat C = (zFar + zNear) * r_depth; const GLfloat D = mul2f(zFar * zNear * r_depth); GLfloat f[16]; f[ 0] = x; f[ 5] = y; f[ 8] = A; f[ 9] = B; f[10] = C; f[14] = D; f[11] = -1.0f; f[ 1] = f[ 2] = f[ 3] = f[ 4] = f[ 6] = f[ 7] = f[12] = f[13] = f[15] = 0.0f; matrixf_t rhs; rhs.set(f); c->transforms.current->multiply(rhs); c->transforms.invalidate(); } static void orthof( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar, ogles_context_t* c) { if (cmpf(left,right) || cmpf(top, bottom) || cmpf(zNear, zFar)) { _ogles_error((c), (0x0501)); return; } const GLfloat r_width = reciprocalf(right - left); const GLfloat r_height = reciprocalf(top - bottom); const GLfloat r_depth = reciprocalf(zFar - zNear); const GLfloat x = mul2f(r_width); const GLfloat y = mul2f(r_height); const GLfloat z = -mul2f(r_depth); const GLfloat tx = -(right + left) * r_width; const GLfloat ty = -(top + bottom) * r_height; const GLfloat tz = -(zFar + zNear) * r_depth; GLfloat f[16]; f[ 0] = x; f[ 5] = y; f[10] = z; f[12] = tx; f[13] = ty; f[14] = tz; f[15] = 1.0f; f[ 1] = f[ 2] = f[ 3] = f[ 4] = f[ 6] = f[ 7] = f[ 8] = f[ 9] = f[11] = 0.0f; matrixf_t rhs; rhs.set(f); c->transforms.current->multiply(rhs); c->transforms.invalidate(); } static void depthRangef(GLclampf zNear, GLclampf zFar, ogles_context_t* c) { zNear = clampToZerof(zNear > 1 ? 1 : zNear); zFar = clampToZerof(zFar > 1 ? 1 : zFar); GLfloat* const f = c->transforms.vpt.matrix.editElements(); f[10] = div2f(zFar - zNear); f[14] = div2f(zFar + zNear); c->transforms.dirty |= transform_state_t::VIEWPORT; c->transforms.vpt.zNear = zNear; c->transforms.vpt.zFar = zFar; } }; using namespace android; void glMatrixMode(GLenum mode) { ogles_context_t* c = ogles_context_t::get(); matrix_stack_t* stack = 0; switch (mode) { case 0x1700: stack = &c->transforms.modelview; break; case 0x1701: stack = &c->transforms.projection; break; case 0x1702: stack = &c->transforms.texture[c->textures.active]; break; default: _ogles_error((c), (0x0500)); return; } c->transforms.matrixMode = mode; c->transforms.current = stack; } void glLoadIdentity() { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->loadIdentity(); c->transforms.invalidate(); c->transforms.current->dirty = 0; } void glLoadMatrixf(const GLfloat* m) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->load(m); c->transforms.invalidate(); } void glLoadMatrixx(const GLfixed* m) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->load(m); c->transforms.invalidate(); c->transforms.current->dirty &= ~matrix_stack_t::DO_FLOAT_TO_FIXED; } void glMultMatrixf(const GLfloat* m) { ogles_context_t* c = ogles_context_t::get(); matrixf_t rhs; rhs.set(m); c->transforms.current->multiply(rhs); c->transforms.invalidate(); } void glMultMatrixx(const GLfixed* m) { ogles_context_t* c = ogles_context_t::get(); matrixf_t rhs; rhs.set(m); c->transforms.current->multiply(rhs); c->transforms.invalidate(); } void glPopMatrix() { ogles_context_t* c = ogles_context_t::get(); GLint err = c->transforms.current->pop(); if (__builtin_expect(!!(err), 0)) { _ogles_error((c), (err)); return; } c->transforms.invalidate(); } void glPushMatrix() { ogles_context_t* c = ogles_context_t::get(); GLint err = c->transforms.current->push(); if (__builtin_expect(!!(err), 0)) { _ogles_error((c), (err)); return; } c->transforms.invalidate(); } void glFrustumf( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { ogles_context_t* c = ogles_context_t::get(); frustumf(left, right, bottom, top, zNear, zFar, c); } void glFrustumx( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { ogles_context_t* c = ogles_context_t::get(); frustumf( fixedToFloat(left), fixedToFloat(right), fixedToFloat(bottom), fixedToFloat(top), fixedToFloat(zNear), fixedToFloat(zFar), c); } void glOrthof( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { ogles_context_t* c = ogles_context_t::get(); orthof(left, right, bottom, top, zNear, zFar, c); } void glOrthox( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { ogles_context_t* c = ogles_context_t::get(); orthof( fixedToFloat(left), fixedToFloat(right), fixedToFloat(bottom), fixedToFloat(top), fixedToFloat(zNear), fixedToFloat(zFar), c); } void glRotatef(GLfloat a, GLfloat x, GLfloat y, GLfloat z) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->rotate(a, x, y, z); c->transforms.invalidate(); } void glRotatex(GLfixed a, GLfixed x, GLfixed y, GLfixed z) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->rotate( fixedToFloat(a), fixedToFloat(x), fixedToFloat(y), fixedToFloat(z)); c->transforms.invalidate(); } void glScalef(GLfloat x, GLfloat y, GLfloat z) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->scale(x, y, z); c->transforms.invalidate(); } void glScalex(GLfixed x, GLfixed y, GLfixed z) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->scale( fixedToFloat(x), fixedToFloat(y), fixedToFloat(z)); c->transforms.invalidate(); } void glTranslatef(GLfloat x, GLfloat y, GLfloat z) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->translate(x, y, z); c->transforms.invalidate(); } void glTranslatex(GLfixed x, GLfixed y, GLfixed z) { ogles_context_t* c = ogles_context_t::get(); c->transforms.current->translate( fixedToFloat(x), fixedToFloat(y), fixedToFloat(z)); c->transforms.invalidate(); } void glScissor(GLint x, GLint y, GLsizei w, GLsizei h) { ogles_context_t* c = ogles_context_t::get(); ogles_scissor(c, x, y, w, h); } void glViewport(GLint x, GLint y, GLsizei w, GLsizei h) { ogles_context_t* c = ogles_context_t::get(); ogles_viewport(c, x, y, w, h); } void glDepthRangef(GLclampf zNear, GLclampf zFar) { ogles_context_t* c = ogles_context_t::get(); depthRangef(zNear, zFar, c); } void glDepthRangex(GLclampx zNear, GLclampx zFar) { ogles_context_t* c = ogles_context_t::get(); depthRangef(fixedToFloat(zNear), fixedToFloat(zFar), c); } void glPolygonOffsetx(GLfixed factor, GLfixed units) { ogles_context_t* c = ogles_context_t::get(); c->polygonOffset.factor = factor; c->polygonOffset.units = units; } void glPolygonOffset(GLfloat factor, GLfloat units) { ogles_context_t* c = ogles_context_t::get(); c->polygonOffset.factor = gglFloatToFixed(factor); c->polygonOffset.units = gglFloatToFixed(units); } GLbitfield glQueryMatrixxOES(GLfixed* m, GLint* e) { ogles_context_t* c = ogles_context_t::get(); GLbitfield status = 0; GLfloat const* f = c->transforms.current->top().elements(); for (int i=0 ; i<16 ; i++) { if (((sizeof (f[i]) == sizeof (float)) ? isnanf(f[i]) : (sizeof (f[i]) == sizeof (double)) ? isnan(f[i]) : __isnanl(f[i])) || ((sizeof (f[i]) == sizeof (float)) ? __isinff(f[i]) : (sizeof (f[i]) == sizeof (double)) ? __isinf(f[i]) : __isinfl(f[i]))) { status |= 1<