1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsutils/commongraphicsheaders/rom/graphics_adaptation.hby Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,238 @@
1.4 +#ifndef __GRAPHICS_ADAPTATION_HBY__
1.5 +#define __GRAPHICS_ADAPTATION_HBY__
1.6 +
1.7 +REM Graphics Adaptation Selection
1.8 +
1.9 +// Supported Graphics Adaptations
1.10 +#define SGA_CLASSIC 0x1000 // Pre-NGA
1.11 +#define SGA_SW 0x1001 // NGA Pure software
1.12 +#define SGA_MBX 0x1002 // NGA Fully MBX-accelerated
1.13 +#define SGA_SW_NO_GRAPHICSRESOURCE 0x1003 // Software NGA without Graphics Resource and DirectGDI
1.14 +
1.15 +// Apply defaults
1.16 +#ifndef SYMBIAN_GRAPHICS_ADAPTATION
1.17 +# ifndef SYMBIAN_GRAPHICS_USE_GCE
1.18 +# define SYMBIAN_GRAPHICS_ADAPTATION SGA_CLASSIC
1.19 +# else
1.20 +# define SYMBIAN_GRAPHICS_ADAPTATION SGA_SW
1.21 +# endif
1.22 +#endif
1.23 +
1.24 +// Validate user choices
1.25 +#if !defined(SYMBIAN_GRAPHICS_USE_GCE) && SYMBIAN_GRAPHICS_ADAPTATION != SGA_CLASSIC
1.26 +# error Invalid adaptation choice. Pre-NGA must use SGA_CLASSIC.
1.27 +#endif
1.28 +#if defined(SYMBIAN_GRAPHICS_USE_GCE) && SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC
1.29 +# error Invalid adaptation choice. NGA must not use SGA_CLASSIC.
1.30 +#endif
1.31 +#if defined(SYMBIAN_GRAPHICS_DIRECTGDI_USE_OPENVG) && SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC
1.32 +# error Invalid adaptation choice. Pre-NGA must not use DirectGDI.
1.33 +#endif
1.34 +#if defined(SYMBIAN_GRAPHICS_USE_OPENWF_MIGRATION) && SYMBIAN_GRAPHICS_ADAPTATION != SGA_SW && SYMBIAN_GRAPHICS_ADAPTATION != SGA_SW_NO_GRAPHICSRESOURCE
1.35 +# error Invalid adaptation choice. NGA-OPENWF (GCE migration) must only use basic NGA configuration SGA_SW.
1.36 +#endif
1.37 +
1.38 +
1.39 +// Apply over-rides here so that no redefining warnings are given
1.40 +#if defined(SYMBIAN_GRAPHICS_DIRECTGDI_USE_OPENVG)
1.41 +# define DIRECTGDI_DRV <directgdiadapter_vg.iby>
1.42 +#endif
1.43 +
1.44 +#if defined(MBXBACKEND)
1.45 +WARNING MBXBACKEND is deprecated.
1.46 +# define GCE_DRV <compositionbackend_mbx.iby>
1.47 +#endif
1.48 +
1.49 +#if defined(SGXBACKEND)
1.50 +WARNING SGXBACKEND is deprecated.
1.51 +# define GRAPHICSRESOURCE_DRV <graphicsresourceadapter_sgx.iby>
1.52 +# define SGRESOURCE_DRV <sgresource_sgx.iby>
1.53 +#endif
1.54 +
1.55 +// Select default drivers
1.56 +#if SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC
1.57 + #ifndef OPENGLES_DRV
1.58 + # define OPENGLES_DRV <opengles_sw.iby>
1.59 + #endif
1.60 +
1.61 + #ifndef OPENVG_DRV
1.62 + # define OPENVG_DRV <openvg_sw.iby>
1.63 + #endif
1.64 +
1.65 + #ifndef EGL_DRV
1.66 + # define EGL_DRV <egl_hg_nongce.iby>
1.67 + #endif
1.68 +
1.69 + #ifndef FBSRASTERIZER_DRV
1.70 + # define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
1.71 + #endif
1.72 +
1.73 + #if defined(GRAPHICS_TEST_GCE)
1.74 + // In order to run tests on the GCE a non-NGA environment is required
1.75 + #ifndef GCE_DRV
1.76 + # define GCE_DRV <compositionbackend_arm.iby>
1.77 + #endif
1.78 +
1.79 + #ifndef SURFACEMANAGER_DRV
1.80 + # define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
1.81 + #endif
1.82 +
1.83 + #ifndef SURFACEUPDATE_DRV
1.84 + # define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
1.85 + #endif
1.86 + #endif
1.87 +#elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_SW
1.88 + #ifndef OPENGLES_DRV
1.89 + # define OPENGLES_DRV <opengles_sw.iby>
1.90 + #endif
1.91 +
1.92 + #ifndef OPENVG_DRV
1.93 + # define OPENVG_DRV <openvg_sw.iby>
1.94 + #endif
1.95 +
1.96 + #ifndef EGL_DRV
1.97 + # ifdef SYMBIAN_GRAPHICS_USE_EGL_REF
1.98 + # define EGL_DRV <egl_ref.iby>
1.99 + # else
1.100 + # define EGL_DRV <egl_hg_gce.iby>
1.101 + # endif
1.102 + #endif
1.103 +
1.104 + #ifndef GCE_DRV
1.105 + # define GCE_DRV <compositionbackend_arm.iby>
1.106 + #endif
1.107 +
1.108 + #ifndef SURFACEMANAGER_DRV
1.109 + # define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
1.110 + #endif
1.111 +
1.112 + #ifndef SURFACEUPDATE_DRV
1.113 + # define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
1.114 + #endif
1.115 +
1.116 + #define INCLUDE_GRAPHICSRESOURCEADAPTER
1.117 +
1.118 + #ifndef GRAPHICSRESOURCE_DRV
1.119 + # define GRAPHICSRESOURCE_DRV <graphicsresourceadapter_sw.iby>
1.120 + #endif
1.121 +
1.122 + #ifndef SGRESOURCE_DRV
1.123 + # define SGRESOURCE_DRV <sgresource_sw.iby>
1.124 + #endif
1.125 +
1.126 + #ifndef DIRECTGDI_DRV
1.127 + # define DIRECTGDI_DRV <directgdiadapter_sw.iby>
1.128 + #endif
1.129 +
1.130 + #ifndef FBSRASTERIZER_DRV
1.131 + # define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
1.132 + #endif
1.133 +
1.134 + #ifndef OPENWFCLIB_DRV
1.135 + # define OPENWFCLIB_DRV <openwfc_ref.iby>
1.136 + #endif
1.137 +
1.138 +#elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_MBX
1.139 + // Imagination's MBX drivers used as default
1.140 + #ifndef OPENGLES_DRV
1.141 + # define OPENGLES_DRV <img_opengles.iby>
1.142 + #endif
1.143 +
1.144 + #ifndef OPENVG_DRV
1.145 + # define OPENVG_DRV <img_openvg.iby>
1.146 + #endif
1.147 +
1.148 + #ifndef EGL_DRV
1.149 + # define EGL_DRV <img_egl.iby>
1.150 + #endif
1.151 +
1.152 + #ifndef GCE_DRV
1.153 + # define GCE_DRV <compositionbackend_mbx.iby>
1.154 + #endif
1.155 +
1.156 + #ifndef SURFACEMANAGER_DRV
1.157 + # define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
1.158 + #endif
1.159 +
1.160 + #ifndef SURFACEUPDATE_DRV
1.161 + # define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
1.162 + #endif
1.163 +
1.164 + #define INCLUDE_GRAPHICSRESOURCEADAPTER
1.165 +
1.166 + #ifndef GRAPHICSRESOURCE_DRV
1.167 + # define GRAPHICSRESOURCE_DRV <graphicsresourceadapter_mbx.iby>
1.168 + #endif
1.169 +
1.170 + #ifndef SGRESOURCE_DRV
1.171 + # define SGRESOURCE_DRV <sgresource_mbx.iby>
1.172 + #endif
1.173 +
1.174 + #ifndef DIRECTGDI_DRV
1.175 + # define DIRECTGDI_DRV <directgdiadapter_vg.iby>
1.176 + #endif
1.177 +
1.178 + #ifndef FBSRASTERIZER_DRV
1.179 + # define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
1.180 + #endif
1.181 +
1.182 +#elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_SW_NO_GRAPHICSRESOURCE
1.183 + #ifndef OPENGLES_DRV
1.184 + # define OPENGLES_DRV <opengles_sw.iby>
1.185 + #endif
1.186 +
1.187 + #ifndef OPENVG_DRV
1.188 + # define OPENVG_DRV <openvg_sw.iby>
1.189 + #endif
1.190 +
1.191 + #ifndef EGL_DRV
1.192 + # ifdef SYMBIAN_GRAPHICS_USE_EGL_REF
1.193 + # define EGL_DRV <egl_ref.iby>
1.194 + # else
1.195 + # define EGL_DRV <egl_hg_gce.iby>
1.196 + # endif
1.197 + #endif
1.198 +
1.199 + #ifndef GCE_DRV
1.200 + # define GCE_DRV <compositionbackend_arm.iby>
1.201 + #endif
1.202 +
1.203 + #ifndef SURFACEMANAGER_DRV
1.204 + # define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
1.205 + #endif
1.206 +
1.207 + #ifndef SURFACEUPDATE_DRV
1.208 + # define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
1.209 + #endif
1.210 +
1.211 + #ifndef FBSRASTERIZER_DRV
1.212 + # define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
1.213 + #endif
1.214 +
1.215 + #ifndef SGRESOURCE_DRV
1.216 + # define SGRESOURCE_DRV <sgresource_sw.iby>
1.217 + #endif
1.218 +
1.219 + #ifndef OPENWFCLIB_DRV
1.220 + # define OPENWFCLIB_DRV <openwfc_ref.iby>
1.221 + #endif
1.222 +
1.223 +#else
1.224 +# error "Unsupported Graphics adaptation selected"
1.225 +#endif
1.226 +
1.227 +
1.228 +// Log selections to the generated OBY file
1.229 +REM "OPENGLES DRV" : OPENGLES_DRV
1.230 +REM "OPENVG DRV" : OPENVG_DRV
1.231 +REM "EGL DRV" : EGL_DRV
1.232 +REM "GCE DRV" : GCE_DRV
1.233 +REM "GRAPHICSRESOURCE DRV" : GRAPHICSRESOURCE_DRV
1.234 +REM "SURFACEMANAGER DRV" : SURFACEMANAGER_DRV
1.235 +REM "SURFACEUPDATE DRV" : SURFACEUPDATE_DRV
1.236 +REM "DIRECTGDI DRV" : DIRECTGDI_DRV
1.237 +REM "FBSRASTERIZER DRV" : FBSRASTERIZER_DRV
1.238 +REM "SRGRESOURCE DRV" : SGRESOURCE_DRV
1.239 +REM "OPENWFCLIB DRV" : OPENWFCLIB_DRV
1.240 +
1.241 +#endif // __GRAPHICS_ADAPTATION_HBY__