diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:08:08 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:08:08 -0800 |
commit | 35237d135807af84bf9b0e5b8d7f8633e58db6f5 (patch) | |
tree | d8bcf3ada2182d248604728285dd80abb466f22a /include | |
parent | 4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 (diff) | |
download | system_core-35237d135807af84bf9b0e5b8d7f8633e58db6f5.zip system_core-35237d135807af84bf9b0e5b8d7f8633e58db6f5.tar.gz system_core-35237d135807af84bf9b0e5b8d7f8633e58db6f5.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/linux-arm/AndroidConfig.h | 6 | ||||
-rw-r--r-- | include/arch/target_linux-x86/AndroidConfig.h | 296 | ||||
-rw-r--r-- | include/cutils/tztime.h | 15 | ||||
-rw-r--r-- | include/pixelflinger/format.h | 5 | ||||
-rw-r--r-- | include/private/android_filesystem_config.h | 4 | ||||
-rw-r--r-- | include/private/pixelflinger/ggl_context.h | 10 |
6 files changed, 330 insertions, 6 deletions
diff --git a/include/arch/linux-arm/AndroidConfig.h b/include/arch/linux-arm/AndroidConfig.h index d7e182a..b2dabf2 100644 --- a/include/arch/linux-arm/AndroidConfig.h +++ b/include/arch/linux-arm/AndroidConfig.h @@ -48,6 +48,12 @@ #define HAVE_FUTEX /* + * Define if we already have the futex wrapper functions defined. Yes if + * compiling against bionic. + */ +#define HAVE_FUTEX_WRAPPERS 1 + +/* * Process creation model. Choose one: * * HAVE_FORKEXEC - use fork() and exec() diff --git a/include/arch/target_linux-x86/AndroidConfig.h b/include/arch/target_linux-x86/AndroidConfig.h new file mode 100644 index 0000000..4aa44f8 --- /dev/null +++ b/include/arch/target_linux-x86/AndroidConfig.h @@ -0,0 +1,296 @@ +/* + * Copyright 2005 The Android Open Source Project + * + * Android config -- "target_linux-x86". Used for x86 linux target devices. + */ +#ifndef _ANDROID_CONFIG_H +#define _ANDROID_CONFIG_H + +/* + * =========================================================================== + * !!! IMPORTANT !!! + * =========================================================================== + * + * This file is included by ALL C/C++ source files. Don't put anything in + * here unless you are absolutely certain it can't go anywhere else. + * + * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" + * comments. + */ + +/* + * Threading model. Choose one: + * + * HAVE_PTHREADS - use the pthreads library. + * HAVE_WIN32_THREADS - use Win32 thread primitives. + * -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX + */ +#define HAVE_PTHREADS + +/* + * Do we have the futex syscall? + */ + +#define HAVE_FUTEX + +/* + * Define if we already have the futex wrapper functions defined. Yes if + * compiling against bionic. + */ +#define HAVE_FUTEX_WRAPPERS 1 + +/* + * Process creation model. Choose one: + * + * HAVE_FORKEXEC - use fork() and exec() + * HAVE_WIN32_PROC - use CreateProcess() + */ +#define HAVE_FORKEXEC + +/* + * Process out-of-memory adjustment. Set if running on Linux, + * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory + * badness adjustment. + */ +#define HAVE_OOM_ADJ + +/* + * IPC model. Choose one: + * + * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). + * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). + * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). + * HAVE_ANDROID_IPC - use Android versions (?, mmap). + */ +#define HAVE_ANDROID_IPC 1 + +/* + * Memory-mapping model. Choose one: + * + * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h + * HAVE_WIN32_FILEMAP - use Win32 filemaps + */ +#define HAVE_POSIX_FILEMAP 1 + +/* + * Define this if you have <termio.h> + */ +#define HAVE_TERMIO_H 1 + +/* + * Define this if you build against have Microsoft C runtime (MSVCRT.DLL) + */ +/* #define HAVE_MS_C_RUNTIME */ + +/* + * Define this if you have sys/uio.h + */ +#define HAVE_SYS_UIO_H 1 + +/* + * Define this if your platforms implements symbolic links + * in its filesystems + */ +#define HAVE_SYMLINKS 1 + +/* + * Define this if we have localtime_r(). + */ +/* #define HAVE_LOCALTIME_R */ + +/* + * Define this if we have gethostbyname_r(). + */ +/* #define HAVE_GETHOSTBYNAME_R */ + +/* + * Define this if we have ioctl(). + */ +#define HAVE_IOCTL + +/* + * Define this if we want to use WinSock. + */ +/* #define HAVE_WINSOCK */ + +/* + * Define this if have clock_gettime() and friends + * + */ +#define HAVE_POSIX_CLOCKS + +/* + * Define this if we have pthread_cond_timedwait_monotonic() and + * clock_gettime(CLOCK_MONOTONIC). + */ +#define HAVE_TIMEDWAIT_MONOTONIC + +/* + * Define this if we have linux style epoll() + */ +#define HAVE_EPOLL + +/* + * Endianness of the target machine. Choose one: + * + * HAVE_ENDIAN_H -- have endian.h header we can include. + * HAVE_LITTLE_ENDIAN -- we are little endian. + * HAVE_BIG_ENDIAN -- we are big endian. + */ +#define HAVE_ENDIAN_H +#define HAVE_LITTLE_ENDIAN + +/* + * We need to choose between 32-bit and 64-bit off_t. All of our code should + * agree on the same size. For desktop systems, use 64-bit values, + * because some of our libraries (e.g. wxWidgets) expect to be built that way. + */ +/* + * #define _FILE_OFFSET_BITS 64 + * #define _LARGEFILE_SOURCE 1 + */ + +/* + * Defined if we have the backtrace() call for retrieving a stack trace. + * Needed for CallStack to operate; if not defined, CallStack is + * non-functional. + */ +#define HAVE_BACKTRACE 0 + +/* + * Defined if we have the dladdr() call for retrieving the symbol associated + * with a memory address. If not defined, stack crawls will not have symbolic + * information. + */ +#define HAVE_DLADDR 0 + +/* + * Defined if we have the cxxabi.h header for demangling C++ symbols. If + * not defined, stack crawls will be displayed with raw mangled symbols + */ +#define HAVE_CXXABI 0 + +/* + * Defined if we have the gettid() system call. + */ +#define HAVE_GETTID + +/* + * Defined if we have the sched_setscheduler() call + */ +#define HAVE_SCHED_SETSCHEDULER + +/* + * Add any extra platform-specific defines here. + */ +#ifndef __linux__ +#define __linux__ +#endif + +/* + * Define if we have <malloc.h> header + */ +#define HAVE_MALLOC_H + +/* + * Define if we're running on *our* linux on device or emulator. + */ +#define HAVE_ANDROID_OS 1 + +/* + * Define if we have Linux-style non-filesystem Unix Domain Sockets + */ +#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1 + +/* + * Define if we have Linux's inotify in <sys/inotify.h>. + */ +#define HAVE_INOTIFY 1 + +/* + * Define if we have madvise() in <sys/mman.h> + */ +#define HAVE_MADVISE 1 + +/* + * Define if we have Linux's dbus + */ +#define HAVE_DBUS 1 + +/* + * Define if tm struct has tm_gmtoff field + */ +#define HAVE_TM_GMTOFF 1 + +/* + * Define if dirent struct has d_type field + */ +#define HAVE_DIRENT_D_TYPE 1 + +/* + * Define if libc includes Android system properties implementation. + */ +#define HAVE_LIBC_SYSTEM_PROPERTIES 1 + +/* + * Define if system provides a system property server (should be + * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES). + */ +/* #define HAVE_SYSTEM_PROPERTY_SERVER */ + +/* + * What CPU architecture does this platform use? + */ +#define ARCH_X86 + +/* + * sprintf() format string for shared library naming. + */ +#define OS_SHARED_LIB_FORMAT_STR "lib%s.so" + +/* + * Do we have __memcmp16()? + */ +/* #define HAVE__MEMCMP16 1 */ + +/* + * type for the third argument to mincore(). + */ +#define MINCORE_POINTER_TYPE unsigned char * + +/* + * Do we have the sigaction flag SA_NOCLDWAIT? + */ +#define HAVE_SA_NOCLDWAIT + +/* + * The default path separator for the platform + */ +#define OS_PATH_SEPARATOR '/' + +/* + * Is the filesystem case sensitive? + */ +#define OS_CASE_SENSITIVE + +/* + * Define if <sys/socket.h> exists. + */ +#define HAVE_SYS_SOCKET_H 1 + +/* + * Define if the strlcpy() function exists on the system. + */ +#define HAVE_STRLCPY 1 + +/* + * Define if prctl() exists + */ +#define HAVE_PRCTL 1 + +/* + * Whether or not _Unwind_Context is defined as a struct. + */ +#define HAVE_UNWIND_CONTEXT_STRUCT + +#endif /* _ANDROID_CONFIG_H */ diff --git a/include/cutils/tztime.h b/include/cutils/tztime.h index 59c0670..9b3ece8 100644 --- a/include/cutils/tztime.h +++ b/include/cutils/tztime.h @@ -24,6 +24,21 @@ extern "C" { time_t mktime_tz(struct tm * const tmp, char const * tz); void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz); +struct strftime_locale { + const char *mon[12]; /* short names */ + const char *month[12]; /* long names */ + const char *wday[7]; /* short names */ + const char *weekday[7]; /* long names */ + const char *X_fmt; + const char *x_fmt; + const char *c_fmt; + const char *am; + const char *pm; + const char *date_fmt; +}; + +size_t strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale *locale); + #ifdef __cplusplus } #endif diff --git a/include/pixelflinger/format.h b/include/pixelflinger/format.h index ad0d29d..308e560 100644 --- a/include/pixelflinger/format.h +++ b/include/pixelflinger/format.h @@ -30,6 +30,7 @@ enum GGLPixelFormat { GGL_PIXEL_FORMAT_RGBX_8888 = 2, // 3x8-bit RGB stored in 32-bit chunks GGL_PIXEL_FORMAT_RGB_888 = 3, // 3x8-bit RGB GGL_PIXEL_FORMAT_RGB_565 = 4, // 16-bit RGB + GGL_PIXEL_FORMAT_BGRA_8888 = 5, // 4x8-bit BGRA GGL_PIXEL_FORMAT_RGBA_5551 = 6, // 16-bit RGBA GGL_PIXEL_FORMAT_RGBA_4444 = 7, // 16-bit RGBA @@ -38,9 +39,11 @@ enum GGLPixelFormat { GGL_PIXEL_FORMAT_LA_88 = 0xA, // 16-bit LA GGL_PIXEL_FORMAT_RGB_332 = 0xB, // 8-bit RGB (non paletted) - // YCbCr formats + // YCbCr formats (SP=semi-planar, P=planar) GGL_PIXEL_FORMAT_YCbCr_422_SP= 0x10, GGL_PIXEL_FORMAT_YCbCr_420_SP= 0x11, + GGL_PIXEL_FORMAT_YCbCr_422_P = 0x14, + GGL_PIXEL_FORMAT_YCbCr_420_P = 0x15, // reserved/special formats GGL_PIXEL_FORMAT_Z_16 = 0x18, diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h index 13e134b..c855187 100644 --- a/include/private/android_filesystem_config.h +++ b/include/private/android_filesystem_config.h @@ -150,8 +150,10 @@ static struct fs_path_config android_files[] = { { 00550, AID_ROOT, AID_SHELL, "system/etc/init.testmenu" }, { 00550, AID_ROOT, AID_SHELL, "system/etc/init.gprs-pppd" }, { 00550, AID_DHCP, AID_SHELL, "system/etc/dhcpcd/dhcpcd-run-hooks" }, - { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/hcid.conf" }, { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/dbus.conf" }, + { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/hcid.conf" }, + { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/input.conf" }, + { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/audio.conf" }, { 00440, AID_RADIO, AID_AUDIO, "/system/etc/AudioPara4.csv" }, { 00644, AID_SYSTEM, AID_SYSTEM, "data/app/*" }, { 00644, AID_SYSTEM, AID_SYSTEM, "data/app-private/*" }, diff --git a/include/private/pixelflinger/ggl_context.h b/include/private/pixelflinger/ggl_context.h index 241a0ab..3a030c5 100644 --- a/include/private/pixelflinger/ggl_context.h +++ b/include/private/pixelflinger/ggl_context.h @@ -147,11 +147,11 @@ GGL_RESERVE_NEEDS( P_FOG, 9, 1 ) GGL_RESERVE_NEEDS( P_RESERVED1, 10,22 ) GGL_RESERVE_NEEDS( T_FORMAT, 0, 6 ) -GGL_RESERVE_NEEDS( T_RESERVED0, 6, 2 ) +GGL_RESERVE_NEEDS( T_RESERVED0, 6, 1 ) +GGL_RESERVE_NEEDS( T_POT, 7, 1 ) GGL_RESERVE_NEEDS( T_S_WRAP, 8, 2 ) GGL_RESERVE_NEEDS( T_T_WRAP, 10, 2 ) -GGL_RESERVE_NEEDS( T_ENV, 12, 2 ) -GGL_RESERVE_NEEDS( T_POT, 14, 1 ) +GGL_RESERVE_NEEDS( T_ENV, 12, 3 ) GGL_RESERVE_NEEDS( T_LINEAR, 15, 1 ) const int GGL_NEEDS_WRAP_CLAMP_TO_EDGE = 0; @@ -182,12 +182,14 @@ inline uint32_t ggl_env_to_needs(uint32_t e) { 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 }; + const uint32_t envs[] = { GGL_REPLACE, GGL_MODULATE, + GGL_DECAL, GGL_BLEND, GGL_ADD }; return envs[n]; } |