os/graphics/graphicsutils/commongraphicsheaders/rom/graphics_adaptation.hby
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 #ifndef __GRAPHICS_ADAPTATION_HBY__
     2 #define __GRAPHICS_ADAPTATION_HBY__
     3 
     4 REM Graphics Adaptation Selection
     5 
     6 // Supported Graphics Adaptations
     7 #define SGA_CLASSIC                0x1000 // Pre-NGA
     8 #define SGA_SW                     0x1001 // NGA Pure software
     9 #define SGA_MBX                    0x1002 // NGA Fully MBX-accelerated
    10 #define SGA_SW_NO_GRAPHICSRESOURCE 0x1003 // Software NGA without Graphics Resource and DirectGDI
    11 
    12 // Apply defaults
    13 #ifndef SYMBIAN_GRAPHICS_ADAPTATION
    14 #  ifndef SYMBIAN_GRAPHICS_USE_GCE
    15 #    define SYMBIAN_GRAPHICS_ADAPTATION SGA_CLASSIC
    16 #  else
    17 #    define SYMBIAN_GRAPHICS_ADAPTATION SGA_SW
    18 #  endif
    19 #endif
    20 
    21 // Validate user choices
    22 #if !defined(SYMBIAN_GRAPHICS_USE_GCE) && SYMBIAN_GRAPHICS_ADAPTATION != SGA_CLASSIC
    23 #  error Invalid adaptation choice.  Pre-NGA must use SGA_CLASSIC.
    24 #endif
    25 #if defined(SYMBIAN_GRAPHICS_USE_GCE) && SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC
    26 #  error Invalid adaptation choice.  NGA must not use SGA_CLASSIC.
    27 #endif
    28 #if defined(SYMBIAN_GRAPHICS_DIRECTGDI_USE_OPENVG) && SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC
    29 #  error Invalid adaptation choice.  Pre-NGA must not use DirectGDI.
    30 #endif
    31 #if defined(SYMBIAN_GRAPHICS_USE_OPENWF_MIGRATION) && SYMBIAN_GRAPHICS_ADAPTATION != SGA_SW && SYMBIAN_GRAPHICS_ADAPTATION != SGA_SW_NO_GRAPHICSRESOURCE
    32 #  error Invalid adaptation choice.  NGA-OPENWF (GCE migration) must only use basic NGA configuration SGA_SW.
    33 #endif
    34 
    35 
    36 // Apply over-rides here so that no redefining warnings are given
    37 #if defined(SYMBIAN_GRAPHICS_DIRECTGDI_USE_OPENVG)
    38 #	define DIRECTGDI_DRV <directgdiadapter_vg.iby>
    39 #endif
    40 
    41 #if defined(MBXBACKEND)
    42 WARNING MBXBACKEND is deprecated.
    43 #	define GCE_DRV <compositionbackend_mbx.iby> 
    44 #endif
    45 
    46 #if defined(SGXBACKEND)
    47 WARNING SGXBACKEND is deprecated.
    48 #	define GRAPHICSRESOURCE_DRV <graphicsresourceadapter_sgx.iby> 
    49 #	define SGRESOURCE_DRV <sgresource_sgx.iby> 
    50 #endif
    51 
    52 // Select default drivers
    53 #if SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC
    54 	#ifndef OPENGLES_DRV
    55     #	define OPENGLES_DRV <opengles_sw.iby>
    56 	#endif
    57 
    58 	#ifndef OPENVG_DRV
    59     #	define OPENVG_DRV <openvg_sw.iby>
    60 	#endif
    61 
    62 	#ifndef EGL_DRV
    63     #	define EGL_DRV <egl_hg_nongce.iby>
    64 	#endif
    65 
    66 	#ifndef FBSRASTERIZER_DRV
    67 	#	define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
    68 	#endif
    69 	
    70 	#if defined(GRAPHICS_TEST_GCE)
    71 	// In order to run tests on the GCE a non-NGA environment is required
    72 		#ifndef GCE_DRV
    73 		#	define GCE_DRV <compositionbackend_arm.iby>
    74 		#endif
    75 
    76 		#ifndef SURFACEMANAGER_DRV
    77 		#	define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
    78 		#endif
    79 
    80 		#ifndef SURFACEUPDATE_DRV
    81 		#	define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
    82 		#endif
    83 	#endif
    84 #elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_SW
    85 	#ifndef OPENGLES_DRV
    86     #	define OPENGLES_DRV <opengles_sw.iby>
    87 	#endif
    88 
    89 	#ifndef OPENVG_DRV
    90     #	define OPENVG_DRV <openvg_sw.iby>
    91 	#endif
    92 
    93 	#ifndef EGL_DRV
    94 	#	ifdef SYMBIAN_GRAPHICS_USE_EGL_REF
    95 	#		define EGL_DRV <egl_ref.iby>
    96 	#	else
    97 	#		define EGL_DRV <egl_hg_gce.iby>
    98 	#	endif
    99 	#endif
   100 
   101 	#ifndef GCE_DRV
   102 	#	define GCE_DRV <compositionbackend_arm.iby>
   103 	#endif
   104 
   105 	#ifndef SURFACEMANAGER_DRV
   106 	#	define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
   107 	#endif
   108 
   109 	#ifndef SURFACEUPDATE_DRV
   110 	#	define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
   111 	#endif
   112 
   113     #define INCLUDE_GRAPHICSRESOURCEADAPTER
   114 
   115 	#ifndef GRAPHICSRESOURCE_DRV
   116 	#	define GRAPHICSRESOURCE_DRV <graphicsresourceadapter_sw.iby>
   117 	#endif
   118 
   119 	#ifndef SGRESOURCE_DRV
   120 	#	define SGRESOURCE_DRV <sgresource_sw.iby>
   121 	#endif
   122 
   123 	#ifndef DIRECTGDI_DRV
   124 	#	define DIRECTGDI_DRV <directgdiadapter_sw.iby>
   125 	#endif
   126 
   127 	#ifndef FBSRASTERIZER_DRV
   128 	#	define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
   129 	#endif
   130 	
   131 	#ifndef OPENWFCLIB_DRV
   132 	#	define OPENWFCLIB_DRV <openwfc_ref.iby>
   133 	#endif
   134 	
   135 #elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_MBX
   136 	// Imagination's MBX drivers used as default
   137 	#ifndef OPENGLES_DRV
   138     #	define OPENGLES_DRV <img_opengles.iby>
   139 	#endif
   140 
   141 	#ifndef OPENVG_DRV
   142     #	define OPENVG_DRV <img_openvg.iby>
   143 	#endif
   144 
   145 	#ifndef EGL_DRV
   146     #	define EGL_DRV <img_egl.iby>
   147 	#endif
   148 
   149 	#ifndef GCE_DRV
   150 	#	define GCE_DRV <compositionbackend_mbx.iby>
   151 	#endif
   152 
   153 	#ifndef SURFACEMANAGER_DRV
   154 	#	define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
   155 	#endif
   156 
   157 	#ifndef SURFACEUPDATE_DRV
   158 	#	define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
   159 	#endif
   160 
   161     #define INCLUDE_GRAPHICSRESOURCEADAPTER
   162     
   163 	#ifndef GRAPHICSRESOURCE_DRV
   164 	#	define GRAPHICSRESOURCE_DRV <graphicsresourceadapter_mbx.iby>
   165 	#endif
   166 
   167 	#ifndef SGRESOURCE_DRV
   168 	#	define SGRESOURCE_DRV <sgresource_mbx.iby>
   169 	#endif
   170 
   171 	#ifndef DIRECTGDI_DRV
   172 	#	define DIRECTGDI_DRV <directgdiadapter_vg.iby>
   173 	#endif
   174 	
   175 	#ifndef FBSRASTERIZER_DRV
   176 	#	define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
   177 	#endif
   178 	
   179 #elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_SW_NO_GRAPHICSRESOURCE
   180 	#ifndef OPENGLES_DRV
   181     #	define OPENGLES_DRV <opengles_sw.iby>
   182 	#endif
   183 
   184 	#ifndef OPENVG_DRV
   185     #	define OPENVG_DRV <openvg_sw.iby>
   186 	#endif
   187 
   188 	#ifndef EGL_DRV
   189 	#	ifdef SYMBIAN_GRAPHICS_USE_EGL_REF
   190 	#		define EGL_DRV <egl_ref.iby>
   191 	#	else
   192 	#		define EGL_DRV <egl_hg_gce.iby>
   193 	#	endif
   194 	#endif
   195 
   196 	#ifndef GCE_DRV
   197 	#	define GCE_DRV <compositionbackend_arm.iby>
   198 	#endif
   199 
   200 	#ifndef SURFACEMANAGER_DRV
   201 	#	define SURFACEMANAGER_DRV <surfacemanager_ref.iby>
   202 	#endif
   203 
   204 	#ifndef SURFACEUPDATE_DRV
   205 	#	define SURFACEUPDATE_DRV <surfaceupdate_ref.iby>
   206 	#endif
   207 	
   208 	#ifndef FBSRASTERIZER_DRV
   209 	#	define FBSRASTERIZER_DRV <fbsrasterizer_stub.iby>
   210 	#endif
   211 
   212 	#ifndef SGRESOURCE_DRV
   213 	#	define SGRESOURCE_DRV <sgresource_sw.iby>
   214 	#endif
   215 	
   216 	#ifndef OPENWFCLIB_DRV
   217 	# define OPENWFCLIB_DRV <openwfc_ref.iby>
   218 	#endif
   219 	
   220 #else
   221 #  error "Unsupported Graphics adaptation selected"
   222 #endif
   223 
   224 
   225 // Log selections to the generated OBY file
   226 REM "OPENGLES DRV"         : OPENGLES_DRV
   227 REM "OPENVG DRV"           : OPENVG_DRV
   228 REM "EGL DRV"              : EGL_DRV
   229 REM "GCE DRV"              : GCE_DRV
   230 REM "GRAPHICSRESOURCE DRV" : GRAPHICSRESOURCE_DRV 
   231 REM "SURFACEMANAGER DRV"   : SURFACEMANAGER_DRV
   232 REM "SURFACEUPDATE DRV"    : SURFACEUPDATE_DRV
   233 REM "DIRECTGDI DRV"        : DIRECTGDI_DRV 
   234 REM "FBSRASTERIZER DRV"    : FBSRASTERIZER_DRV 
   235 REM "SRGRESOURCE DRV"      : SGRESOURCE_DRV 
   236 REM "OPENWFCLIB DRV"       : OPENWFCLIB_DRV 
   237 
   238 #endif  // __GRAPHICS_ADAPTATION_HBY__