1.将A27新UI文件夹重命名为CANUI 2.A272O新版本发布
This commit is contained in:
353
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/egl.h
Normal file
353
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/egl.h
Normal file
@ -0,0 +1,353 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* -*- mode: c; tab-width: 8; -*- */
|
||||
/* vi: set sw=4 ts=8: */
|
||||
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __egl_h_
|
||||
#define __egl_h_
|
||||
|
||||
/* All platform-dependent types and macro boilerplate (such as EGLAPI
|
||||
* and EGLAPIENTRY) should go in eglplatform.h.
|
||||
*/
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* EGL Types */
|
||||
/* EGLint is defined in eglplatform.h */
|
||||
typedef unsigned int EGLBoolean;
|
||||
typedef unsigned int EGLenum;
|
||||
typedef void *EGLConfig;
|
||||
typedef void *EGLContext;
|
||||
typedef void *EGLDisplay;
|
||||
typedef void *EGLSurface;
|
||||
typedef void *EGLClientBuffer;
|
||||
|
||||
/* EGL Versioning */
|
||||
#define EGL_VERSION_1_0 1
|
||||
#define EGL_VERSION_1_1 1
|
||||
#define EGL_VERSION_1_2 1
|
||||
#define EGL_VERSION_1_3 1
|
||||
#define EGL_VERSION_1_4 1
|
||||
|
||||
/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
|
||||
* enums are assigned unique values starting at 0x3000.
|
||||
*/
|
||||
|
||||
/* EGL aliases */
|
||||
#define EGL_FALSE 0
|
||||
#define EGL_TRUE 1
|
||||
|
||||
/* Out-of-band handle values */
|
||||
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
|
||||
#define EGL_NO_CONTEXT ((EGLContext)0)
|
||||
#define EGL_NO_DISPLAY ((EGLDisplay)0)
|
||||
#define EGL_NO_SURFACE ((EGLSurface)0)
|
||||
|
||||
/* Out-of-band attribute value */
|
||||
#define EGL_DONT_CARE ((EGLint)-1)
|
||||
|
||||
/* Errors / GetError return values */
|
||||
#define EGL_SUCCESS 0x3000
|
||||
#define EGL_NOT_INITIALIZED 0x3001
|
||||
#define EGL_BAD_ACCESS 0x3002
|
||||
#define EGL_BAD_ALLOC 0x3003
|
||||
#define EGL_BAD_ATTRIBUTE 0x3004
|
||||
#define EGL_BAD_CONFIG 0x3005
|
||||
#define EGL_BAD_CONTEXT 0x3006
|
||||
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
||||
#define EGL_BAD_DISPLAY 0x3008
|
||||
#define EGL_BAD_MATCH 0x3009
|
||||
#define EGL_BAD_NATIVE_PIXMAP 0x300A
|
||||
#define EGL_BAD_NATIVE_WINDOW 0x300B
|
||||
#define EGL_BAD_PARAMETER 0x300C
|
||||
#define EGL_BAD_SURFACE 0x300D
|
||||
#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
|
||||
|
||||
/* Reserved 0x300F-0x301F for additional errors */
|
||||
|
||||
/* Config attributes */
|
||||
#define EGL_BUFFER_SIZE 0x3020
|
||||
#define EGL_ALPHA_SIZE 0x3021
|
||||
#define EGL_BLUE_SIZE 0x3022
|
||||
#define EGL_GREEN_SIZE 0x3023
|
||||
#define EGL_RED_SIZE 0x3024
|
||||
#define EGL_DEPTH_SIZE 0x3025
|
||||
#define EGL_STENCIL_SIZE 0x3026
|
||||
#define EGL_CONFIG_CAVEAT 0x3027
|
||||
#define EGL_CONFIG_ID 0x3028
|
||||
#define EGL_LEVEL 0x3029
|
||||
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||
#define EGL_PRESERVED_RESOURCES 0x3030
|
||||
#define EGL_SAMPLES 0x3031
|
||||
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||
#define EGL_SURFACE_TYPE 0x3033
|
||||
#define EGL_TRANSPARENT_TYPE 0x3034
|
||||
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||
#define EGL_NONE 0x3038 /* Attrib list terminator */
|
||||
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
|
||||
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
||||
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
||||
#define EGL_LUMINANCE_SIZE 0x303D
|
||||
#define EGL_ALPHA_MASK_SIZE 0x303E
|
||||
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
||||
#define EGL_RENDERABLE_TYPE 0x3040
|
||||
#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
|
||||
#define EGL_CONFORMANT 0x3042
|
||||
#define EGL_CONFORMANT_KHR EGL_CONFORMANT
|
||||
|
||||
/* Reserved 0x3041-0x304F for additional config attributes */
|
||||
|
||||
/* Config attribute values */
|
||||
#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
|
||||
#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
|
||||
#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
|
||||
#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
|
||||
#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
|
||||
|
||||
/* More config attribute values, for EGL_TEXTURE_FORMAT */
|
||||
#define EGL_NO_TEXTURE 0x305C
|
||||
#define EGL_TEXTURE_RGB 0x305D
|
||||
#define EGL_TEXTURE_RGBA 0x305E
|
||||
#define EGL_TEXTURE_2D 0x305F
|
||||
|
||||
/* Config attribute mask bits */
|
||||
#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
|
||||
|
||||
#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
|
||||
/* QueryString targets */
|
||||
#define EGL_VENDOR 0x3053
|
||||
#define EGL_VERSION 0x3054
|
||||
#define EGL_EXTENSIONS 0x3055
|
||||
#define EGL_CLIENT_APIS 0x308D
|
||||
|
||||
/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
|
||||
#define EGL_HEIGHT 0x3056
|
||||
#define EGL_WIDTH 0x3057
|
||||
#define EGL_LARGEST_PBUFFER 0x3058
|
||||
#define EGL_TEXTURE_FORMAT 0x3080
|
||||
#define EGL_TEXTURE_TARGET 0x3081
|
||||
#define EGL_MIPMAP_TEXTURE 0x3082
|
||||
#define EGL_MIPMAP_LEVEL 0x3083
|
||||
#define EGL_RENDER_BUFFER 0x3086
|
||||
#define EGL_VG_COLORSPACE 0x3087
|
||||
#define EGL_VG_ALPHA_FORMAT 0x3088
|
||||
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||
#define EGL_VERTICAL_RESOLUTION 0x3091
|
||||
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||
#define EGL_SWAP_BEHAVIOR 0x3093
|
||||
#define EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||
|
||||
/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
|
||||
#define EGL_BACK_BUFFER 0x3084
|
||||
#define EGL_SINGLE_BUFFER 0x3085
|
||||
|
||||
/* OpenVG color spaces */
|
||||
#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
|
||||
#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
|
||||
|
||||
/* OpenVG alpha formats */
|
||||
#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
|
||||
|
||||
/* Constant scale factor by which fractional display resolutions &
|
||||
* aspect ratio are scaled when queried as integer values.
|
||||
*/
|
||||
#define EGL_DISPLAY_SCALING 10000
|
||||
|
||||
/* Unknown display resolution/aspect ratio */
|
||||
#define EGL_UNKNOWN ((EGLint)-1)
|
||||
|
||||
/* Back buffer swap behaviors */
|
||||
#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
|
||||
#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
|
||||
|
||||
/* CreatePbufferFromClientBuffer buffer types */
|
||||
#define EGL_OPENVG_IMAGE 0x3096
|
||||
|
||||
/* QueryContext targets */
|
||||
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||
|
||||
/* CreateContext attributes */
|
||||
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
||||
|
||||
/* Multisample resolution behaviors */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
|
||||
|
||||
/* BindAPI/QueryAPI targets */
|
||||
#define EGL_OPENGL_ES_API 0x30A0
|
||||
#define EGL_OPENVG_API 0x30A1
|
||||
#define EGL_OPENGL_API 0x30A2
|
||||
|
||||
/* GetCurrentSurface targets */
|
||||
#define EGL_DRAW 0x3059
|
||||
#define EGL_READ 0x305A
|
||||
|
||||
/* WaitNative engines */
|
||||
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
||||
|
||||
/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
|
||||
#define EGL_COLORSPACE EGL_VG_COLORSPACE
|
||||
#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
|
||||
#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
|
||||
#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
|
||||
#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
|
||||
#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
|
||||
|
||||
/* EGL extensions must request enum blocks from the Khronos
|
||||
* API Registrar, who maintains the enumerant registry. Submit
|
||||
* a bug in Khronos Bugzilla against task "Registry".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* EGL Functions */
|
||||
|
||||
EGLAPI EGLint EGLAPIENTRY eglGetError(void);
|
||||
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
|
||||
|
||||
EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
|
||||
EGLint config_size, EGLint *num_config);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
|
||||
EGLConfig *configs, EGLint config_size,
|
||||
EGLint *num_config);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
|
||||
EGLNativeWindowType win,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
|
||||
EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
|
||||
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
|
||||
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
|
||||
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
|
||||
EGLConfig config, const EGLint *attrib_list);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint attribute, EGLint value);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
|
||||
|
||||
|
||||
EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
|
||||
EGLContext share_context,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
|
||||
EGLSurface read, EGLContext ctx);
|
||||
|
||||
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLNativePixmapType target);
|
||||
|
||||
/* This is a generic function pointer type, whose name indicates it must
|
||||
* be cast to the proper type *and calling convention* before use.
|
||||
*/
|
||||
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||
|
||||
/* Now, define eglGetProcAddress using the generic function ptr. type */
|
||||
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
|
||||
eglGetProcAddress(const char *procname);
|
||||
|
||||
#if !defined(EGL_EGLEXT_PROTOTYPES)
|
||||
# define EGL_EGLEXT_PROTOTYPES
|
||||
#endif
|
||||
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __egl_h_ */
|
||||
|
171
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/eglVivante.h
Normal file
171
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/eglVivante.h
Normal file
@ -0,0 +1,171 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Vivante specific definitions and declarations for EGL library.
|
||||
*/
|
||||
|
||||
#ifndef __eglvivante_h_
|
||||
#define __eglvivante_h_
|
||||
|
||||
/*
|
||||
USE VDK
|
||||
|
||||
This define enables the VDK linkage for EGL.
|
||||
*/
|
||||
#ifndef USE_VDK
|
||||
# define USE_VDK 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EGLAPIENTRY
|
||||
|
||||
#if USE_VDK
|
||||
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
/* VDK platform independent. */
|
||||
#include <vdkTypes.h>
|
||||
typedef vdkDisplay EGLNativeDisplayType;
|
||||
typedef vdkWindow EGLNativeWindowType;
|
||||
typedef vdkPixmap EGLNativePixmapType;
|
||||
|
||||
#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
/* Win32 and Windows CE platforms. */
|
||||
#include <windows.h>
|
||||
typedef HDC EGLNativeDisplayType;
|
||||
typedef HWND EGLNativeWindowType;
|
||||
typedef HBITMAP EGLNativePixmapType;
|
||||
|
||||
#elif defined(LINUX) && defined(EGL_API_FB)
|
||||
/* Linux platform for FBDEV. */
|
||||
typedef struct _FBDisplay * EGLNativeDisplayType;
|
||||
typedef struct _FBWindow * EGLNativeWindowType;
|
||||
typedef struct _FBPixmap * EGLNativePixmapType;
|
||||
|
||||
EGLNativeDisplayType
|
||||
fbGetDisplay(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
fbGetDisplayGeometry(
|
||||
EGLNativeDisplayType Display,
|
||||
int * Width,
|
||||
int * Height
|
||||
);
|
||||
|
||||
void
|
||||
fbDestroyDisplay(
|
||||
EGLNativeDisplayType Display
|
||||
);
|
||||
|
||||
EGLNativeWindowType
|
||||
fbCreateWindow(
|
||||
EGLNativeDisplayType Display,
|
||||
int X,
|
||||
int Y,
|
||||
int Width,
|
||||
int Height
|
||||
);
|
||||
|
||||
void
|
||||
fbGetWindowGeometry(
|
||||
EGLNativeWindowType Window,
|
||||
int * X,
|
||||
int * Y,
|
||||
int * Width,
|
||||
int * Height
|
||||
);
|
||||
|
||||
void
|
||||
fbDestroyWindow(
|
||||
EGLNativeWindowType Window
|
||||
);
|
||||
|
||||
EGLNativePixmapType
|
||||
fbCreatePixmap(
|
||||
EGLNativeDisplayType Display,
|
||||
int Width,
|
||||
int Height
|
||||
);
|
||||
|
||||
void
|
||||
fbGetPixmapGeometry(
|
||||
EGLNativePixmapType Pixmap,
|
||||
int * Width,
|
||||
int * Height
|
||||
);
|
||||
|
||||
void
|
||||
fbDestroyPixmap(
|
||||
EGLNativePixmapType Pixmap
|
||||
);
|
||||
|
||||
#elif defined(EGL_API_ANDROID)
|
||||
|
||||
#if defined(ANDROID_VERSION_ECLAIR)
|
||||
|
||||
#include <ui/egl/android_natives.h>
|
||||
|
||||
typedef struct android_native_window_t* EGLNativeWindowType;
|
||||
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
|
||||
typedef void* EGLNativeDisplayType;
|
||||
|
||||
#else
|
||||
#include <EGL/eglnatives.h>
|
||||
|
||||
typedef struct egl_native_window_t* EGLNativeWindowType;
|
||||
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
|
||||
typedef void* EGLNativeDisplayType;
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* X11 platform. */
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
typedef Display * EGLNativeDisplayType;
|
||||
typedef Window EGLNativeWindowType;
|
||||
|
||||
#ifdef CUSTOM_PIXMAP
|
||||
typedef void * EGLNativePixmapType;
|
||||
#else
|
||||
typedef Pixmap EGLNativePixmapType;
|
||||
#endif /* CUSTOM_PIXMAP */
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __EGL_EXPORTS
|
||||
# if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
# define EGLAPI __declspec(dllexport)
|
||||
# else
|
||||
# define EGLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __eglvivante_h_ */
|
||||
|
196
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/eglext.h
Normal file
196
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/eglext.h
Normal file
@ -0,0 +1,196 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __eglext_h_
|
||||
#define __eglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
/* Current version at http://www.khronos.org/registry/egl/ */
|
||||
/* $Revision: 1.1 $ on $Date: 2009/12/08 08:07:41 $ */
|
||||
#define EGL_EGLEXT_VERSION 4
|
||||
|
||||
#ifndef EGL_KHR_config_attribs
|
||||
#define EGL_KHR_config_attribs 1
|
||||
#ifndef EGL_CONFORMANT_KHR
|
||||
#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
|
||||
#endif
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_lock_surface
|
||||
#define EGL_KHR_lock_surface 1
|
||||
#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
|
||||
#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
|
||||
#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
#define EGL_KHR_image 1
|
||||
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
|
||||
typedef void *EGLImageKHR;
|
||||
#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_vg_parent_image
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_2D_image
|
||||
#define EGL_KHR_gl_texture_2D_image 1
|
||||
#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_cubemap_image
|
||||
#define EGL_KHR_gl_texture_cubemap_image 1
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_3D_image
|
||||
#define EGL_KHR_gl_texture_3D_image 1
|
||||
#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_renderbuffer_image
|
||||
#define EGL_KHR_gl_renderbuffer_image 1
|
||||
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_reusable_sync
|
||||
#define EGL_KHR_reusable_sync 1
|
||||
|
||||
typedef void* EGLSyncKHR;
|
||||
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
|
||||
|
||||
#define EGL_SYNC_STATUS_KHR 0x30F1
|
||||
#define EGL_SIGNALED_KHR 0x30F2
|
||||
#define EGL_UNSIGNALED_KHR 0x30F3
|
||||
#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
|
||||
#define EGL_CONDITION_SATISFIED_KHR 0x30F6
|
||||
#define EGL_SYNC_TYPE_KHR 0x30F7
|
||||
#define EGL_SYNC_REUSABLE_KHR 0x30FA
|
||||
#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
|
||||
#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
|
||||
#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
|
||||
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHR) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHR) (EGLDisplay dpy, EGLSyncKHR sync);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHR) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHR) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHR) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_base
|
||||
#define EGL_KHR_image_base 1
|
||||
/* Most interfaces defined by EGL_KHR_image_pixmap above */
|
||||
#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_pixmap
|
||||
#define EGL_KHR_image_pixmap 1
|
||||
/* Interfaces defined by EGL_KHR_image above */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_IMG_context_priority
|
||||
#define EGL_IMG_context_priority 1
|
||||
#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
|
||||
#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
|
||||
#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
|
||||
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
90
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/eglplatform.h
Normal file
90
MXC_A27-PCB4.5-CANUI/lib/vg_driver/EGL/eglplatform.h
Normal file
@ -0,0 +1,90 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __eglplatform_h_
|
||||
#define __eglplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
#include <EGL/eglVivante.h>
|
||||
|
||||
/* Macros used in EGL function prototype declarations.
|
||||
*
|
||||
* EGL functions should be prototyped as:
|
||||
*
|
||||
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||
*
|
||||
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
|
||||
*/
|
||||
|
||||
#ifndef EGLAPI
|
||||
#define EGLAPI KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef EGLAPIENTRY
|
||||
#define EGLAPIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
#define EGLAPIENTRYP EGLAPIENTRY*
|
||||
|
||||
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||
* are aliases of window-system-dependent types, such as X Display * or
|
||||
* Windows Device Context. They must be defined in platform-specific
|
||||
* code below. The EGL-prefixed versions of Native*Type are the same
|
||||
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||
*/
|
||||
|
||||
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||
typedef EGLNativeDisplayType NativeDisplayType;
|
||||
typedef EGLNativePixmapType NativePixmapType;
|
||||
typedef EGLNativeWindowType NativeWindowType;
|
||||
|
||||
/* Define EGLint. This must be a signed integral type large enough to contain
|
||||
* all legal attribute names and values passed into and out of EGL, whether
|
||||
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
|
||||
* handle, or other. While in general a 32-bit integer will suffice, if
|
||||
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
|
||||
* integer type.
|
||||
*/
|
||||
typedef khronos_int32_t EGLint;
|
||||
|
||||
#endif /* __eglplatform_h */
|
||||
|
203
MXC_A27-PCB4.5-CANUI/lib/vg_driver/KHR/khrplatform.h
Normal file
203
MXC_A27-PCB4.5-CANUI/lib/vg_driver/KHR/khrplatform.h
Normal file
@ -0,0 +1,203 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the return type of the function and precedes the function
|
||||
* name in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||
/* Win32 but not WinCE */
|
||||
# define KHRONOS_APIENTRY __cdecl
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the closing parenthesis of the function prototype arguments.
|
||||
*/
|
||||
#if defined (__ARMCC_2__)
|
||||
#define KHRONOS_APIATTRIBUTES __softfp
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
#include <stdint.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;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
#include <inttypes.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;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
typedef __int32 khronos_int32_t;
|
||||
typedef unsigned __int32 khronos_uint32_t;
|
||||
typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int khronos_int64_t;
|
||||
typedef unsigned long int khronos_uint64_t;
|
||||
#else
|
||||
typedef long long int khronos_int64_t;
|
||||
typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
#include <stdint.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;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
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;
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
* These types can be used to represent a time interval in nanoseconds or
|
||||
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||
* time the system booted). The Unadjusted System Time is an unsigned
|
||||
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||
* may be either signed or unsigned.
|
||||
*/
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
||||
|
111
MXC_A27-PCB4.5-CANUI/lib/vg_driver/KHR/khrvivante.h
Normal file
111
MXC_A27-PCB4.5-CANUI/lib/vg_driver/KHR/khrvivante.h
Normal file
@ -0,0 +1,111 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Vivante specific definitions and declarations for all API library.
|
||||
*/
|
||||
#ifndef __khrvivante_h_
|
||||
|
||||
#include "gcHalUser.h"
|
||||
|
||||
/* EGL image type enum. */
|
||||
typedef enum _khrIMAGE_TYPE
|
||||
{
|
||||
KHR_IMAGE_TEXTURE_2D = 1,
|
||||
KHR_IMAGE_TEXTURE_CUBE,
|
||||
KHR_IMAGE_TEXTURE_3D,
|
||||
KHR_IMAGE_RENDER_BUFFER,
|
||||
KHR_IMAGE_VG_IMAGE,
|
||||
KHR_IMAGE_PIXMAP,
|
||||
#ifdef EGL_API_ANDROID
|
||||
KHR_IMAGE_ANDROID_NATIVE_BUFFER,
|
||||
#endif
|
||||
} khrIMAGE_TYPE;
|
||||
|
||||
#define KHR_EGL_IMAGE_MAGIC_NUM gcmCC('I','M','A','G')
|
||||
|
||||
/* EGL Image */
|
||||
typedef struct _khrEGL_IMAGE
|
||||
{
|
||||
gctUINT magic;
|
||||
khrIMAGE_TYPE type;
|
||||
gcoSURF surface;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
gctUINT width;
|
||||
gctUINT height;
|
||||
|
||||
/* Format defined in GLES. */
|
||||
gctUINT format;
|
||||
|
||||
gctINT level;
|
||||
gctINT face;
|
||||
gctINT depth;
|
||||
|
||||
/* Address offset in surface, for cubemap. */
|
||||
gctUINT32 offset;
|
||||
|
||||
gctINT texture;
|
||||
gctPOINTER ojbect;
|
||||
} texture;
|
||||
|
||||
struct
|
||||
{
|
||||
gctUINT width;
|
||||
gctUINT height;
|
||||
gceSURF_FORMAT format;
|
||||
gctINT stride;
|
||||
|
||||
gctPOINTER address;
|
||||
} pixmap;
|
||||
|
||||
struct
|
||||
{
|
||||
gctUINT width;
|
||||
gctUINT height;
|
||||
gctUINT offset_x;
|
||||
gctUINT offset_y;
|
||||
|
||||
gctUINT format;
|
||||
gctUINT allowedQuality;
|
||||
} vgimage;
|
||||
|
||||
#ifdef EGL_API_ANDROID
|
||||
struct
|
||||
{
|
||||
gctUINT width;
|
||||
gctUINT height;
|
||||
gceSURF_FORMAT format;
|
||||
gctINT stride;
|
||||
gctPOINTER address;
|
||||
|
||||
gctPOINTER native;
|
||||
} androidNativeBuffer;
|
||||
#endif
|
||||
} u;
|
||||
}
|
||||
khrEGL_IMAGE;
|
||||
|
||||
typedef khrEGL_IMAGE * khrEGL_IMAGE_PTR;
|
||||
|
||||
#define __khrvivante_h_
|
||||
#endif
|
||||
|
797
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/openvg.h
Normal file
797
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/openvg.h
Normal file
@ -0,0 +1,797 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* $Revision: 1.1 $ on $Date: 2009/06/24 01:54:43 $ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* OpenVG 1.1 Reference Implementation
|
||||
* -------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief OpenVG 1.1 API.
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OPENVG_H
|
||||
#define _OPENVG_H
|
||||
|
||||
#include <VG/vgplatform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OPENVG_VERSION_1_0 1
|
||||
#define OPENVG_VERSION_1_0_1 1
|
||||
#define OPENVG_VERSION_1_1 2
|
||||
|
||||
#ifndef VG_MAXSHORT
|
||||
#define VG_MAXSHORT 0x7FFF
|
||||
#endif
|
||||
|
||||
#ifndef VG_MAXINT
|
||||
#define VG_MAXINT 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
#ifndef VG_MAX_ENUM
|
||||
#define VG_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
typedef VGuint VGHandle;
|
||||
|
||||
typedef VGHandle VGPath;
|
||||
typedef VGHandle VGImage;
|
||||
typedef VGHandle VGMaskLayer;
|
||||
typedef VGHandle VGFont;
|
||||
typedef VGHandle VGPaint;
|
||||
|
||||
#define VG_INVALID_HANDLE ((VGHandle)0)
|
||||
|
||||
typedef enum {
|
||||
VG_FALSE = 0,
|
||||
VG_TRUE = 1,
|
||||
|
||||
VG_BOOLEAN_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGboolean;
|
||||
|
||||
typedef enum {
|
||||
VG_NO_ERROR = 0,
|
||||
VG_BAD_HANDLE_ERROR = 0x1000,
|
||||
VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
|
||||
VG_OUT_OF_MEMORY_ERROR = 0x1002,
|
||||
VG_PATH_CAPABILITY_ERROR = 0x1003,
|
||||
VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
|
||||
VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
|
||||
VG_IMAGE_IN_USE_ERROR = 0x1006,
|
||||
VG_NO_CONTEXT_ERROR = 0x1007,
|
||||
|
||||
VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGErrorCode;
|
||||
|
||||
typedef enum {
|
||||
/* Mode settings */
|
||||
VG_MATRIX_MODE = 0x1100,
|
||||
VG_FILL_RULE = 0x1101,
|
||||
VG_IMAGE_QUALITY = 0x1102,
|
||||
VG_RENDERING_QUALITY = 0x1103,
|
||||
VG_BLEND_MODE = 0x1104,
|
||||
VG_IMAGE_MODE = 0x1105,
|
||||
|
||||
/* Scissoring rectangles */
|
||||
VG_SCISSOR_RECTS = 0x1106,
|
||||
|
||||
/* Color Transformation */
|
||||
VG_COLOR_TRANSFORM = 0x1170,
|
||||
VG_COLOR_TRANSFORM_VALUES = 0x1171,
|
||||
|
||||
/* Stroke parameters */
|
||||
VG_STROKE_LINE_WIDTH = 0x1110,
|
||||
VG_STROKE_CAP_STYLE = 0x1111,
|
||||
VG_STROKE_JOIN_STYLE = 0x1112,
|
||||
VG_STROKE_MITER_LIMIT = 0x1113,
|
||||
VG_STROKE_DASH_PATTERN = 0x1114,
|
||||
VG_STROKE_DASH_PHASE = 0x1115,
|
||||
VG_STROKE_DASH_PHASE_RESET = 0x1116,
|
||||
|
||||
/* Edge fill color for VG_TILE_FILL tiling mode */
|
||||
VG_TILE_FILL_COLOR = 0x1120,
|
||||
|
||||
/* Color for vgClear */
|
||||
VG_CLEAR_COLOR = 0x1121,
|
||||
|
||||
/* Glyph origin */
|
||||
VG_GLYPH_ORIGIN = 0x1122,
|
||||
|
||||
/* Enable/disable alpha masking and scissoring */
|
||||
VG_MASKING = 0x1130,
|
||||
VG_SCISSORING = 0x1131,
|
||||
|
||||
/* Pixel layout information */
|
||||
VG_PIXEL_LAYOUT = 0x1140,
|
||||
VG_SCREEN_LAYOUT = 0x1141,
|
||||
|
||||
/* Source format selection for image filters */
|
||||
VG_FILTER_FORMAT_LINEAR = 0x1150,
|
||||
VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
|
||||
|
||||
/* Destination write enable mask for image filters */
|
||||
VG_FILTER_CHANNEL_MASK = 0x1152,
|
||||
|
||||
/* Implementation limits (read-only) */
|
||||
VG_MAX_SCISSOR_RECTS = 0x1160,
|
||||
VG_MAX_DASH_COUNT = 0x1161,
|
||||
VG_MAX_KERNEL_SIZE = 0x1162,
|
||||
VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
|
||||
VG_MAX_COLOR_RAMP_STOPS = 0x1164,
|
||||
VG_MAX_IMAGE_WIDTH = 0x1165,
|
||||
VG_MAX_IMAGE_HEIGHT = 0x1166,
|
||||
VG_MAX_IMAGE_PIXELS = 0x1167,
|
||||
VG_MAX_IMAGE_BYTES = 0x1168,
|
||||
VG_MAX_FLOAT = 0x1169,
|
||||
VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A,
|
||||
|
||||
VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
|
||||
VG_RENDERING_QUALITY_FASTER = 0x1201,
|
||||
VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */
|
||||
|
||||
VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGRenderingQuality;
|
||||
|
||||
typedef enum {
|
||||
VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
|
||||
VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
|
||||
VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
|
||||
VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
|
||||
VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304,
|
||||
|
||||
VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPixelLayout;
|
||||
|
||||
typedef enum {
|
||||
VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
|
||||
VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
|
||||
VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
|
||||
VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
|
||||
VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404,
|
||||
|
||||
VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGMatrixMode;
|
||||
|
||||
typedef enum {
|
||||
VG_CLEAR_MASK = 0x1500,
|
||||
VG_FILL_MASK = 0x1501,
|
||||
VG_SET_MASK = 0x1502,
|
||||
VG_UNION_MASK = 0x1503,
|
||||
VG_INTERSECT_MASK = 0x1504,
|
||||
VG_SUBTRACT_MASK = 0x1505,
|
||||
|
||||
VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGMaskOperation;
|
||||
|
||||
#define VG_PATH_FORMAT_STANDARD 0
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_DATATYPE_S_8 = 0,
|
||||
VG_PATH_DATATYPE_S_16 = 1,
|
||||
VG_PATH_DATATYPE_S_32 = 2,
|
||||
VG_PATH_DATATYPE_F = 3,
|
||||
|
||||
VG_PATH_DATATYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathDatatype;
|
||||
|
||||
typedef enum {
|
||||
VG_ABSOLUTE = 0,
|
||||
VG_RELATIVE = 1,
|
||||
|
||||
VG_PATH_ABS_REL_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathAbsRel;
|
||||
|
||||
typedef enum {
|
||||
VG_CLOSE_PATH = ( 0 << 1),
|
||||
VG_MOVE_TO = ( 1 << 1),
|
||||
VG_LINE_TO = ( 2 << 1),
|
||||
VG_HLINE_TO = ( 3 << 1),
|
||||
VG_VLINE_TO = ( 4 << 1),
|
||||
VG_QUAD_TO = ( 5 << 1),
|
||||
VG_CUBIC_TO = ( 6 << 1),
|
||||
VG_SQUAD_TO = ( 7 << 1),
|
||||
VG_SCUBIC_TO = ( 8 << 1),
|
||||
VG_SCCWARC_TO = ( 9 << 1),
|
||||
VG_SCWARC_TO = (10 << 1),
|
||||
VG_LCCWARC_TO = (11 << 1),
|
||||
VG_LCWARC_TO = (12 << 1),
|
||||
|
||||
VG_PATH_SEGMENT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathSegment;
|
||||
|
||||
typedef enum {
|
||||
VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
|
||||
VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
|
||||
VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
|
||||
VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
|
||||
VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
|
||||
VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
|
||||
VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
|
||||
VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
|
||||
VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
|
||||
VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
|
||||
VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
|
||||
VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
|
||||
VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
|
||||
VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
|
||||
VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
|
||||
VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
|
||||
VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
|
||||
VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
|
||||
VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
|
||||
VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
|
||||
VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
|
||||
VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
|
||||
VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
|
||||
VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE,
|
||||
|
||||
VG_PATH_COMMAND_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathCommand;
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
|
||||
VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
|
||||
VG_PATH_CAPABILITY_MODIFY = (1 << 2),
|
||||
VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
|
||||
VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
|
||||
VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
|
||||
VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
|
||||
VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
|
||||
VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
|
||||
VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
|
||||
VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
|
||||
VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
|
||||
VG_PATH_CAPABILITY_ALL = (1 << 12) - 1,
|
||||
|
||||
VG_PATH_CAPABILITIES_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathCapabilities;
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_FORMAT = 0x1600,
|
||||
VG_PATH_DATATYPE = 0x1601,
|
||||
VG_PATH_SCALE = 0x1602,
|
||||
VG_PATH_BIAS = 0x1603,
|
||||
VG_PATH_NUM_SEGMENTS = 0x1604,
|
||||
VG_PATH_NUM_COORDS = 0x1605,
|
||||
|
||||
VG_PATH_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_CAP_BUTT = 0x1700,
|
||||
VG_CAP_ROUND = 0x1701,
|
||||
VG_CAP_SQUARE = 0x1702,
|
||||
|
||||
VG_CAP_STYLE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGCapStyle;
|
||||
|
||||
typedef enum {
|
||||
VG_JOIN_MITER = 0x1800,
|
||||
VG_JOIN_ROUND = 0x1801,
|
||||
VG_JOIN_BEVEL = 0x1802,
|
||||
|
||||
VG_JOIN_STYLE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGJoinStyle;
|
||||
|
||||
typedef enum {
|
||||
VG_EVEN_ODD = 0x1900,
|
||||
VG_NON_ZERO = 0x1901,
|
||||
|
||||
VG_FILL_RULE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGFillRule;
|
||||
|
||||
typedef enum {
|
||||
VG_STROKE_PATH = (1 << 0),
|
||||
VG_FILL_PATH = (1 << 1),
|
||||
|
||||
VG_PAINT_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintMode;
|
||||
|
||||
typedef enum {
|
||||
/* Color paint parameters */
|
||||
VG_PAINT_TYPE = 0x1A00,
|
||||
VG_PAINT_COLOR = 0x1A01,
|
||||
VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
|
||||
VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
|
||||
VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
|
||||
|
||||
/* Linear gradient paint parameters */
|
||||
VG_PAINT_LINEAR_GRADIENT = 0x1A04,
|
||||
|
||||
/* Radial gradient paint parameters */
|
||||
VG_PAINT_RADIAL_GRADIENT = 0x1A05,
|
||||
|
||||
/* Pattern paint parameters */
|
||||
VG_PAINT_PATTERN_TILING_MODE = 0x1A06,
|
||||
|
||||
VG_PAINT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_PAINT_TYPE_COLOR = 0x1B00,
|
||||
VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
|
||||
VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
|
||||
VG_PAINT_TYPE_PATTERN = 0x1B03,
|
||||
|
||||
VG_PAINT_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintType;
|
||||
|
||||
typedef enum {
|
||||
VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
|
||||
VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
|
||||
VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02,
|
||||
|
||||
VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGColorRampSpreadMode;
|
||||
|
||||
typedef enum {
|
||||
VG_TILE_FILL = 0x1D00,
|
||||
VG_TILE_PAD = 0x1D01,
|
||||
VG_TILE_REPEAT = 0x1D02,
|
||||
VG_TILE_REFLECT = 0x1D03,
|
||||
|
||||
VG_TILING_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGTilingMode;
|
||||
|
||||
typedef enum {
|
||||
/* RGB{A,X} channel ordering */
|
||||
VG_sRGBX_8888 = 0,
|
||||
VG_sRGBA_8888 = 1,
|
||||
VG_sRGBA_8888_PRE = 2,
|
||||
VG_sRGB_565 = 3,
|
||||
VG_sRGBA_5551 = 4,
|
||||
VG_sRGBA_4444 = 5,
|
||||
VG_sL_8 = 6,
|
||||
VG_lRGBX_8888 = 7,
|
||||
VG_lRGBA_8888 = 8,
|
||||
VG_lRGBA_8888_PRE = 9,
|
||||
VG_lL_8 = 10,
|
||||
VG_A_8 = 11,
|
||||
VG_BW_1 = 12,
|
||||
VG_A_1 = 13,
|
||||
VG_A_4 = 14,
|
||||
|
||||
/* {A,X}RGB channel ordering */
|
||||
VG_sXRGB_8888 = 0 | (1 << 6),
|
||||
VG_sARGB_8888 = 1 | (1 << 6),
|
||||
VG_sARGB_8888_PRE = 2 | (1 << 6),
|
||||
VG_sARGB_1555 = 4 | (1 << 6),
|
||||
VG_sARGB_4444 = 5 | (1 << 6),
|
||||
VG_lXRGB_8888 = 7 | (1 << 6),
|
||||
VG_lARGB_8888 = 8 | (1 << 6),
|
||||
VG_lARGB_8888_PRE = 9 | (1 << 6),
|
||||
|
||||
/* BGR{A,X} channel ordering */
|
||||
VG_sBGRX_8888 = 0 | (1 << 7),
|
||||
VG_sBGRA_8888 = 1 | (1 << 7),
|
||||
VG_sBGRA_8888_PRE = 2 | (1 << 7),
|
||||
VG_sBGR_565 = 3 | (1 << 7),
|
||||
VG_sBGRA_5551 = 4 | (1 << 7),
|
||||
VG_sBGRA_4444 = 5 | (1 << 7),
|
||||
VG_lBGRX_8888 = 7 | (1 << 7),
|
||||
VG_lBGRA_8888 = 8 | (1 << 7),
|
||||
VG_lBGRA_8888_PRE = 9 | (1 << 7),
|
||||
|
||||
/* {A,X}BGR channel ordering */
|
||||
VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
|
||||
VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
|
||||
VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
|
||||
VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7),
|
||||
|
||||
VG_IMAGE_FORMAT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageFormat;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
|
||||
VG_IMAGE_QUALITY_FASTER = (1 << 1),
|
||||
VG_IMAGE_QUALITY_BETTER = (1 << 2),
|
||||
|
||||
VG_IMAGE_QUALITY_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageQuality;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_FORMAT = 0x1E00,
|
||||
VG_IMAGE_WIDTH = 0x1E01,
|
||||
VG_IMAGE_HEIGHT = 0x1E02,
|
||||
|
||||
VG_IMAGE_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_DRAW_IMAGE_NORMAL = 0x1F00,
|
||||
VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
|
||||
VG_DRAW_IMAGE_STENCIL = 0x1F02,
|
||||
|
||||
VG_IMAGE_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageMode;
|
||||
|
||||
typedef enum {
|
||||
VG_RED = (1 << 3),
|
||||
VG_GREEN = (1 << 2),
|
||||
VG_BLUE = (1 << 1),
|
||||
VG_ALPHA = (1 << 0),
|
||||
|
||||
VG_IMAGE_CHANNEL_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageChannel;
|
||||
|
||||
typedef enum {
|
||||
VG_BLEND_SRC = 0x2000,
|
||||
VG_BLEND_SRC_OVER = 0x2001,
|
||||
VG_BLEND_DST_OVER = 0x2002,
|
||||
VG_BLEND_SRC_IN = 0x2003,
|
||||
VG_BLEND_DST_IN = 0x2004,
|
||||
VG_BLEND_MULTIPLY = 0x2005,
|
||||
VG_BLEND_SCREEN = 0x2006,
|
||||
VG_BLEND_DARKEN = 0x2007,
|
||||
VG_BLEND_LIGHTEN = 0x2008,
|
||||
VG_BLEND_ADDITIVE = 0x2009,
|
||||
|
||||
VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGBlendMode;
|
||||
|
||||
typedef enum {
|
||||
VG_FONT_NUM_GLYPHS = 0x2F00,
|
||||
|
||||
VG_FONT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGFontParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_FORMAT_QUERY = 0x2100,
|
||||
VG_PATH_DATATYPE_QUERY = 0x2101,
|
||||
|
||||
VG_HARDWARE_QUERY_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGHardwareQueryType;
|
||||
|
||||
typedef enum {
|
||||
VG_HARDWARE_ACCELERATED = 0x2200,
|
||||
VG_HARDWARE_UNACCELERATED = 0x2201,
|
||||
|
||||
VG_HARDWARE_QUERY_RESULT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGHardwareQueryResult;
|
||||
|
||||
typedef enum {
|
||||
VG_VENDOR = 0x2300,
|
||||
VG_RENDERER = 0x2301,
|
||||
VG_VERSION = 0x2302,
|
||||
VG_EXTENSIONS = 0x2303,
|
||||
|
||||
VG_STRING_ID_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGStringID;
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
#ifndef VG_API_CALL
|
||||
# error VG_API_CALL must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_ENTRY
|
||||
# error VG_API_ENTRY must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_EXIT
|
||||
# error VG_API_EXIT must be defined
|
||||
#endif
|
||||
|
||||
VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL void VG_API_ENTRY vgFlush(void) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgFinish(void) VG_API_EXIT;
|
||||
|
||||
/* Getters and Setters */
|
||||
VG_API_CALL void VG_API_ENTRY vgSetf (VGParamType type, VGfloat value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSeti (VGParamType type, VGint value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetfv(VGParamType type, VGint count,
|
||||
const VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetiv(VGParamType type, VGint count,
|
||||
const VGint * values) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL VGfloat VG_API_ENTRY vgGetf(VGParamType type) VG_API_EXIT;
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGeti(VGParamType type) VG_API_EXIT;
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetVectorSize(VGParamType type) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetfv(VGParamType type, VGint count, VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetiv(VGParamType type, VGint count, VGint * values) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameterf(VGHandle object,
|
||||
VGint paramType,
|
||||
VGfloat value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameteri(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameterfv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, const VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameteriv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, const VGint * values) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL VGfloat VG_API_ENTRY vgGetParameterf(VGHandle object,
|
||||
VGint paramType) VG_API_EXIT;
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetParameteri(VGHandle object,
|
||||
VGint paramType);
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetParameterVectorSize(VGHandle object,
|
||||
VGint paramType) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetParameterfv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetParameteriv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, VGint * values) VG_API_EXIT;
|
||||
|
||||
/* Matrix Manipulation */
|
||||
VG_API_CALL void VG_API_ENTRY vgLoadIdentity(void) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgLoadMatrix(const VGfloat * m) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetMatrix(VGfloat * m) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgMultMatrix(const VGfloat * m) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgTranslate(VGfloat tx, VGfloat ty) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgScale(VGfloat sx, VGfloat sy) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgShear(VGfloat shx, VGfloat shy) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT;
|
||||
|
||||
/* Masking and Clearing */
|
||||
VG_API_CALL void VG_API_ENTRY vgMask(VGHandle mask, VGMaskOperation operation,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgRenderToMask(VGPath path,
|
||||
VGbitfield paintModes,
|
||||
VGMaskOperation operation) VG_API_EXIT;
|
||||
VG_API_CALL VGMaskLayer VG_API_ENTRY vgCreateMaskLayer(VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgFillMaskLayer(VGMaskLayer maskLayer,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height,
|
||||
VGfloat value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgCopyMask(VGMaskLayer maskLayer,
|
||||
VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
|
||||
/* Paths */
|
||||
VG_API_CALL VGPath VG_API_ENTRY vgCreatePath(VGint pathFormat,
|
||||
VGPathDatatype datatype,
|
||||
VGfloat scale, VGfloat bias,
|
||||
VGint segmentCapacityHint,
|
||||
VGint coordCapacityHint,
|
||||
VGbitfield capabilities) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClearPath(VGPath path, VGbitfield capabilities) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyPath(VGPath path) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgRemovePathCapabilities(VGPath path,
|
||||
VGbitfield capabilities) VG_API_EXIT;
|
||||
VG_API_CALL VGbitfield VG_API_ENTRY vgGetPathCapabilities(VGPath path) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgAppendPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgAppendPathData(VGPath dstPath,
|
||||
VGint numSegments,
|
||||
const VGubyte * pathSegments,
|
||||
const void * pathData) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgModifyPathCoords(VGPath dstPath, VGint startIndex,
|
||||
VGint numSegments,
|
||||
const void * pathData) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgTransformPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
|
||||
VG_API_CALL VGboolean VG_API_ENTRY vgInterpolatePath(VGPath dstPath,
|
||||
VGPath startPath,
|
||||
VGPath endPath,
|
||||
VGfloat amount) VG_API_EXIT;
|
||||
VG_API_CALL VGfloat VG_API_ENTRY vgPathLength(VGPath path,
|
||||
VGint startSegment, VGint numSegments) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPointAlongPath(VGPath path,
|
||||
VGint startSegment, VGint numSegments,
|
||||
VGfloat distance,
|
||||
VGfloat * x, VGfloat * y,
|
||||
VGfloat * tangentX, VGfloat * tangentY) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPathBounds(VGPath path,
|
||||
VGfloat * minX, VGfloat * minY,
|
||||
VGfloat * width, VGfloat * height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPathTransformedBounds(VGPath path,
|
||||
VGfloat * minX, VGfloat * minY,
|
||||
VGfloat * width, VGfloat * height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawPath(VGPath path, VGbitfield paintModes) VG_API_EXIT;
|
||||
|
||||
/* Paint */
|
||||
VG_API_CALL VGPaint VG_API_ENTRY vgCreatePaint(void) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyPaint(VGPaint paint) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_API_EXIT;
|
||||
VG_API_CALL VGPaint VG_API_ENTRY vgGetPaint(VGPaintMode paintMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetColor(VGPaint paint, VGuint rgba) VG_API_EXIT;
|
||||
VG_API_CALL VGuint VG_API_ENTRY vgGetColor(VGPaint paint) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPaintPattern(VGPaint paint, VGImage pattern) VG_API_EXIT;
|
||||
|
||||
/* Images */
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgCreateImage(VGImageFormat format,
|
||||
VGint width, VGint height,
|
||||
VGbitfield allowedQuality) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyImage(VGImage image) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClearImage(VGImage image,
|
||||
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgImageSubData(VGImage image,
|
||||
const void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image,
|
||||
void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent,
|
||||
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy,
|
||||
VGImage src, VGint sx, VGint sy,
|
||||
VGint width, VGint height,
|
||||
VGboolean dither) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawImage(VGImage image) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetPixels(VGint dx, VGint dy,
|
||||
VGImage src, VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgWritePixels(const void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint dx, VGint dy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetPixels(VGImage dst, VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgReadPixels(void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgCopyPixels(VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
|
||||
/* Text */
|
||||
VG_API_CALL VGFont VG_API_ENTRY vgCreateFont(VGint glyphCapacityHint) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyFont(VGFont font) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetGlyphToPath(VGFont font,
|
||||
VGuint glyphIndex,
|
||||
VGPath path,
|
||||
VGboolean isHinted,
|
||||
VGfloat glyphOrigin [2],
|
||||
VGfloat escapement[2]) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetGlyphToImage(VGFont font,
|
||||
VGuint glyphIndex,
|
||||
VGImage image,
|
||||
VGfloat glyphOrigin [2],
|
||||
VGfloat escapement[2]) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClearGlyph(VGFont font,VGuint glyphIndex) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font,
|
||||
VGuint glyphIndex,
|
||||
VGbitfield paintModes,
|
||||
VGboolean allowAutoHinting) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawGlyphs(VGFont font,
|
||||
VGint glyphCount,
|
||||
VGuint *glyphIndices,
|
||||
VGfloat *adjustments_x,
|
||||
VGfloat *adjustments_y,
|
||||
VGbitfield paintModes,
|
||||
VGboolean allowAutoHinting) VG_API_EXIT;
|
||||
|
||||
/* Image Filters */
|
||||
VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src,
|
||||
const VGfloat * matrix) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgConvolve(VGImage dst, VGImage src,
|
||||
VGint kernelWidth, VGint kernelHeight,
|
||||
VGint shiftX, VGint shiftY,
|
||||
const VGshort * kernel,
|
||||
VGfloat scale,
|
||||
VGfloat bias,
|
||||
VGTilingMode tilingMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSeparableConvolve(VGImage dst, VGImage src,
|
||||
VGint kernelWidth,
|
||||
VGint kernelHeight,
|
||||
VGint shiftX, VGint shiftY,
|
||||
const VGshort * kernelX,
|
||||
const VGshort * kernelY,
|
||||
VGfloat scale,
|
||||
VGfloat bias,
|
||||
VGTilingMode tilingMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGaussianBlur(VGImage dst, VGImage src,
|
||||
VGfloat stdDeviationX,
|
||||
VGfloat stdDeviationY,
|
||||
VGTilingMode tilingMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgLookup(VGImage dst, VGImage src,
|
||||
const VGubyte * redLUT,
|
||||
const VGubyte * greenLUT,
|
||||
const VGubyte * blueLUT,
|
||||
const VGubyte * alphaLUT,
|
||||
VGboolean outputLinear,
|
||||
VGboolean outputPremultiplied) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgLookupSingle(VGImage dst, VGImage src,
|
||||
const VGuint * lookupTable,
|
||||
VGImageChannel sourceChannel,
|
||||
VGboolean outputLinear,
|
||||
VGboolean outputPremultiplied) VG_API_EXIT;
|
||||
|
||||
/* Hardware Queries */
|
||||
VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryType key,
|
||||
VGint setting) VG_API_EXIT;
|
||||
|
||||
/* Renderer and Extension Information */
|
||||
VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawImageDirect(
|
||||
char *ImageData,
|
||||
VGint ImageWidth,
|
||||
VGint ImageHeight,
|
||||
VGint ImageStride,
|
||||
// 开窗区域
|
||||
VGint x,
|
||||
VGint y,
|
||||
VGint w,
|
||||
VGint h,
|
||||
VGbitfield AllowedQuality,
|
||||
VGImageFormat Format
|
||||
);
|
||||
|
||||
/* 20211215 扫描VideoMemory空闲内存字节总长度及最大可分配内存字节长度 */
|
||||
VG_API_CALL void VG_API_ENTRY vgScanVideoMemoryUsage (
|
||||
VGuint* TotalFreeBytes, /* VideoMemory空闲内存字节总长度 */
|
||||
VGuint* MaximumAllocateBytes /* VideoMemory最大可分配内存字节长度 */
|
||||
);
|
||||
|
||||
/* 20220303 VG_SET_MASK支持target开窗操作 */
|
||||
VG_API_CALL void VG_API_ENTRY vgMaskEx(
|
||||
VGHandle Mask,
|
||||
VGMaskOperation Operation,
|
||||
VGint X,
|
||||
VGint Y,
|
||||
VGint Width,
|
||||
VGint Height,
|
||||
VGint TargetX,
|
||||
VGint TargetY
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _OPENVG_H */
|
||||
|
251
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/vgext.h
Normal file
251
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/vgext.h
Normal file
@ -0,0 +1,251 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* $Revision: 1.1 $ on $Date: 2009/06/24 01:54:43 $ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* VG extensions Reference Implementation
|
||||
* -------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief VG extensions
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
#ifndef _VGEXT_H
|
||||
#define _VGEXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <VG/openvg.h>
|
||||
#include <VG/vgu.h>
|
||||
|
||||
#ifndef VG_API_ENTRYP
|
||||
# define VG_API_ENTRYP VG_API_ENTRY*
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_ENTRYP
|
||||
# define VGU_API_ENTRYP VGU_API_ENTRY*
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------------
|
||||
* KHR extensions
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
typedef enum {
|
||||
|
||||
#ifndef VG_KHR_iterative_average_blur
|
||||
VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B,
|
||||
VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,
|
||||
VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D,
|
||||
#endif
|
||||
|
||||
VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGParamTypeKHR;
|
||||
|
||||
#ifndef VG_KHR_EGL_image
|
||||
#define VG_KHR_EGL_image 1
|
||||
/* VGEGLImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* VGeglImageKHR;
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
|
||||
#endif
|
||||
typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VG_KHR_iterative_average_blur
|
||||
#define VG_KHR_iterative_average_blur 1
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
|
||||
#endif
|
||||
typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VG_KHR_advanced_blending
|
||||
#define VG_KHR_advanced_blending 1
|
||||
|
||||
typedef enum {
|
||||
VG_BLEND_OVERLAY_KHR = 0x2010,
|
||||
VG_BLEND_HARDLIGHT_KHR = 0x2011,
|
||||
VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,
|
||||
VG_BLEND_SOFTLIGHT_KHR = 0x2013,
|
||||
VG_BLEND_COLORDODGE_KHR = 0x2014,
|
||||
VG_BLEND_COLORBURN_KHR = 0x2015,
|
||||
VG_BLEND_DIFFERENCE_KHR = 0x2016,
|
||||
VG_BLEND_SUBTRACT_KHR = 0x2017,
|
||||
VG_BLEND_INVERT_KHR = 0x2018,
|
||||
VG_BLEND_EXCLUSION_KHR = 0x2019,
|
||||
VG_BLEND_LINEARDODGE_KHR = 0x201a,
|
||||
VG_BLEND_LINEARBURN_KHR = 0x201b,
|
||||
VG_BLEND_VIVIDLIGHT_KHR = 0x201c,
|
||||
VG_BLEND_LINEARLIGHT_KHR = 0x201d,
|
||||
VG_BLEND_PINLIGHT_KHR = 0x201e,
|
||||
VG_BLEND_HARDMIX_KHR = 0x201f,
|
||||
VG_BLEND_CLEAR_KHR = 0x2020,
|
||||
VG_BLEND_DST_KHR = 0x2021,
|
||||
VG_BLEND_SRC_OUT_KHR = 0x2022,
|
||||
VG_BLEND_DST_OUT_KHR = 0x2023,
|
||||
VG_BLEND_SRC_ATOP_KHR = 0x2024,
|
||||
VG_BLEND_DST_ATOP_KHR = 0x2025,
|
||||
VG_BLEND_XOR_KHR = 0x2026,
|
||||
|
||||
VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM
|
||||
} VGBlendModeKHR;
|
||||
#endif
|
||||
|
||||
#ifndef VG_KHR_parametric_filter
|
||||
#define VG_KHR_parametric_filter 1
|
||||
|
||||
typedef enum {
|
||||
VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
|
||||
VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1),
|
||||
VG_PF_OUTER_FLAG_KHR = (1 << 2),
|
||||
VG_PF_INNER_FLAG_KHR = (1 << 3),
|
||||
|
||||
VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPfTypeKHR;
|
||||
|
||||
typedef enum {
|
||||
VGU_IMAGE_IN_USE_ERROR = 0xF010,
|
||||
|
||||
VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGUErrorCodeKHR;
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
|
||||
#endif
|
||||
typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------
|
||||
* NDS extensions
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef VG_NDS_paint_generation
|
||||
#define VG_NDS_paint_generation 1
|
||||
|
||||
typedef enum {
|
||||
VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,
|
||||
VG_COLOR_MATRIX_NDS = 0x1A11,
|
||||
VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,
|
||||
|
||||
VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintParamTypeNds;
|
||||
|
||||
typedef enum {
|
||||
VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10,
|
||||
|
||||
VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageModeNds;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VG_NDS_projective_geometry
|
||||
#define VG_NDS_projective_geometry 1
|
||||
|
||||
typedef enum {
|
||||
VG_CLIP_MODE_NDS = 0x1180,
|
||||
VG_CLIP_LINES_NDS = 0x1181,
|
||||
VG_MAX_CLIP_LINES_NDS = 0x1182,
|
||||
|
||||
VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGParamTypeNds;
|
||||
|
||||
typedef enum {
|
||||
VG_CLIPMODE_NONE_NDS = 0x3000,
|
||||
VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001,
|
||||
VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002,
|
||||
VG_CLIPMODE_CULL_NDS = 0x3003,
|
||||
|
||||
VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGClipModeNds;
|
||||
|
||||
typedef enum {
|
||||
VG_RQUAD_TO_NDS = ( 13 << 1 ),
|
||||
VG_RCUBIC_TO_NDS = ( 14 << 1 ),
|
||||
|
||||
VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathSegmentNds;
|
||||
|
||||
typedef enum {
|
||||
VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE),
|
||||
VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE),
|
||||
VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE),
|
||||
VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE),
|
||||
|
||||
VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathCommandNds;
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
|
||||
#endif
|
||||
typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _VGEXT_H */
|
||||
|
124
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/vgplatform.h
Normal file
124
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/vgplatform.h
Normal file
@ -0,0 +1,124 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* $Revision: 1.1 $ on $Date: 2009/06/24 01:54:43 $ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* VG platform specific header Reference Implementation
|
||||
* ----------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief VG platform specific header
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _VGPLATFORM_H
|
||||
#define _VGPLATFORM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_CALL
|
||||
#if defined(OPENVG_STATIC_LIBRARY)
|
||||
# define VG_API_CALL
|
||||
#else
|
||||
# if defined(_WIN32) || defined(__VC32__) /* Win32 */
|
||||
# if defined (OPENVG_DLL_EXPORTS)
|
||||
# define VG_API_CALL __declspec(dllexport)
|
||||
# else
|
||||
# define VG_API_CALL __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define VG_API_CALL extern
|
||||
# endif /* defined(_WIN32) ||... */
|
||||
#endif /* defined OPENVG_STATIC_LIBRARY */
|
||||
#endif /* ifndef VG_API_CALL */
|
||||
|
||||
#ifndef VGU_API_CALL
|
||||
#if defined(OPENVG_STATIC_LIBRARY)
|
||||
# define VGU_API_CALL
|
||||
#else
|
||||
# if defined(_WIN32) || defined(__VC32__) /* Win32 */
|
||||
# if defined (OPENVG_DLL_EXPORTS)
|
||||
# define VGU_API_CALL __declspec(dllexport)
|
||||
# else
|
||||
# define VGU_API_CALL __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define VGU_API_CALL extern
|
||||
# endif /* defined(_WIN32) ||... */
|
||||
#endif /* defined OPENVG_STATIC_LIBRARY */
|
||||
#endif /* ifndef VGU_API_CALL */
|
||||
|
||||
|
||||
#ifndef VG_API_ENTRY
|
||||
#define VG_API_ENTRY
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_EXIT
|
||||
#define VG_API_EXIT
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_ENTRY
|
||||
#define VGU_API_ENTRY
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_EXIT
|
||||
#define VGU_API_EXIT
|
||||
#endif
|
||||
|
||||
typedef float VGfloat;
|
||||
typedef signed char VGbyte;
|
||||
typedef unsigned char VGubyte;
|
||||
typedef signed short VGshort;
|
||||
typedef signed int VGint;
|
||||
typedef unsigned int VGuint;
|
||||
typedef unsigned int VGbitfield;
|
||||
|
||||
#ifndef VG_VGEXT_PROTOTYPES
|
||||
#define VG_VGEXT_PROTOTYPES
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _VGPLATFORM_H */
|
||||
|
149
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/vgu.h
Normal file
149
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG/vgu.h
Normal file
@ -0,0 +1,149 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* $Revision: 1.1 $ on $Date: 2009/06/24 01:54:43 $ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* VGU 1.1 Reference Implementation
|
||||
* -------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief VGU 1.1 API.
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _VGU_H
|
||||
#define _VGU_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <VG/openvg.h>
|
||||
|
||||
#define VGU_VERSION_1_0 1
|
||||
#define VGU_VERSION_1_1 2
|
||||
|
||||
#ifndef VGU_API_CALL
|
||||
# error VGU_API_CALL must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_ENTRY
|
||||
# error VGU_API_ENTRY must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_EXIT
|
||||
# error VGU_API_EXIT must be defined
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum {
|
||||
VGU_NO_ERROR = 0,
|
||||
VGU_BAD_HANDLE_ERROR = 0xF000,
|
||||
VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
|
||||
VGU_OUT_OF_MEMORY_ERROR = 0xF002,
|
||||
VGU_PATH_CAPABILITY_ERROR = 0xF003,
|
||||
VGU_BAD_WARP_ERROR = 0xF004,
|
||||
|
||||
VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGUErrorCode;
|
||||
|
||||
typedef enum {
|
||||
VGU_ARC_OPEN = 0xF100,
|
||||
VGU_ARC_CHORD = 0xF101,
|
||||
VGU_ARC_PIE = 0xF102,
|
||||
|
||||
VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGUArcType;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path,
|
||||
VGfloat x0, VGfloat y0,
|
||||
VGfloat x1, VGfloat y1) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path,
|
||||
const VGfloat * points, VGint count,
|
||||
VGboolean closed) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height,
|
||||
VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path,
|
||||
VGfloat cx, VGfloat cy,
|
||||
VGfloat width, VGfloat height) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height,
|
||||
VGfloat startAngle, VGfloat angleExtent,
|
||||
VGUArcType arcType) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
|
||||
VGfloat sx1, VGfloat sy1,
|
||||
VGfloat sx2, VGfloat sy2,
|
||||
VGfloat sx3, VGfloat sy3,
|
||||
VGfloat * matrix) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
|
||||
VGfloat dx1, VGfloat dy1,
|
||||
VGfloat dx2, VGfloat dy2,
|
||||
VGfloat dx3, VGfloat dy3,
|
||||
VGfloat * matrix) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
|
||||
VGfloat dx1, VGfloat dy1,
|
||||
VGfloat dx2, VGfloat dy2,
|
||||
VGfloat dx3, VGfloat dy3,
|
||||
VGfloat sx0, VGfloat sy0,
|
||||
VGfloat sx1, VGfloat sy1,
|
||||
VGfloat sx2, VGfloat sy2,
|
||||
VGfloat sx3, VGfloat sy3,
|
||||
VGfloat * matrix) VGU_API_EXIT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* #ifndef _VGU_H */
|
||||
|
BIN
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG_DRIVER.a
Normal file
BIN
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG_DRIVER.a
Normal file
Binary file not shown.
BIN
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG_DRIVER_AWTK.a
Normal file
BIN
MXC_A27-PCB4.5-CANUI/lib/vg_driver/VG_DRIVER_AWTK.a
Normal file
Binary file not shown.
306
MXC_A27-PCB4.5-CANUI/lib/vg_driver/gcSdk.h
Normal file
306
MXC_A27-PCB4.5-CANUI/lib/vg_driver/gcSdk.h
Normal file
@ -0,0 +1,306 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __gcsdk_h_
|
||||
#define __gcsdk_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
***************************** Include all headers. ****************************
|
||||
\******************************************************************************/
|
||||
|
||||
#ifdef LINUX
|
||||
# include <signal.h>
|
||||
# include <unistd.h>
|
||||
# include <string.h>
|
||||
# include <time.h>
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <windows.h>
|
||||
# include <tchar.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gcHal.h>
|
||||
#include <gcHAL_2D.h>
|
||||
|
||||
/******************************************************************************\
|
||||
********************************* Definitions. ********************************
|
||||
\******************************************************************************/
|
||||
|
||||
#define gcvLEFTBUTTON (1 << 0)
|
||||
#define gcvMIDDLEBUTTON (1 << 1)
|
||||
#define gcvRIGHTBUTTON (1 << 2)
|
||||
#define gcvCTRL (1 << 3)
|
||||
#define gcvALT (1 << 4)
|
||||
#define gcvSHIFT (1 << 5)
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
****************************** Type declarations. *****************************
|
||||
\******************************************************************************/
|
||||
|
||||
/*
|
||||
Window timer event function type.
|
||||
*/
|
||||
typedef gctBOOL (* gctTIMERFUNC) (
|
||||
gctPOINTER Argument
|
||||
);
|
||||
|
||||
/*
|
||||
Keyboard key press event function type.
|
||||
*/
|
||||
typedef gctBOOL (* gctKEYBOARDEVENT) (
|
||||
gctPOINTER Argument,
|
||||
gctUINT State,
|
||||
gctUINT Code
|
||||
);
|
||||
|
||||
/*
|
||||
Mouse button press event function type.
|
||||
*/
|
||||
typedef gctBOOL (* gctMOUSEPRESSEVENT) (
|
||||
gctPOINTER Argument,
|
||||
gctINT X,
|
||||
gctINT Y,
|
||||
gctUINT State,
|
||||
gctUINT Code
|
||||
);
|
||||
|
||||
/*
|
||||
Mouse move event function type.
|
||||
*/
|
||||
typedef gctBOOL (* gctMOUSEMOVEEVENT) (
|
||||
gctPOINTER Argument,
|
||||
gctINT X,
|
||||
gctINT Y,
|
||||
gctUINT State
|
||||
);
|
||||
|
||||
/*
|
||||
Thread routine.
|
||||
*/
|
||||
typedef void (* gctTHREADROUTINE) (
|
||||
gctPOINTER Argument
|
||||
);
|
||||
|
||||
/*
|
||||
Time structure.
|
||||
*/
|
||||
struct _gcsTIME
|
||||
{
|
||||
gctINT year;
|
||||
gctINT month;
|
||||
gctINT day;
|
||||
gctINT weekday;
|
||||
gctINT hour;
|
||||
gctINT minute;
|
||||
gctINT second;
|
||||
};
|
||||
|
||||
typedef struct _gcsTIME * gcsTIME_PTR;
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
******************************* API declarations. *****************************
|
||||
\******************************************************************************/
|
||||
|
||||
int
|
||||
vdkAppEntry(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
vdkGetCurrentTime(
|
||||
gcsTIME_PTR CurrTime
|
||||
);
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
********************************** Visual API. ********************************
|
||||
\******************************************************************************/
|
||||
|
||||
gctBOOL
|
||||
vdkInitVisual(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
vdkCleanupVisual(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
vdkGetDesktopSize(
|
||||
IN OUT gctUINT* Width,
|
||||
IN OUT gctUINT* Height
|
||||
);
|
||||
|
||||
gctBOOL
|
||||
vdkCreateMainWindow(
|
||||
IN gctINT X,
|
||||
IN gctINT Y,
|
||||
IN gctUINT Width,
|
||||
IN gctUINT Height,
|
||||
IN gctSTRING Title,
|
||||
IN gctPOINTER EventArgument,
|
||||
IN gctKEYBOARDEVENT KeyboardEvent,
|
||||
IN gctMOUSEPRESSEVENT MousePressEvent,
|
||||
IN gctMOUSEMOVEEVENT MouseMoveEvent,
|
||||
IN gctTIMERFUNC TimerEvent,
|
||||
IN gctUINT TimerDelay
|
||||
);
|
||||
|
||||
void
|
||||
vdkDestroyMainWindow(
|
||||
void
|
||||
);
|
||||
|
||||
gctHANDLE
|
||||
vdkGetDisplayContext(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
vdkReleaseDisplayContext(
|
||||
gctHANDLE Context
|
||||
);
|
||||
|
||||
gctHANDLE
|
||||
vdkGetMainWindowHandle(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
vdkGetMainWindowSize(
|
||||
IN OUT gctUINT* Width,
|
||||
IN OUT gctUINT* Height
|
||||
);
|
||||
|
||||
void
|
||||
vdkGetMainWindowColorBits(
|
||||
IN OUT gctUINT* RedCount,
|
||||
IN OUT gctUINT* GreenCount,
|
||||
IN OUT gctUINT* BlueCount
|
||||
);
|
||||
|
||||
void
|
||||
vdkSetMainWindowPostTitle(
|
||||
gctSTRING PostTitle
|
||||
);
|
||||
|
||||
void
|
||||
vdkSetMainWindowImage(
|
||||
IN gctUINT Width,
|
||||
IN gctUINT Height,
|
||||
IN gctUINT AlignedWidth,
|
||||
IN gctUINT AlignedHeight,
|
||||
IN gctPOINTER Image
|
||||
);
|
||||
|
||||
int
|
||||
vdkEnterMainWindowLoop(
|
||||
void
|
||||
);
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
*********************** Threading and Synchronization API. ********************
|
||||
\******************************************************************************/
|
||||
|
||||
void
|
||||
vdkSleep(
|
||||
gctUINT Milliseconds
|
||||
);
|
||||
|
||||
gctHANDLE
|
||||
vdkCreateThread(
|
||||
gctTHREADROUTINE ThreadRoutine,
|
||||
gctPOINTER Argument
|
||||
);
|
||||
|
||||
void
|
||||
vdkCloseThread(
|
||||
gctHANDLE ThreadHandle
|
||||
);
|
||||
|
||||
gctHANDLE
|
||||
vdkCreateEvent(
|
||||
gctBOOL ManualReset,
|
||||
gctBOOL InitialState
|
||||
);
|
||||
|
||||
void
|
||||
vdkCloseEvent(
|
||||
gctHANDLE EventHandle
|
||||
);
|
||||
|
||||
void
|
||||
vdkSetEvent(
|
||||
gctHANDLE EventHandle
|
||||
);
|
||||
|
||||
void
|
||||
vdkResetEvent(
|
||||
gctHANDLE EventHandle
|
||||
);
|
||||
|
||||
void
|
||||
vdkWaitForEvent(
|
||||
gctHANDLE EventHandle,
|
||||
gctUINT Timeout
|
||||
);
|
||||
|
||||
gctHANDLE
|
||||
vdkCreateMutex(
|
||||
void
|
||||
);
|
||||
|
||||
void
|
||||
vdkCloseMutex(
|
||||
gctHANDLE MutexHandle
|
||||
);
|
||||
|
||||
void
|
||||
vdkAcquireMutex(
|
||||
gctHANDLE MutexHandle,
|
||||
gctUINT Timeout
|
||||
);
|
||||
|
||||
void
|
||||
vdkReleaseMutex(
|
||||
gctHANDLE MutexHandle
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
470
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vdk.h
Normal file
470
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vdk.h
Normal file
@ -0,0 +1,470 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __vdk_h_
|
||||
#define __vdk_h_
|
||||
|
||||
/* Include VDK types. */
|
||||
#include "vdkTypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
** Define VDKAPI and VDKLANG macros. *******************************************
|
||||
**
|
||||
** VDKAPI Import or export function scope.
|
||||
** VDKLANG Language defintion of function.
|
||||
*/
|
||||
#ifdef WIN32
|
||||
# ifdef __VDK_EXPORT
|
||||
# define VDKAPI __declspec(dllexport)
|
||||
# else
|
||||
# define VDKAPI __declspec(dllimport)
|
||||
# endif
|
||||
# define VDKLANG __cdecl
|
||||
#else
|
||||
# define VDKAPI
|
||||
# define VDKLANG
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
** Initialization. *************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI vdkPrivate VDKLANG
|
||||
vdkInitialize(
|
||||
void
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkExit(
|
||||
vdkPrivate Private
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** Display. ********************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI vdkDisplay VDKLANG
|
||||
vdkGetDisplay(
|
||||
vdkPrivate Private
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkGetDisplayInfo(
|
||||
vdkDisplay Display,
|
||||
int * Width,
|
||||
int * Height,
|
||||
unsigned long * Physical,
|
||||
int * Stride,
|
||||
int * BitsPerPixel
|
||||
);
|
||||
|
||||
#if USE_FB_DOUBLE_BUFFER
|
||||
VDKAPI int VDKLANG
|
||||
vdkDisplayBuffer(
|
||||
vdkDisplay Display,
|
||||
int Buffer
|
||||
);
|
||||
#endif
|
||||
|
||||
/* VFK_DISPLAY_INFO structure defining information returned by
|
||||
vdkGetDisplayInfoEx. */
|
||||
typedef struct _vdkDISPLAY_INFO
|
||||
{
|
||||
/* The size of the display in pixels. */
|
||||
int width;
|
||||
int height;
|
||||
|
||||
/* The stride of the dispay. -1 is returned if the stride is not known
|
||||
for the specified display.*/
|
||||
int stride;
|
||||
|
||||
/* The color depth of the display in bits per pixel. */
|
||||
int bitsPerPixel;
|
||||
|
||||
/* The logical pointer to the display memory buffer. NULL is returned
|
||||
if the pointer is not known for the specified display. */
|
||||
void * logical;
|
||||
|
||||
/* The physical address of the display memory buffer. ~0 is returned
|
||||
if the address is not known for the specified display. */
|
||||
unsigned long physical;
|
||||
}
|
||||
vdkDISPLAY_INFO;
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkGetDisplayInfoEx(
|
||||
vdkDisplay Display,
|
||||
unsigned int DisplayInfoSize,
|
||||
vdkDISPLAY_INFO * DisplayInfo
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkDestroyDisplay(
|
||||
vdkDisplay Display
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** Windows. ********************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI vdkWindow VDKLANG
|
||||
vdkCreateWindow(
|
||||
vdkDisplay Display,
|
||||
int X,
|
||||
int Y,
|
||||
int Width,
|
||||
int Height
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkGetWindowInfo(
|
||||
vdkWindow Window,
|
||||
int * X,
|
||||
int * Y,
|
||||
int * Width,
|
||||
int * Height,
|
||||
int * BitsPerPixel,
|
||||
unsigned int * Offset
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkDestroyWindow(
|
||||
vdkWindow Window
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkSetWindowTitle(
|
||||
vdkWindow Window,
|
||||
const char * Title
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkShowWindow(
|
||||
vdkWindow Window
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkHideWindow(
|
||||
vdkWindow Window
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkDrawImage(
|
||||
vdkWindow Window,
|
||||
int Left,
|
||||
int Top,
|
||||
int Right,
|
||||
int Bottom,
|
||||
int Width,
|
||||
int Height,
|
||||
int BitsPerPixel,
|
||||
void * Bits
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkGetImage(
|
||||
vdkWindow Window,
|
||||
int Left,
|
||||
int Top,
|
||||
int Right,
|
||||
int Bottom,
|
||||
int * BitsPerPixel,
|
||||
void ** Bits
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkCapturePointer(
|
||||
vdkWindow Window
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** Pixmaps. ********************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI vdkPixmap VDKLANG
|
||||
vdkCreatePixmap(
|
||||
vdkDisplay Display,
|
||||
int Width,
|
||||
int Height,
|
||||
int BitsPerPixel
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkGetPixmapInfo(
|
||||
vdkPixmap Pixmap,
|
||||
int * Width,
|
||||
int * Height,
|
||||
int * BitsPerPixel,
|
||||
int * Stride,
|
||||
void ** Bits
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkDrawPixmap(
|
||||
vdkPixmap Pixmap,
|
||||
int Left,
|
||||
int Top,
|
||||
int Right,
|
||||
int Bottom,
|
||||
int Width,
|
||||
int Height,
|
||||
int BitsPerPixel,
|
||||
void * Bits
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkDestroyPixmap(
|
||||
vdkPixmap Pixmap
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** Events. *********************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkGetEvent(
|
||||
vdkWindow Window,
|
||||
vdkEvent * Event
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** Time. ***********************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI unsigned int VDKLANG
|
||||
vdkGetTicks(
|
||||
void
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** EGL support. ****************************************************************
|
||||
*/
|
||||
|
||||
#include <EGL/egl.h>
|
||||
|
||||
/* EGL prototypes. */
|
||||
typedef EGLDisplay (EGLAPIENTRY * EGL_GET_DISPLAY)(
|
||||
EGLNativeDisplayType display_id
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_INITIALIZE)(
|
||||
EGLDisplay dpy,
|
||||
EGLint *major,
|
||||
EGLint *minor
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_TERMINATE)(
|
||||
EGLDisplay dpy
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_CHOOSE_CONFIG)(
|
||||
EGLDisplay dpy,
|
||||
const EGLint *attrib_list,
|
||||
EGLConfig *configs,
|
||||
EGLint config_size,
|
||||
EGLint *num_config
|
||||
);
|
||||
|
||||
typedef EGLSurface (EGLAPIENTRY * EGL_CREATE_WINDOW_SURFACE)(
|
||||
EGLDisplay dpy,
|
||||
EGLConfig config,
|
||||
EGLNativeWindowType win,
|
||||
const EGLint *attrib_list
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_DESTROY_SURFACE)(
|
||||
EGLDisplay dpy,
|
||||
EGLSurface surface
|
||||
);
|
||||
|
||||
typedef EGLContext (EGLAPIENTRY * EGL_CREATE_CONTEXT)(
|
||||
EGLDisplay dpy,
|
||||
EGLConfig config,
|
||||
EGLContext share_context,
|
||||
const EGLint *attrib_list
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_DESTROY_CONTEXT)(
|
||||
EGLDisplay dpy,
|
||||
EGLContext ctx
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_MAKE_CURRENT)(
|
||||
EGLDisplay dpy,
|
||||
EGLSurface draw,
|
||||
EGLSurface read,
|
||||
EGLContext ctx
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_SWAP_BUFFERS)(
|
||||
EGLDisplay dpy,
|
||||
EGLSurface surface
|
||||
);
|
||||
|
||||
typedef void (* EGL_PROC)(void);
|
||||
|
||||
typedef EGL_PROC (EGLAPIENTRY * EGL_GET_PROC_ADDRESS)(
|
||||
const char *procname
|
||||
);
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRY * EGL_BIND_API)(
|
||||
EGLenum api
|
||||
);
|
||||
|
||||
/* VDK_EGL structure defining the stuff required for EGL support. */
|
||||
typedef struct _vdkEGL
|
||||
{
|
||||
/* Pointer to VDK private data. */
|
||||
vdkPrivate vdk;
|
||||
|
||||
/* Pointer to vdkDisplay structure. */
|
||||
vdkDisplay display;
|
||||
|
||||
/* Pointer to vdkWindow structure. */
|
||||
vdkWindow window;
|
||||
|
||||
/* EGL pointers. */
|
||||
EGLDisplay eglDisplay;
|
||||
EGLConfig eglConfig;
|
||||
EGLSurface eglSurface;
|
||||
EGLContext eglContext;
|
||||
|
||||
/* EGL function pointers. */
|
||||
EGL_GET_DISPLAY eglGetDisplay;
|
||||
EGL_INITIALIZE eglInitialize;
|
||||
EGL_TERMINATE eglTerminate;
|
||||
EGL_CHOOSE_CONFIG eglChooseConfig;
|
||||
EGL_CREATE_WINDOW_SURFACE eglCreateWindowSurface;
|
||||
EGL_DESTROY_SURFACE eglDestroySurface;
|
||||
EGL_CREATE_CONTEXT eglCreateContext;
|
||||
EGL_DESTROY_CONTEXT eglDestroyContext;
|
||||
EGL_MAKE_CURRENT eglMakeCurrent;
|
||||
EGL_SWAP_BUFFERS eglSwapBuffers;
|
||||
EGL_GET_PROC_ADDRESS eglGetProcAddress;
|
||||
EGL_BIND_API eglBindAPI;
|
||||
}
|
||||
vdkEGL;
|
||||
|
||||
typedef void (EGLAPIENTRY * EGL_ADDRESS)(
|
||||
void);
|
||||
|
||||
EGL_ADDRESS
|
||||
vdkGetAddress(
|
||||
vdkPrivate Private,
|
||||
const char * Function
|
||||
);
|
||||
|
||||
#define VDK_CONFIG_RGB565_D16 ((const EGLint *) 1)
|
||||
#define VDK_CONFIG_RGB565_D24 ((const EGLint *) 3)
|
||||
#define VDK_CONFIG_RGB888_D16 ((const EGLint *) 5)
|
||||
#define VDK_CONFIG_RGB888_D24 ((const EGLint *) 7)
|
||||
#define VDK_CONFIG_RGB565_D16_AA ((const EGLint *) 9)
|
||||
#define VDK_CONFIG_RGB565_D24_AA ((const EGLint *) 11)
|
||||
#define VDK_CONFIG_RGB888_D16_AA ((const EGLint *) 13)
|
||||
#define VDK_CONFIG_RGB888_D24_AA ((const EGLint *) 15)
|
||||
|
||||
/* OpenVG Configurations. */
|
||||
#define VDK_CONFIG_RGB565_VG ((const EGLint *) 500)
|
||||
#define VDK_CONFIG_RGB888_VG ((const EGLint *) 501)
|
||||
|
||||
#define VDK_CONTEXT_ES11 ((const EGLint *) 0)
|
||||
#define VDK_CONTEXT_ES20 ((const EGLint *) 2)
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkSetupEGL(
|
||||
int X,
|
||||
int Y,
|
||||
int Width,
|
||||
int Height,
|
||||
const EGLint * ConfigurationAttributes,
|
||||
const EGLint * SurfaceAttributes,
|
||||
const EGLint * ContextAttributes,
|
||||
vdkEGL * Egl
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkSwapEGL(
|
||||
vdkEGL * Egl
|
||||
);
|
||||
|
||||
VDKAPI void VDKLANG
|
||||
vdkFinishEGL(
|
||||
vdkEGL * Egl
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** GL Textures. ****************************************************************
|
||||
*/
|
||||
|
||||
typedef enum _vdkTextureType
|
||||
{
|
||||
VDK_TGA,
|
||||
VDK_PNG,
|
||||
VDK_PKM,
|
||||
}
|
||||
vdkTextureType;
|
||||
|
||||
typedef enum _vdkTextureFace
|
||||
{
|
||||
VDK_2D,
|
||||
VDK_POSITIVE_X,
|
||||
VDK_NEGATIVE_X,
|
||||
VDK_POSITIVE_Y,
|
||||
VDK_NEGATIVE_Y,
|
||||
VDK_POSITIVE_Z,
|
||||
VDK_NEGATIVE_Z,
|
||||
}
|
||||
vdkTextureFace;
|
||||
|
||||
VDKAPI unsigned int VDKLANG
|
||||
vdkLoadTexture(
|
||||
vdkEGL * Egl,
|
||||
const char * FileName,
|
||||
vdkTextureType Type,
|
||||
vdkTextureFace Face
|
||||
);
|
||||
|
||||
/*******************************************************************************
|
||||
** GL Shaders. *****************************************************************
|
||||
*/
|
||||
|
||||
VDKAPI unsigned int VDKLANG
|
||||
vdkMakeProgram(
|
||||
vdkEGL * Egl,
|
||||
const char * VertexShader,
|
||||
const char * FragmentShader,
|
||||
char ** Log
|
||||
);
|
||||
|
||||
VDKAPI int VDKLANG
|
||||
vdkDeleteProgram(
|
||||
vdkEGL * Egl,
|
||||
unsigned int Program
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __vdk_h_ */
|
||||
|
275
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vdkTypes.h
Normal file
275
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vdkTypes.h
Normal file
@ -0,0 +1,275 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
|
||||
*
|
||||
* The material in this file is confidential and contains trade secrets
|
||||
* of Vivante Corporation. This is proprietary information owned by
|
||||
* Vivante Corporation. No part of this work may be disclosed,
|
||||
* reproduced, copied, transmitted, or used in any way for any purpose,
|
||||
* without the express written permission of Vivante Corporation.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* Auto-generated file on 4/22/2010. Do not edit!!!
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __vdktypes_h_
|
||||
#define __vdktypes_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
** vdkPrivate. *****************************************************************
|
||||
*/
|
||||
|
||||
typedef struct _vdkPrivate * vdkPrivate;
|
||||
|
||||
/*******************************************************************************
|
||||
** Display. ********************************************************************
|
||||
*/
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
typedef int vdkDisplay;
|
||||
#else
|
||||
typedef struct _vdkDisplay * vdkDisplay;
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
** Window. *********************************************************************
|
||||
*/
|
||||
#ifdef __QNXNTO__
|
||||
typedef void *vdkWindow;
|
||||
#else
|
||||
typedef struct _vdkWindow * vdkWindow;
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Pixmap. *********************************************************************
|
||||
*/
|
||||
#ifdef __QNXNTO__
|
||||
typedef void *vdkPixmap;
|
||||
#else
|
||||
typedef struct _vdkPixmap * vdkPixmap;
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Events. *********************************************************************
|
||||
*/
|
||||
|
||||
typedef enum _vdkEventType
|
||||
{
|
||||
/* Keyboard event. */
|
||||
VDK_KEYBOARD,
|
||||
|
||||
/* Mouse move event. */
|
||||
VDK_POINTER,
|
||||
|
||||
/* Mouse button event. */
|
||||
VDK_BUTTON,
|
||||
|
||||
/* Application close event. */
|
||||
VDK_CLOSE,
|
||||
|
||||
/* Application window has been updated. */
|
||||
VDK_WINDOW_UPDATE,
|
||||
}
|
||||
vdkEventType;
|
||||
|
||||
/* Scancodes for keyboard. */
|
||||
typedef enum _vdkKeys
|
||||
{
|
||||
VDK_UNKNOWN = -1,
|
||||
|
||||
VDK_BACKSPACE = 0x08,
|
||||
VDK_TAB,
|
||||
VDK_ENTER = 0x0D,
|
||||
VDK_ESCAPE = 0x1B,
|
||||
|
||||
VDK_SPACE = 0x20,
|
||||
VDK_SINGLEQUOTE = 0x27,
|
||||
VDK_PAD_ASTERISK = 0x2A,
|
||||
VDK_COMMA = 0x2C,
|
||||
VDK_HYPHEN,
|
||||
VDK_PERIOD,
|
||||
VDK_SLASH,
|
||||
VDK_0,
|
||||
VDK_1,
|
||||
VDK_2,
|
||||
VDK_3,
|
||||
VDK_4,
|
||||
VDK_5,
|
||||
VDK_6,
|
||||
VDK_7,
|
||||
VDK_8,
|
||||
VDK_9,
|
||||
VDK_SEMICOLON = 0x3B,
|
||||
VDK_EQUAL = 0x3D,
|
||||
VDK_A = 0x41,
|
||||
VDK_B,
|
||||
VDK_C,
|
||||
VDK_D,
|
||||
VDK_E,
|
||||
VDK_F,
|
||||
VDK_G,
|
||||
VDK_H,
|
||||
VDK_I,
|
||||
VDK_J,
|
||||
VDK_K,
|
||||
VDK_L,
|
||||
VDK_M,
|
||||
VDK_N,
|
||||
VDK_O,
|
||||
VDK_P,
|
||||
VDK_Q,
|
||||
VDK_R,
|
||||
VDK_S,
|
||||
VDK_T,
|
||||
VDK_U,
|
||||
VDK_V,
|
||||
VDK_W,
|
||||
VDK_X,
|
||||
VDK_Y,
|
||||
VDK_Z,
|
||||
VDK_LBRACKET,
|
||||
VDK_BACKSLASH,
|
||||
VDK_RBRACKET,
|
||||
VDK_BACKQUOTE = 0x60,
|
||||
|
||||
VDK_F1 = 0x80,
|
||||
VDK_F2,
|
||||
VDK_F3,
|
||||
VDK_F4,
|
||||
VDK_F5,
|
||||
VDK_F6,
|
||||
VDK_F7,
|
||||
VDK_F8,
|
||||
VDK_F9,
|
||||
VDK_F10,
|
||||
VDK_F11,
|
||||
VDK_F12,
|
||||
|
||||
VDK_LCTRL,
|
||||
VDK_RCTRL,
|
||||
VDK_LSHIFT,
|
||||
VDK_RSHIFT,
|
||||
VDK_LALT,
|
||||
VDK_RALT,
|
||||
VDK_CAPSLOCK,
|
||||
VDK_NUMLOCK,
|
||||
VDK_SCROLLLOCK,
|
||||
VDK_PAD_0,
|
||||
VDK_PAD_1,
|
||||
VDK_PAD_2,
|
||||
VDK_PAD_3,
|
||||
VDK_PAD_4,
|
||||
VDK_PAD_5,
|
||||
VDK_PAD_6,
|
||||
VDK_PAD_7,
|
||||
VDK_PAD_8,
|
||||
VDK_PAD_9,
|
||||
VDK_PAD_HYPHEN,
|
||||
VDK_PAD_PLUS,
|
||||
VDK_PAD_SLASH,
|
||||
VDK_PAD_PERIOD,
|
||||
VDK_PAD_ENTER,
|
||||
VDK_SYSRQ,
|
||||
VDK_PRNTSCRN,
|
||||
VDK_BREAK,
|
||||
VDK_UP,
|
||||
VDK_LEFT,
|
||||
VDK_RIGHT,
|
||||
VDK_DOWN,
|
||||
VDK_HOME,
|
||||
VDK_END,
|
||||
VDK_PGUP,
|
||||
VDK_PGDN,
|
||||
VDK_INSERT,
|
||||
VDK_DELETE,
|
||||
VDK_LWINDOW,
|
||||
VDK_RWINDOW,
|
||||
VDK_MENU,
|
||||
VDK_POWER,
|
||||
VDK_SLEEP,
|
||||
VDK_WAKE,
|
||||
}
|
||||
vdkKeys;
|
||||
|
||||
/* Structure that defined keyboard mapping. */
|
||||
typedef struct _vdkKeyMap
|
||||
{
|
||||
/* Normal key. */
|
||||
vdkKeys normal;
|
||||
|
||||
/* Extended key. */
|
||||
vdkKeys extended;
|
||||
}
|
||||
vdkKeyMap;
|
||||
|
||||
/* Event structure. */
|
||||
typedef struct _vdkEvent
|
||||
{
|
||||
/* Event type. */
|
||||
vdkEventType type;
|
||||
|
||||
/* Event data union. */
|
||||
union _vdkEventData
|
||||
{
|
||||
/* Event data for keyboard. */
|
||||
struct _vdkKeyboard
|
||||
{
|
||||
/* Scancode. */
|
||||
vdkKeys scancode;
|
||||
|
||||
/* ASCII characte of the key pressed. */
|
||||
char key;
|
||||
|
||||
/* Flag whether the key was pressed (1) or released (0). */
|
||||
char pressed;
|
||||
}
|
||||
keyboard;
|
||||
|
||||
/* Event data for pointer. */
|
||||
struct _vdkPointer
|
||||
{
|
||||
/* Current pointer coordinate. */
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
pointer;
|
||||
|
||||
/* Event data for mouse buttons. */
|
||||
struct _vdkButton
|
||||
{
|
||||
/* Left button state. */
|
||||
int left;
|
||||
|
||||
/* Middle button state. */
|
||||
int middle;
|
||||
|
||||
/* Right button state. */
|
||||
int right;
|
||||
|
||||
/* Current pointer coordinate. */
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
button;
|
||||
}
|
||||
data;
|
||||
}
|
||||
vdkEvent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __vdktypes_h */
|
||||
|
106
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vg_driver.h
Normal file
106
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vg_driver.h
Normal file
@ -0,0 +1,106 @@
|
||||
#ifndef _VG_DRIVER_H
|
||||
#define _VG_DRIVER_H
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#define VG_CENTER_X 514
|
||||
#define VG_CENTER_Y 306
|
||||
|
||||
#if LCD_ROTATE_ANGLE==LCD_ROTATE_ANGLE_90 || LCD_ROTATE_ANGLE==LCD_ROTATE_ANGLE_270
|
||||
#define LCD_SRC_W LCD_HEIGHT
|
||||
#define LCD_SRC_H LCD_WIDTH
|
||||
#else
|
||||
#define LCD_SRC_W LCD_WIDTH
|
||||
#define LCD_SRC_H LCD_HEIGHT
|
||||
#endif
|
||||
|
||||
#ifdef LVGL_VG_GPU
|
||||
#define VG_W LCD_SRC_W
|
||||
#define VG_H LCD_SRC_H
|
||||
#define VG_X 0
|
||||
#define VG_Y 0
|
||||
#define VG_OSD_W LCD_SRC_W
|
||||
#define VG_OSD_H LCD_SRC_H
|
||||
#define VG_BPP LCD_BPP
|
||||
|
||||
#elif defined(VG_ONLY)
|
||||
|
||||
#define VG_W LCD_SRC_W
|
||||
#define VG_H LCD_SRC_H
|
||||
#define VG_X (0)
|
||||
#define VG_Y (0)
|
||||
#define VG_OSD_W LCD_SRC_W
|
||||
#define VG_OSD_H LCD_SRC_H
|
||||
#define VG_BPP LCD_BPP
|
||||
|
||||
#elif defined(AWTK)
|
||||
#ifndef VG_OSD_W
|
||||
#define VG_OSD_W OSD_WIDTH
|
||||
#endif
|
||||
#ifndef VG_OSD_H
|
||||
#define VG_OSD_H OSD_HEIGHT
|
||||
#endif
|
||||
#define VG_W OSD_WIDTH
|
||||
#define VG_H OSD_HEIGHT
|
||||
#define VG_X 0
|
||||
#define VG_Y 0
|
||||
#define VG_BPP LCD_BPP
|
||||
|
||||
#else
|
||||
#ifdef REVERSE_TRACK
|
||||
#define VG_W 704
|
||||
#define VG_H 440
|
||||
#define VG_X 0
|
||||
#define VG_Y 0
|
||||
#define VG_OSD_W 704
|
||||
#define VG_OSD_H 440
|
||||
#define VG_BPP 16
|
||||
#else
|
||||
#define VG_W 496
|
||||
#define VG_H 496
|
||||
#define VG_X ((VG_CENTER_X) - (VG_W)/2)
|
||||
#define VG_Y ((VG_CENTER_Y) - (VG_H)/2)
|
||||
#define VG_OSD_W LCD_SRC_W
|
||||
#define VG_OSD_H LCD_SRC_H
|
||||
#define VG_BPP LCD_BPP
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
extern unsigned int xm_vg_get_width (void);
|
||||
|
||||
extern unsigned int xm_vg_get_height (void);
|
||||
|
||||
extern unsigned int xm_vg_get_osd_stride(void);
|
||||
|
||||
extern unsigned int xm_vg_get_stride (void);
|
||||
|
||||
extern unsigned int xm_vg_get_bpp (void);
|
||||
|
||||
extern int xm_vg_is_valid_gpu_fb (unsigned int base);
|
||||
|
||||
extern unsigned int xm_vg_require_gpu_fb (void);
|
||||
|
||||
extern int xm_vg_get_offset_x (void);
|
||||
|
||||
extern int xm_vg_get_offset_y (void);
|
||||
|
||||
extern void xm_vg_get_osd_window ( unsigned int* x,
|
||||
unsigned int* y,
|
||||
unsigned int* w,
|
||||
unsigned int* h,
|
||||
unsigned int* stride);
|
||||
|
||||
extern void* xm_vg_get_gpu_background_image (void);
|
||||
|
||||
extern unsigned int vg_get_framebuffer (void);
|
||||
|
||||
extern void xm_vg_draw_prepare(void *para);
|
||||
|
||||
extern void xm_vg_draw_start(void);
|
||||
|
||||
#ifdef REVERSE_TRACK
|
||||
extern void xm_vg_set_gpu_fb_addr(unsigned int addr);
|
||||
#endif
|
||||
|
||||
#endif
|
524
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vg_driver_wrapper.c
Normal file
524
MXC_A27-PCB4.5-CANUI/lib/vg_driver/vg_driver_wrapper.c
Normal file
@ -0,0 +1,524 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "board.h"
|
||||
#include "chip.h"
|
||||
|
||||
#include "rtos.h"
|
||||
#include "romfile.h"
|
||||
#include "vg_driver.h"
|
||||
|
||||
#if !defined(VG_ONLY) && !defined(AWTK)
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
#if LCD_ROTATE_ANGLE != LCD_ROTATE_ANGLE_0
|
||||
#define VG_USE_LCD_TMP_BUFFER
|
||||
#endif
|
||||
|
||||
#ifdef VG_USE_LCD_TMP_BUFFER
|
||||
static void *xm_vg_tmp_lcd_buf = NULL;
|
||||
static uint32_t xm_vg_get_tmp_lcd_buffer (void)
|
||||
{
|
||||
if(!xm_vg_tmp_lcd_buf) {
|
||||
u32 width = (VG_OSD_W + 0xF) & (~0xF);
|
||||
u32 height = (VG_OSD_H + 0xF) & (~0xF);
|
||||
xm_vg_tmp_lcd_buf = (void *)pvPortMalloc(width * height * VG_BPP / 8);
|
||||
}
|
||||
if(!xm_vg_tmp_lcd_buf) {
|
||||
printf("%s, pvPortMalloc failed\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (uint32_t)xm_vg_tmp_lcd_buf;
|
||||
}
|
||||
|
||||
static void xm_vg_release_tmp_lcd_buffer (void)
|
||||
{
|
||||
if(xm_vg_tmp_lcd_buf)
|
||||
vPortFree(xm_vg_tmp_lcd_buf);
|
||||
xm_vg_tmp_lcd_buf = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VG_DRIVER
|
||||
#include "xm_base.h"
|
||||
|
||||
uint32_t FS_FWrite(const void * pData, uint32_t Size, uint32_t N, void * pFile)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FS_FTell(void * pFile)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int xm_vg_get_width (void)
|
||||
{
|
||||
return VG_W;
|
||||
}
|
||||
|
||||
unsigned int xm_vg_get_height (void)
|
||||
{
|
||||
return VG_H;
|
||||
}
|
||||
|
||||
unsigned int xm_vg_get_stride (void)
|
||||
{
|
||||
return VG_OSD_W * VG_BPP / 8;
|
||||
}
|
||||
|
||||
unsigned int xm_vg_get_bpp (void)
|
||||
{
|
||||
return VG_BPP;
|
||||
}
|
||||
|
||||
#if defined(REVERSE_TRACK)
|
||||
int xm_vg_is_valid_gpu_fb (unsigned int base)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < VIDEO_DISPLAY_BUF_NUM; i++) {
|
||||
unsigned fb_base = ulVideoDisplayGetBufferAddr(i);
|
||||
unsigned vg_base = fb_base + VG_Y * VG_OSD_W * VG_BPP / 8 + VG_X * VG_BPP / 8;
|
||||
|
||||
if (base == vg_base)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int xm_vg_is_valid_gpu_fb (unsigned int base)
|
||||
{
|
||||
unsigned fb_base = ark_lcd_get_virt_addr();
|
||||
unsigned vg_base = fb_base + VG_Y * VG_OSD_W * VG_BPP / 8 + VG_X * VG_BPP / 8;
|
||||
|
||||
if (base == vg_base || base == vg_base + xm_vg_get_stride() * VG_OSD_H)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* XM_RomAddress (const char *src)
|
||||
{
|
||||
if (!src || src[0] == '\0') return NULL;
|
||||
|
||||
void *ptr;
|
||||
RomFile *file = RomFileOpen(src);
|
||||
|
||||
if (!file) {
|
||||
printf("open romfile %s fail.\n", src);
|
||||
return NULL;
|
||||
}
|
||||
RomFileRead(file, NULL, file->size);
|
||||
ptr = file->buf;
|
||||
#ifndef ROMFILE_USE_SMALL_MEM
|
||||
RomFileClose(file);
|
||||
#endif
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
#ifdef LVGL_VG_GPU
|
||||
unsigned int xm_vg_require_gpu_fb (void)
|
||||
{
|
||||
lv_disp_t * disp = lv_disp_get_default();
|
||||
unsigned int vg_frame_base = 0;
|
||||
|
||||
if (disp) {
|
||||
lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
|
||||
lv_color_t * disp_buf = vdb->buf_act;
|
||||
vg_frame_base = (unsigned int)disp_buf;
|
||||
} else {
|
||||
vg_frame_base = ark_lcd_get_virt_addr();
|
||||
}
|
||||
|
||||
vg_frame_base += VG_Y * VG_OSD_W * VG_BPP / 8 + VG_X * VG_BPP / 8;
|
||||
return vg_frame_base;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#if defined(VG_ONLY)
|
||||
|
||||
static int fb_index = 0;
|
||||
unsigned int xm_vg_require_gpu_fb (void)
|
||||
{
|
||||
#ifdef VG_USE_LCD_TMP_BUFFER
|
||||
return xm_vg_get_tmp_lcd_buffer();
|
||||
#else
|
||||
unsigned fb_base = ark_lcd_get_virt_addr();
|
||||
fb_base += fb_index * VG_OSD_W * VG_OSD_H * VG_BPP / 8;
|
||||
|
||||
return fb_base;
|
||||
#endif
|
||||
}
|
||||
|
||||
void xm_vg_release_gpu_fb (void)
|
||||
{
|
||||
#ifdef VG_USE_LCD_TMP_BUFFER
|
||||
|
||||
#else
|
||||
unsigned fb_base = xm_vg_require_gpu_fb();
|
||||
CP15_clean_dcache_for_dma((uint32_t)fb_base, VG_OSD_W * VG_OSD_H * VG_BPP / 8 + (uint32_t)fb_base);
|
||||
ark_lcd_set_osd_yaddr(LCD_UI_LAYER, (unsigned int)fb_base);
|
||||
ark_lcd_set_osd_sync(LCD_UI_LAYER);
|
||||
|
||||
ark_lcd_wait_for_vsync();
|
||||
|
||||
fb_index = (fb_index + 1) & 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
// 获取当前正在渲染的OSD framebuffer
|
||||
// *no == -1 表示获取当前正在渲染的OSD framebuffer
|
||||
// 返回值
|
||||
// 当前正在渲染的OSD framebuffer基址
|
||||
unsigned int xm_vg_get_osd_fb (int *no)
|
||||
{
|
||||
unsigned fb_base = ark_lcd_get_virt_addr();
|
||||
fb_base += fb_index * VG_OSD_W * VG_OSD_H * VG_BPP / 8;
|
||||
if(*no == (-1))
|
||||
{
|
||||
*no = fb_index;
|
||||
return fb_base;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(*no >= 2)
|
||||
return 0;
|
||||
else
|
||||
return fb_base;
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(AWTK)
|
||||
|
||||
#include "fb_queue.h"
|
||||
|
||||
static fb_queue_s *curr_fb = NULL;
|
||||
unsigned int xm_vg_require_gpu_fb (void)
|
||||
{
|
||||
fb_queue_s *fb_unit = NULL;
|
||||
while (!fb_unit)
|
||||
{
|
||||
fb_unit = fb_queue_get_free_unit();
|
||||
if(fb_unit)
|
||||
break;
|
||||
OS_Delay (1);
|
||||
}
|
||||
curr_fb = fb_unit;
|
||||
//XM_lock();
|
||||
//printf ("req %x\n", fb_unit->fb_base);
|
||||
//XM_unlock();
|
||||
return fb_unit->fb_base;
|
||||
}
|
||||
|
||||
void xm_vg_release_gpu_fb (void)
|
||||
{
|
||||
fb_queue_s *fb_unit = curr_fb;
|
||||
if(fb_unit)
|
||||
{
|
||||
curr_fb = NULL;
|
||||
fb_queue_set_ready (fb_unit);
|
||||
//XM_lock();
|
||||
//printf ("rdy %x\n", fb_unit->fb_base);
|
||||
//XM_unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#elif defined(REVERSE_TRACK)
|
||||
|
||||
static unsigned int gpu_fb_addr = 0;
|
||||
|
||||
void xm_vg_set_gpu_fb_addr(unsigned int addr)
|
||||
{
|
||||
gpu_fb_addr = addr;
|
||||
}
|
||||
|
||||
unsigned int xm_vg_require_gpu_fb (void)
|
||||
{
|
||||
unsigned int vg_frame_base;
|
||||
|
||||
vg_frame_base = gpu_fb_addr ? gpu_fb_addr : ulVideoDisplayGetBufferAddr(0);
|
||||
|
||||
vg_frame_base += VG_Y * VG_OSD_W * VG_BPP / 8 + VG_X * VG_BPP / 8;
|
||||
return vg_frame_base;
|
||||
}
|
||||
|
||||
#else
|
||||
unsigned int xm_vg_require_gpu_fb (void)
|
||||
{
|
||||
lv_disp_t * disp = lv_disp_get_default();
|
||||
lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
|
||||
lv_color_t * disp_buf = vdb->buf_act;
|
||||
|
||||
unsigned int vg_frame_base = (unsigned int)disp_buf;
|
||||
|
||||
vg_frame_base += VG_Y * VG_OSD_W * VG_BPP / 8 + VG_X * VG_BPP / 8;
|
||||
return vg_frame_base;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int xm_vg_get_offset_x (void)
|
||||
{
|
||||
return VG_X;
|
||||
}
|
||||
|
||||
int xm_vg_get_offset_y (void)
|
||||
{
|
||||
return VG_Y;
|
||||
}
|
||||
|
||||
unsigned int xm_vg_get_osd_stride (void)
|
||||
{
|
||||
return VG_OSD_W * VG_BPP / 8;
|
||||
}
|
||||
|
||||
void xm_vg_get_osd_window ( unsigned int* x,
|
||||
unsigned int* y,
|
||||
unsigned int* w,
|
||||
unsigned int* h,
|
||||
unsigned int* stride
|
||||
)
|
||||
{
|
||||
*x = VG_X;
|
||||
*y = VG_Y;
|
||||
*w = VG_W;
|
||||
*h = VG_H;
|
||||
*stride = xm_vg_get_stride();
|
||||
}
|
||||
|
||||
void* xm_vg_get_gpu_background_image (void)
|
||||
{
|
||||
static RomFile *bgfile = NULL;
|
||||
|
||||
if(!bgfile) {
|
||||
bgfile = RomFileOpen("vg_bg.rgb");
|
||||
if (!bgfile)
|
||||
return NULL;
|
||||
RomFileRead(bgfile, NULL, bgfile->size);
|
||||
}
|
||||
char *bk = (char*)bgfile->buf;
|
||||
if(bk)
|
||||
bk += (VG_H - 1) * VG_W * VG_BPP / 8;
|
||||
return (void *)bk;
|
||||
}
|
||||
|
||||
unsigned int vg_get_framebuffer (void)
|
||||
{
|
||||
return xm_vg_require_gpu_fb();
|
||||
}
|
||||
|
||||
#ifndef LVGL_VG_GPU
|
||||
|
||||
#if defined(VG_ONLY) || defined(AWTK)
|
||||
#if defined(DOUBLE_POINTER_HALO)
|
||||
extern int double_pointer_halo_init (int width, int height);
|
||||
extern int double_pointer_halo_draw (void);
|
||||
#elif defined(SINGLE_POINTER_HALO)
|
||||
extern int single_pointer_halo_init (int width, int height);
|
||||
extern int single_pointer_halo_draw (void);
|
||||
#elif defined(AWTK)
|
||||
extern int gui_app_start(int lcd_w, int lcd_h);
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
int xm_vg_loop (void *context)
|
||||
{
|
||||
#ifdef AWTK
|
||||
#ifdef WITH_VGCANVAS
|
||||
gui_app_start (xm_vg_get_width(), xm_vg_get_height());
|
||||
#else
|
||||
gui_app_start (OSD_WIDTH, OSD_HEIGHT);
|
||||
#endif
|
||||
return 0;
|
||||
#else
|
||||
int frame_count = 0;
|
||||
int vg_draw_tickets = 0; // 累加VG时间
|
||||
int vsync_delay_tickets = 0; // 累加LCD帧同步等待时间
|
||||
|
||||
#if defined(DOUBLE_POINTER_HALO)
|
||||
double_pointer_halo_init(xm_vg_get_width(), xm_vg_get_height());
|
||||
#elif defined(SINGLE_POINTER_HALO)
|
||||
single_pointer_halo_init(xm_vg_get_width(), xm_vg_get_height());
|
||||
#endif
|
||||
unsigned int start_ticket = XM_GetTickCount();
|
||||
|
||||
while(1)
|
||||
{
|
||||
// 获取当前正在渲染使用的OSD framebuffer基址及序号
|
||||
//int fb_no = -1;
|
||||
//unsigned int fb_base = xm_vg_get_osd_fb(&fb_no);
|
||||
int t1 = get_timer(0);
|
||||
|
||||
#if defined(DOUBLE_POINTER_HALO)
|
||||
double_pointer_halo_draw();
|
||||
#elif defined(SINGLE_POINTER_HALO)
|
||||
single_pointer_halo_draw();
|
||||
#endif
|
||||
int t2 = get_timer(0);
|
||||
vg_draw_tickets += abs(t2 - t1);
|
||||
|
||||
#ifdef VG_USE_LCD_TMP_BUFFER
|
||||
static int fb_index = 0;
|
||||
unsigned int fb_base = ark_lcd_get_virt_addr();
|
||||
fb_base += fb_index * VG_OSD_W * VG_OSD_H * VG_BPP / 8;
|
||||
uint32_t src_addr = xm_vg_get_tmp_lcd_buffer();
|
||||
|
||||
CP15_invalidate_dcache_for_dma((uint32_t)fb_base, VG_OSD_W * VG_OSD_H * VG_BPP / 8 + (uint32_t)fb_base);
|
||||
pxp_scaler_rotate(src_addr, 0, 0,
|
||||
PXP_SRC_FMT_RGB565, VG_OSD_W, VG_OSD_H,
|
||||
(uint32_t)fb_base, 0, PXP_OUT_FMT_RGB565, LCD_WIDTH, LCD_HEIGHT, LCD_ROTATE_ANGLE);
|
||||
|
||||
ark_lcd_set_osd_yaddr(LCD_UI_LAYER, (unsigned int)fb_base);
|
||||
ark_lcd_set_osd_sync(LCD_UI_LAYER);
|
||||
ark_lcd_wait_for_vsync();
|
||||
fb_index != fb_index;
|
||||
#else
|
||||
// 释放当前渲染的GPU帧, 并等待LCD刷新该帧
|
||||
xm_vg_release_gpu_fb ();
|
||||
#endif
|
||||
|
||||
int t3 = get_timer(0);
|
||||
vsync_delay_tickets += abs(t3 - t2);
|
||||
|
||||
frame_count ++;
|
||||
|
||||
if(frame_count == 1000)
|
||||
{
|
||||
unsigned int t = XM_GetTickCount() - start_ticket;
|
||||
printf ("fps = %4.1f , vg_ticket = %d us, vsync_delay_ticket = %d us\r\n", 1000.0*1000.0 / t, vg_draw_tickets / 1000, vsync_delay_tickets / 1000);
|
||||
vg_draw_tickets = 0;
|
||||
vsync_delay_tickets = 0;
|
||||
frame_count = 0;
|
||||
start_ticket = XM_GetTickCount();
|
||||
}
|
||||
//OS_Delay(1);
|
||||
|
||||
}
|
||||
|
||||
//double_pointer_halo_exit();
|
||||
//vgFinish();
|
||||
|
||||
#ifdef VG_USE_LCD_TMP_BUFFER
|
||||
xm_vg_release_tmp_lcd_buffer();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#ifdef REVERSE_TRACK
|
||||
static int track_index = 0;
|
||||
#else
|
||||
static int pointer_halo_speed = 0;
|
||||
#endif
|
||||
static TaskHandle_t vg_task = NULL;
|
||||
QueueHandle_t vg_done;
|
||||
|
||||
void xm_vg_draw_prepare(void *para)
|
||||
{
|
||||
if (para == NULL)
|
||||
return;
|
||||
|
||||
#ifdef REVERSE_TRACK
|
||||
track_index = *(int*)para;
|
||||
#else
|
||||
pointer_halo_speed = *(int*)para;
|
||||
#endif
|
||||
}
|
||||
|
||||
void xm_vg_draw_start(void)
|
||||
{
|
||||
if (vg_done)
|
||||
xQueueReset(vg_done);
|
||||
|
||||
if (vg_task)
|
||||
xTaskNotify(vg_task, 1, eSetValueWithOverwrite);
|
||||
|
||||
if (vg_done)
|
||||
xQueueReceive(vg_done, NULL, portMAX_DELAY);
|
||||
}
|
||||
|
||||
#ifdef REVERSE_TRACK
|
||||
extern int reversing_auxiliary_line_init (int width, int height);
|
||||
extern int reversing_auxiliary_line_draw (int index);
|
||||
#else
|
||||
extern int pointer_halo_init (int width, int height);
|
||||
extern int pointer_halo_draw (int speed);
|
||||
#endif
|
||||
|
||||
int xm_vg_loop (void *context)
|
||||
{
|
||||
uint32_t ulNotifiedValue;
|
||||
//uint32_t stick = xTaskGetTickCount();
|
||||
//uint32_t framecount = 0;
|
||||
|
||||
vg_task = xTaskGetCurrentTaskHandle();
|
||||
|
||||
vg_done = xQueueCreate(1, 0);
|
||||
|
||||
#ifdef REVERSE_TRACK
|
||||
reversing_auxiliary_line_init(xm_vg_get_width(), xm_vg_get_height());
|
||||
#else
|
||||
pointer_halo_init(xm_vg_get_width(), xm_vg_get_height());
|
||||
#endif
|
||||
|
||||
while(1)
|
||||
{
|
||||
xTaskNotifyWait( 0x00, /* Don't clear any notification bits on entry. */
|
||||
0xffffffff, /* Reset the notification value to 0 on exit. */
|
||||
&ulNotifiedValue, /* Notified value pass out in ulNotifiedValue. */
|
||||
portMAX_DELAY);
|
||||
|
||||
#ifdef REVERSE_TRACK
|
||||
reversing_auxiliary_line_draw(track_index);
|
||||
#else
|
||||
pointer_halo_draw(pointer_halo_speed);
|
||||
#endif
|
||||
|
||||
/* if (++framecount == 1000) {
|
||||
uint32_t tick = xTaskGetTickCount();
|
||||
printf("fps %d.\n", 1000 * 1000 / (tick - stick));
|
||||
framecount = 0;
|
||||
stick = xTaskGetTickCount();
|
||||
} */
|
||||
|
||||
xQueueSend(vg_done, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef REVERSE_TRACK
|
||||
//reversing_auxiliary_line_exit();
|
||||
#else
|
||||
//pointer_halo_exit();
|
||||
#endif
|
||||
//vgFinish();
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LVGL_VG_GPU
|
||||
|
||||
extern void lvgl_thread(void *data);
|
||||
|
||||
int xm_vg_loop (void *context)
|
||||
{
|
||||
lvgl_thread(NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user