diff -r 000000000000 -r 5d03bc08d59c graphicsutils/commongraphicsheaders/rom/graphics_adaptation.hby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphicsutils/commongraphicsheaders/rom/graphics_adaptation.hby Tue Feb 02 01:47:50 2010 +0200 @@ -0,0 +1,241 @@ +#ifndef __GRAPHICS_ADAPTATION_HBY__ +#define __GRAPHICS_ADAPTATION_HBY__ + +REM Graphics Adaptation Selection + +// Supported Graphics Adaptations +#define SGA_CLASSIC 0x1000 // Pre-NGA +#define SGA_SW 0x1001 // NGA Pure software +#define SGA_MBX 0x1002 // NGA Fully MBX-accelerated +#define SGA_SW_NO_GRAPHICSRESOURCE 0x1003 // Software NGA without Graphics Resource and DirectGDI + +// Apply defaults +#ifndef SYMBIAN_GRAPHICS_ADAPTATION +# ifndef SYMBIAN_GRAPHICS_USE_GCE +# define SYMBIAN_GRAPHICS_ADAPTATION SGA_CLASSIC +# else +# define SYMBIAN_GRAPHICS_ADAPTATION SGA_SW +# endif +#endif + +// Validate user choices +#if !defined(SYMBIAN_GRAPHICS_USE_GCE) && SYMBIAN_GRAPHICS_ADAPTATION != SGA_CLASSIC +# error Invalid adaptation choice. Pre-NGA must use SGA_CLASSIC. +#endif +#if defined(SYMBIAN_GRAPHICS_USE_GCE) && SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC +# error Invalid adaptation choice. NGA must not use SGA_CLASSIC. +#endif +#if defined(SYMBIAN_GRAPHICS_DIRECTGDI_USE_OPENVG) && SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC +# error Invalid adaptation choice. Pre-NGA must not use DirectGDI. +#endif +#if defined(SYMBIAN_GRAPHICS_USE_OPENWF_MIGRATION) && SYMBIAN_GRAPHICS_ADAPTATION != SGA_SW && SYMBIAN_GRAPHICS_ADAPTATION != SGA_SW_NO_GRAPHICSRESOURCE +# error Invalid adaptation choice. NGA-OPENWF (GCE migration) must only use basic NGA configuration SGA_SW. +#endif + + +// Apply over-rides here so that no redefining warnings are given +#if defined(SYMBIAN_GRAPHICS_DIRECTGDI_USE_OPENVG) +# define DIRECTGDI_DRV +#endif + +#if defined(MBXBACKEND) +WARNING MBXBACKEND is deprecated. +# define GCE_DRV +#endif + +#if defined(SGXBACKEND) +WARNING SGXBACKEND is deprecated. +# define GRAPHICSRESOURCE_DRV +# define SGRESOURCE_DRV +#endif + +// Select default drivers +#if SYMBIAN_GRAPHICS_ADAPTATION == SGA_CLASSIC + #ifndef OPENGLES_DRV + # define OPENGLES_DRV + #endif + + #ifndef OPENVG_DRV + # define OPENVG_DRV + #endif + + #ifndef EGL_DRV + # define EGL_DRV + #endif + + #ifndef FBSRASTERIZER_DRV + # define FBSRASTERIZER_DRV + #endif + + #if defined(GRAPHICS_TEST_GCE) + // In order to run tests on the GCE a non-NGA environment is required + #ifndef GCE_DRV + # define GCE_DRV + #endif + + #ifndef SURFACEMANAGER_DRV + # define SURFACEMANAGER_DRV + #endif + + #ifndef SURFACEUPDATE_DRV + # define SURFACEUPDATE_DRV + #endif + #endif +#elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_SW + #ifndef OPENGLES_DRV + # define OPENGLES_DRV + #endif + + #ifndef OPENVG_DRV + # define OPENVG_DRV + #endif + + #ifndef EGL_DRV + # ifdef SYMBIAN_GRAPHICS_USE_EGL_REF + # define EGL_DRV + # else + # define EGL_DRV + # endif + #endif + + #ifndef GCE_DRV + # define GCE_DRV + #endif + + #ifndef SURFACEMANAGER_DRV + # define SURFACEMANAGER_DRV + #endif + + #ifndef SURFACEUPDATE_DRV + # define SURFACEUPDATE_DRV + #endif + + #define INCLUDE_GRAPHICSRESOURCEADAPTER + + #ifndef GRAPHICSRESOURCE_DRV + # define GRAPHICSRESOURCE_DRV + #endif + + #ifndef SGRESOURCE_DRV + # define SGRESOURCE_DRV + #endif + + #ifndef DIRECTGDI_DRV + # define DIRECTGDI_DRV + #endif + + #ifndef FBSRASTERIZER_DRV + # define FBSRASTERIZER_DRV + #endif + + #ifdef SYMBIAN_GRAPHICS_USE_OPENWF_MIGRATION + # ifndef OPENWFCLIB_DRV + # define OPENWFCLIB_DRV + # endif + #endif + +#elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_MBX + // Imagination's MBX drivers used as default + #ifndef OPENGLES_DRV + # define OPENGLES_DRV + #endif + + #ifndef OPENVG_DRV + # define OPENVG_DRV + #endif + + #ifndef EGL_DRV + # define EGL_DRV + #endif + + #ifndef GCE_DRV + # define GCE_DRV + #endif + + #ifndef SURFACEMANAGER_DRV + # define SURFACEMANAGER_DRV + #endif + + #ifndef SURFACEUPDATE_DRV + # define SURFACEUPDATE_DRV + #endif + + #define INCLUDE_GRAPHICSRESOURCEADAPTER + + #ifndef GRAPHICSRESOURCE_DRV + # define GRAPHICSRESOURCE_DRV + #endif + + #ifndef SGRESOURCE_DRV + # define SGRESOURCE_DRV + #endif + + #ifndef DIRECTGDI_DRV + # define DIRECTGDI_DRV + #endif + + #ifndef FBSRASTERIZER_DRV + # define FBSRASTERIZER_DRV + #endif + +#elif SYMBIAN_GRAPHICS_ADAPTATION == SGA_SW_NO_GRAPHICSRESOURCE + #ifndef OPENGLES_DRV + # define OPENGLES_DRV + #endif + + #ifndef OPENVG_DRV + # define OPENVG_DRV + #endif + + #ifndef EGL_DRV + # ifdef SYMBIAN_GRAPHICS_USE_EGL_REF + # define EGL_DRV + # else + # define EGL_DRV + # endif + #endif + + #ifndef GCE_DRV + # define GCE_DRV + #endif + + #ifndef SURFACEMANAGER_DRV + # define SURFACEMANAGER_DRV + #endif + + #ifndef SURFACEUPDATE_DRV + # define SURFACEUPDATE_DRV + #endif + + #ifndef FBSRASTERIZER_DRV + # define FBSRASTERIZER_DRV + #endif + + #ifndef SGRESOURCE_DRV + # define SGRESOURCE_DRV + #endif + + #ifdef SYMBIAN_GRAPHICS_USE_OPENWF_MIGRATION + # ifndef OPENWFCLIB_DRV + # define OPENWFCLIB_DRV + # endif + #endif + +#else +# error "Unsupported Graphics adaptation selected" +#endif + + +// Log selections to the generated OBY file +REM "OPENGLES DRV" : OPENGLES_DRV +REM "OPENVG DRV" : OPENVG_DRV +REM "EGL DRV" : EGL_DRV +REM "GCE DRV" : GCE_DRV +REM "GRAPHICSRESOURCE DRV" : GRAPHICSRESOURCE_DRV +REM "SURFACEMANAGER DRV" : SURFACEMANAGER_DRV +REM "SURFACEUPDATE DRV" : SURFACEUPDATE_DRV +REM "DIRECTGDI DRV" : DIRECTGDI_DRV +REM "FBSRASTERIZER DRV" : FBSRASTERIZER_DRV +REM "SRGREOURCE DRV" : SGRESOURCE_DRV + +#endif // __GRAPHICS_ADAPTATION_HBY__