Revision: 201007 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:50:05 +0200
branchRCL_3
changeset 18 5e30ef2e26cb
parent 11 fed1595b188e
child 19 ac96196b945c
Revision: 201007 Kit: 201008
egl/eglswitch/src/eglswitch.cpp
egl/egltest/scripts/egltest_t_syncobject.script
egl/egltest/src/egltest_general.cpp
egl/egltest/src/egltest_syncobject.cpp
egl/egltest/src/egltestcommonsession.cpp
graphicsdeviceinterface/bitgdi/bitgdi_switch/bitgdiswitch.cpp
graphicsdeviceinterface/screendriver/scdv_switch/scdvswitch.cpp
graphicsdeviceinterface/screendriver/sgeneric/scdraw.inl
graphicsdeviceinterface/screendriver/sgeneric/scnew.cpp
graphicsdeviceinterface/screendriver/tsrc/scripts/mnt.cmd
graphicstest/graphicstestharness/automation/graphicssystemgui.sysdef.tb92.xml
graphicstest/graphicstestharness/automation/h4/roms.tb92.txt
graphicstest/graphicstestharness/automation/h4/roms.wdp.tb92.txt
graphicstest/graphicstestharness/automation/h6/roms.tb92.txt
graphicstest/graphicstestharness/automation/ne1/roms.tb92.txt
graphicstest/graphicstestharness/batch/replace.py
graphicstest/graphicstestharness/group/tprofiler.mmp
graphicstest/uibench/s60/group/glplanets.mmp
graphicstest/uibench/s60/group/multiplesurfaces.mmp
graphicstest/uibench/s60/group/te_uibench_s60.mmp
m3g/m3gcore11/inc/m3g_appearance.h
m3g/m3gcore11/src/m3g_appearance.c
m3g/m3gcore11/src/m3g_fog.c
m3g/m3gcore11/src/m3g_indexbuffer.c
m3g/m3gcore11/src/m3g_sprite.c
windowing/windowserver/debuglog/DECODER.CPP
windowing/windowserver/debuglog/DebLogRD.CPP
windowing/windowserver/group/DEBLOG.MMP
windowing/windowserver/group/samplegraphicsurface.mmp
windowing/windowserver/group/samplegraphicsurfacedrawer.mmp
windowing/windowserver/group/samplegraphictestsurfacemulti.mmp
windowing/windowserver/inc/WSGRAPHICDRAWERARRAY.H
windowing/windowserver/nga/CLIENT/RSCRDEV.CPP
windowing/windowserver/nga/SERVER/POINTER.CPP
windowing/windowserver/nga/SERVER/pointer.h
windowing/windowserver/nga/SERVER/renderstagemanager.cpp
windowing/windowserver/tcsc/resources/wsini_csc_nga.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_changetracking.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_h6.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_naviengine.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga_changetracking.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_vga.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_vga_changetracking.ini
windowing/windowserver/wins_switching/remotegcswitch.cpp
windowing/windowserver/wins_switching/ws32switch.cpp
windowing/windowserver/wins_switching/wservswitch.cpp
windowing/windowserver/wins_switching/wsgraphicdrawerswitch.cpp
windowing/windowserverplugins/openwfc/src/openwfcwrapper.cpp
--- a/egl/eglswitch/src/eglswitch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/egl/eglswitch/src/eglswitch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -44,10 +44,16 @@
 FARPROC vector[MAX_ORDINAL+1];		// 1 additional entry: vector[0] to set the initialised state
 
 
+#ifdef _DEBUG
 void Stop(char* aErrorMessage)
+#else
+void Stop(char* /*aErrorMessage*/)
+#endif
 	{
 	int err = GetLastError();
+#ifdef _DEBUG
 	RDebug::Printf("%S, (last error = %i)", aErrorMessage, err);
+#endif
 	_asm int 3;
 	}
 
@@ -71,14 +77,13 @@
 		{
 		Stop("... has too few exported functions");
 		}
-
-	// next position should be empty
+	
+  // next position should be empty
 	address = GetProcAddress(aDll, (LPCSTR)(MAX_ORDINAL+2));
 	if (address != NULL)
 		{
 		Stop("... has too many exported functions");
 		}
-	
 	// Set initialised
 	vector[0] = (FARPROC)1;	
 	}
@@ -102,8 +107,10 @@
 		library = "libegl_nongce.dll";
 		}
 
+#ifdef _DEBUG
 	RDebug::Printf("Redirecting libEGL.dll to \"%s\" ...\n", library);
-	
+#endif
+  	
 	Emulator::Escape();		// prevent deadlock between EKA2 scheduler and MS kernel
 	// try to load selected DLL
 	HINSTANCE instance = LoadLibraryA(library);
@@ -116,7 +123,9 @@
 	else
 		{
 		fill_vector(instance);
+#ifdef _DEBUG
 		RDebug::Printf("... DLL loaded successfully");
+#endif
 		}
 	}
 
--- a/egl/egltest/scripts/egltest_t_syncobject.script	Sat Feb 20 00:07:50 2010 +0200
+++ b/egl/egltest/scripts/egltest_t_syncobject.script	Fri Mar 12 15:50:05 2010 +0200
@@ -17,22 +17,22 @@
 PRINT Run EGL Sync Object tests excluding WaitFlush test which requires OpenVG and OpenGL ES
 LOAD_SUITE egltestserver
 
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_GetProcAddress 						z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_CreateDestroy 						z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitSignal 							z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitSignal2 						z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitDelete 							z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitWithTimeoutExpired 				z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_SignalBeforeTimeoutExpired 			z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_DeleteBeforeTimeoutExpired 			z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_SignalBeforeTimeout 	z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_SignalAfterTimeout 		z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_WaitOnTwoSyncObject 	z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Wait_TestMode 						z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_Deletion 				z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Stress 								z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Terminate 							z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Positive_TerminateBeforeTimeoutExpired 		z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Negative_WrongParameters 					z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Negative_SignalImpl 							z:\egltest\egltest_settings.ini
-RUN_TEST_STEP 100 egltestserver SyncObject_Negative_OOM 								z:\egltest\egltest_settings.ini
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_GetProcAddress 						z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_CreateDestroy 						z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitSignal 							z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitSignal2 						z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitDelete 							z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_WaitWithTimeoutExpired 				z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_SignalBeforeTimeoutExpired 			z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_DeleteBeforeTimeoutExpired 			z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_SignalBeforeTimeout 	z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_SignalAfterTimeout 		z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_WaitOnTwoSyncObject 	z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Wait_TestMode 						z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Multithread_Deletion 				z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Stress 								z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_Terminate 							z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Positive_TerminateBeforeTimeoutExpired 		z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Negative_WrongParameters 					z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Negative_SignalImpl 							z:\egltest\egltest_settings.ini	SyncObject
+RUN_TEST_STEP 100 egltestserver SyncObject_Negative_OOM 								z:\egltest\egltest_settings.ini	SyncObject
--- a/egl/egltest/src/egltest_general.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/egl/egltest/src/egltest_general.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -107,9 +107,8 @@
 		INFO_PRINTF1(_L("Dumping OpenVG strings"));
 
 		// OpenVG needs a current VG context before it will allow the call to vgGetString
-		TUidPixelFormat pixelFormat = EglTestConversion::VgFormatToSgPixelFormat(KDefaultSurfaceFormat);
-		TSgImageInfoOpenVgTarget imageInfo = TSgImageInfoOpenVgTarget(pixelFormat, KPixmapSize);
-		eglSess->CreatePixmapSurfaceAndMakeCurrentAndMatchL(imageInfo,CTestEglSession::EResourceCloseSgImageEarly, EGL_OPENVG_API);
+        EGLConfig currentConfig = eglSess->GetConfigExactMatchL(EPBufferAttribsColor64K);
+        eglSess->CreatePbufferSurfaceAndMakeCurrentL(currentConfig, KPixmapSize, EGL_OPENVG_API);
 
 		TPtrC8 ptrVgVendor((const TText8 *)vgGetString(VG_VENDOR));
 		DumpString(_L("VG_VENDOR"), ptrVgVendor);
@@ -133,9 +132,8 @@
 		INFO_PRINTF1(_L("Dumping OpenGLES strings"));
 
 		// OpenGLES needs a current GLES context before it will allow the call to glGetString
-		TUidPixelFormat pixelFormat = EglTestConversion::VgFormatToSgPixelFormat(KDefaultSurfaceFormat);
-		TSgImageInfoOpenVgTarget imageInfo = TSgImageInfoOpenVgTarget(pixelFormat, KPixmapSize);
-		eglSess->CreatePixmapSurfaceAndMakeCurrentAndMatchL(imageInfo,CTestEglSession::EResourceCloseSgImageEarly, EGL_OPENGL_ES_API);
+        EGLConfig currentConfig = eglSess->GetConfigExactMatchL(EPBufferAttribsColor64K);
+        eglSess->CreatePbufferSurfaceAndMakeCurrentL(currentConfig, KPixmapSize, EGL_OPENGL_ES_API);
 
 		TPtrC8 ptrGlesVendor((const TText8 *)glGetString(GL_VENDOR));
 		DumpString(_L("GL_VENDOR"), ptrGlesVendor);
@@ -201,7 +199,7 @@
 	INFO_PRINTF1(_L("CEglTest_QueryString_Extensions::doTestStepL"));
 
 	TInt numExtensions=0;
-	if (!GetIntFromConfig(KSectionQueryExtensions, KKeyCountExtensionsEGL, numExtensions))
+	if (!GetIntFromConfig(ConfigSection(), KKeyCountExtensionsEGL, numExtensions))
 		{
 		ERR_PRINTF2(_L("Cannot find key '%S' in INI file"), &KKeyCountExtensionsEGL);
 		User::Leave(KErrArgument);
@@ -213,7 +211,7 @@
 	for(TInt i=0; i<numExtensions; i++)
 		{
 		bufExtensionNameKey.Format(KKeyExtensionEGLX, i);
-		if (!GetStringFromConfig(KSectionQueryExtensions, bufExtensionNameKey, ptrExtensionNameValue16))
+		if (!GetStringFromConfig(ConfigSection(), bufExtensionNameKey, ptrExtensionNameValue16))
 			{
 			ERR_PRINTF2(_L("Cannot find key '%S' in INI file"), &bufExtensionNameKey);
 			User::Leave(KErrArgument);
@@ -223,7 +221,7 @@
 		}
 
 	numExtensions=0;
-	if (!GetIntFromConfig(KSectionQueryExtensions, KKeyCountExtensionsVG, numExtensions))
+	if (!GetIntFromConfig(ConfigSection(), KKeyCountExtensionsVG, numExtensions))
 		{
 		ERR_PRINTF2(_L("Cannot find key '%S' in INI file"), &KKeyCountExtensionsVG);
 		User::Leave(KErrArgument);
--- a/egl/egltest/src/egltest_syncobject.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/egl/egltest/src/egltest_syncobject.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -77,7 +77,6 @@
 		}
 	INFO_PRINTF2(_L("Tick period in micro seconds %d"), iTickPeriodMicroSeconds);
 	
-	_LIT(KSectionSyncObject, "SyncObject");
 	_LIT(KKeyThreshold, "Threshold");
 	_LIT(KKeyDelaySignalling, "DelaySignalling");
 	_LIT(KKeyWaitSyncTimeout, "WaitSyncTimeout");
@@ -85,11 +84,11 @@
 	_LIT(KKeyNumStressIterations, "NumIterations");
 
 	//retrive all setting from INI file
-	GetIntFromConfig(KSectionSyncObject, KKeyThreshold, iThreshold);
-	GetIntFromConfig(KSectionSyncObject, KKeyDelaySignalling, iDelaySignalling);
-	GetIntFromConfig(KSectionSyncObject, KKeyWaitSyncTimeout, iWaitSyncTimeout);
-	GetIntFromConfig(KSectionSyncObject, KKeyLongDelaySignalling, iLongDelaySignalling);
-	GetIntFromConfig(KSectionSyncObject, KKeyNumStressIterations, iNumStressIterations);
+	GetIntFromConfig(ConfigSection(), KKeyThreshold, iThreshold);
+	GetIntFromConfig(ConfigSection(), KKeyDelaySignalling, iDelaySignalling);
+	GetIntFromConfig(ConfigSection(), KKeyWaitSyncTimeout, iWaitSyncTimeout);
+	GetIntFromConfig(ConfigSection(), KKeyLongDelaySignalling, iLongDelaySignalling);
+	GetIntFromConfig(ConfigSection(), KKeyNumStressIterations, iNumStressIterations);
 	
 	INFO_PRINTF2(_L("Level of tolerance %d"), iThreshold);
 	INFO_PRINTF2(_L("Delay before the signal occurs  %d"), iDelaySignalling);
--- a/egl/egltest/src/egltestcommonsession.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/egl/egltest/src/egltestcommonsession.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -200,15 +200,8 @@
 		INFO_PRINTF2(_L("thread %d: Calling vgGetString for VG_EXTENSIONS)"), iThreadIdx);
 
 		// OpenVG needs a current VG context before it will allow the call to vgGetString
-		TSgImageInfoOpenVgTarget imageInfo;
-		imageInfo.iSizeInPixels = KPixmapSize;
-		imageInfo.iPixelFormat = EUidPixelFormatXRGB_8888;
-#ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
-		imageInfo.iUsage = ESgUsageBitOpenVgSurface;
-#else
-        imageInfo.iUsage = ESgUsageOpenVgTarget;
-#endif		
-		CreatePixmapSurfaceAndMakeCurrentAndMatchL(imageInfo,CTestEglSession::EResourceCloseSgImageEarly);
+        EGLConfig currentConfig = GetConfigExactMatchL(EPBufferAttribsColor64K);
+        CreatePbufferSurfaceAndMakeCurrentL(currentConfig, TSize(1,1), EGL_OPENVG_API);
 
 		extensionsString = (const char*) vgGetString(VG_EXTENSIONS);
 
@@ -883,7 +876,7 @@
 		}
 
 	// Create a context for drawing to/reading from the pixmap surface and make it current
-	const EGLint KAttribsListCtxNone[] = { EGL_NONE };;
+	const EGLint KAttribsListCtxNone[] = { EGL_NONE };
 	const EGLint KAttribsListCtxGles2[] = { EGL_CONTEXT_CLIENT_VERSION, aRenderVersionNumber, EGL_NONE };
 	const EGLint* attrib_list_ctx = (aBindAPI == EGL_OPENGL_ES_API && aRenderVersionNumber == 2) ? KAttribsListCtxGles2 : KAttribsListCtxNone; 
 	iContext = eglCreateContext(iDisplay, config, EGL_NO_CONTEXT, attrib_list_ctx);
--- a/graphicsdeviceinterface/bitgdi/bitgdi_switch/bitgdiswitch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicsdeviceinterface/bitgdi/bitgdi_switch/bitgdiswitch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -40,10 +40,16 @@
 FARPROC vector[MAX_ORDINAL+1];
 
 
+#ifdef _DEBUG
 void Stop(char* aErrorMessage)
+#else
+void Stop(char* /*aErrorMessage*/)
+#endif
 	{
 	int err = GetLastError();
+#ifdef _DEBUG
 	RDebug::Printf("%s, (last error = %i)", aErrorMessage, err);
+#endif
 	_asm int 3;
 	}
 
@@ -77,8 +83,10 @@
 	UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalBoolProperty,  (TAny*)"symbian_graphics_use_gce",  &gce);
 	const char* library = gce ? "bitgdi_gce.dll" : "bitgdi_nongce.dll";
 
+#ifdef _DEBUG
 	RDebug::Printf("Redirecting bitgdi.dll to \"%s\" ...\n", library);
-	
+#endif
+
 	Emulator::Escape();		// prevent deadlock between EKA2 scheduler and MS kernel
 	// try to load selected DLL
 	HINSTANCE instance = LoadLibraryA(library);
@@ -91,7 +99,9 @@
 	else
 		{
 		fill_vector(instance);
+#ifdef _DEBUG
 		RDebug::Printf("... DLL loaded successfully");
+#endif
 		}
 	}
 
--- a/graphicsdeviceinterface/screendriver/scdv_switch/scdvswitch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicsdeviceinterface/screendriver/scdv_switch/scdvswitch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -39,11 +39,16 @@
 
 FARPROC vector[MAX_ORDINAL+1];
 
-
+#ifdef _DEBUG
 void Stop(char* aErrorMessage)
+#else
+void Stop(char* /*aErrorMessage*/)
+#endif
 	{
 	int err = GetLastError();
+#ifdef _DEBUG
 	RDebug::Printf("%S, (last error = %i)", aErrorMessage, err);
+#endif
 	_asm int 3;
 	}
 
@@ -77,8 +82,10 @@
 	UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalBoolProperty,  (TAny*)"symbian_graphics_use_gce",  &gce);
 	const char* library = gce ? "_generic_scdv.dll" : "_wins_scdv.dll";
 
+#ifdef _DEBUG
 	RDebug::Printf("Redirecting scdv.dll to \"%s\" ...\n", library);
-	
+#endif
+  	
 	Emulator::Escape();		// prevent deadlock between EKA2 scheduler and MS kernel
 	// try to load selected DLL
 	HINSTANCE instance = LoadLibraryA(library);
@@ -91,7 +98,9 @@
 	else
 		{
 		fill_vector(instance);
+#ifdef _DEBUG
 		RDebug::Printf("... DLL loaded successfully");
+#endif
 		}
 	}
 
--- a/graphicsdeviceinterface/screendriver/sgeneric/scdraw.inl	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicsdeviceinterface/screendriver/sgeneric/scdraw.inl	Fri Mar 12 15:50:05 2010 +0200
@@ -49,7 +49,7 @@
 		{	//Note: This will cause WServ startup to fail. WServ only accepts KErrNotSupported
 		return KErrHardwareNotAvailable;
 		}
-	TInt ret = CDrawXxxBppBitmap::Construct(aSize);
+	TInt ret = CDrawXxxBppBitmap::Construct(aSize, CDrawXxxBppBitmap::iScanLineWords << 2);
 	if (ret == KErrNone)
 		{
 		CDrawXxxBppBitmap::iBits = (TUint32*)iHelper.AddressFirstPixel();
--- a/graphicsdeviceinterface/screendriver/sgeneric/scnew.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicsdeviceinterface/screendriver/sgeneric/scnew.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -27,8 +27,7 @@
 #include "scdraw.h"
 #include "scdraw.inl"
 #include <graphics/gdi/gdiconsts.h>
-
-
+#include <graphics/suerror.h>
 /**
 Creates an instance of CFbsDrawDevice class.
 @param aScreenNo Screen number
@@ -351,7 +350,7 @@
 	if (iUpdateRegion.IsEmpty())
 		return;
 
-	iSurfaceUpdateSession.SubmitUpdate(ScreenNumber(), iSurface, 0, &iUpdateRegion);
+	iSurfaceUpdateSession.SubmitUpdate(KAllScreens, iSurface, 0, &iUpdateRegion);
 	iUpdateRegion.Clear();
 	}
 
--- a/graphicsdeviceinterface/screendriver/tsrc/scripts/mnt.cmd	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicsdeviceinterface/screendriver/tsrc/scripts/mnt.cmd	Fri Mar 12 15:50:05 2010 +0200
@@ -39,6 +39,11 @@
 if "%1"=="" goto help
 if "%EPOCROOT%"=="" echo error: Variable Epocroot must be defined
 if "%EPOCROOT%"=="" goto help
+
+if  not defined EPOC_INI (
+	set EPOC_INI=%EPOCROOT%epoc32\data\epoc.ini
+)
+
 goto %1
 goto help
 
@@ -46,15 +51,15 @@
 
 :install
 echo Backing up EPOC.INI.
-if not exist %EPOCROOT%epoc32\data\epoc.bak copy %EPOCROOT%epoc32\data\epoc.ini %EPOCROOT%epoc32\data\epoc.bak >nul
+if not exist %EPOC_INI%.scdvbak copy %EPOC_INI% %EPOC_INI%.scdvbak >nul
 
 rem add line to epoc.ini so that the system starter will start the emulator in the specified display mode
-echo SYMBIAN_GRAPHICS_USE_GCE ON >> %EPOCROOT%epoc32\data\epoc.ini
-echo SYMBIAN_BASE_USE_GCE ON >> %EPOCROOT%epoc32\data\epoc.ini
-echo ColorDepth Color16M >> %EPOCROOT%epoc32\data\epoc.ini
+echo SYMBIAN_GRAPHICS_USE_GCE ON >> %EPOC_INI%
+echo SYMBIAN_BASE_USE_GCE ON >> %EPOC_INI%
+echo ColorDepth Color16M >> %EPOC_INI%
 
-echo === New EPOC.INI -- %EPOCROOT%epoc32\data\epoc.ini ===
-type %EPOCROOT%epoc32\data\epoc.ini
+echo === New EPOC.INI -- %EPOC_INI% ===
+type %EPOC_INI%
 echo ======================================================
 
 goto :EOF
@@ -63,14 +68,14 @@
 rem ================ Installonb ==============
 :installonb
 echo Backing up EPOC.INI.
-if not exist %EPOCROOT%epoc32\data\epoc.bak copy %EPOCROOT%epoc32\data\epoc.ini %EPOCROOT%epoc32\data\epoc.bak >nul
+if not exist %EPOC_INI%.scdvbak copy %EPOC_INI% %EPOC_INI%.scdvbak >nul
 
 rem For ONB system only add line to epoc.ini so that the system starter will start the emulator in the specified display mode
-echo. >> %EPOCROOT%epoc32\data\epoc.ini
-echo ColorDepth Color16M >> %EPOCROOT%epoc32\data\epoc.ini
+echo. >> %EPOC_INI%
+echo ColorDepth Color16M >> %EPOC_INI%
 
-echo === New EPOC.INI -- %EPOCROOT%epoc32\data\epoc.ini ===
-type %EPOCROOT%epoc32\data\epoc.ini
+echo === New EPOC.INI -- %EPOC_INI% ===
+type %EPOC_INI%
 echo ======================================================
 
 goto :EOF
@@ -79,7 +84,7 @@
 
 :uninstall
 echo Restoring EPOC.INI.
-if exist %EPOCROOT%epoc32\data\epoc.bak xcopy /r /y %EPOCROOT%epoc32\data\epoc.bak %EPOCROOT%epoc32\data\epoc.ini >nul
+if exist %EPOC_INI%.scdvbak xcopy /r /y %EPOC_INI%.scdvbak %EPOC_INI% >nul
 goto :EOF
 
 
--- a/graphicstest/graphicstestharness/automation/graphicssystemgui.sysdef.tb92.xml	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/automation/graphicssystemgui.sysdef.tb92.xml	Fri Mar 12 15:50:05 2010 +0200
@@ -199,6 +199,18 @@
 					<component name="Surface Update">
 						<unit bldFile="sf\os\graphics\graphicscomposition\surfaceupdate\group" mrp="sf\os\graphics\graphicscomposition\surfaceupdate\group\graphics_surfaceupdate.mrp"/>
 					</component>
+					<component name="OpenWF Support">
+						<unit bldFile="sf\os\graphics\graphicscomposition\openwfsupport\group" mrp="sf\os\graphics\graphicscomposition\openwfsupport\group\graphics_openwfsupport.mrp"/>
+					</component>
+					<component name="OpenWF Composition Conformance Tests">
+						<unit bldFile="sf\os\graphics\graphicscomposition\openwfconformancetest\group" mrp="sf\os\graphics\graphicscomposition\openwfconformancetest\CT_PortingLayer\src\Platform\Symbian\group\graphics_openwfconformancetest.mrp"/>
+					</component>
+					<component name="OpenWF Composition Interface">
+						<unit bldFile="sf\os\graphics\graphicscomposition\openwfcinterface\group" mrp="sf\os\graphics\graphicscomposition\openwfcinterface\group\graphics_openwfcinterface.mrp"/>
+					</component>
+					<component name="OpenWF Composition Engine">
+						<unit bldFile="sf\os\graphics\graphicscomposition\openwfcompositionengine\group" mrp="sf\os\graphics\graphicscomposition\openwfcompositionengine\group\graphics_openwfcompositionengine.mrp"/>
+					</component>
 				</collection>
 				<collection name="Graphics Device Interface">
 					<component name="BitGDI">
--- a/graphicstest/graphicstestharness/automation/h4/roms.tb92.txt	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/automation/h4/roms.tb92.txt	Fri Mar 12 15:50:05 2010 +0200
@@ -13,7 +13,7 @@
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby te_uibench_s60.iby egl.iby opengles.iby openvg.iby internaltestfonts.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DFBSRASTERIZER_DRV="^<"fbsrasterizer_test.iby"^>"','h4hrp_uibench_s60_armv5_dpdef','Graphics Test ROM UIBench S60 DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_uibench_s60.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','h4hrp_graphics7_armv5_dpdef','Graphics Test ROM (7) DP Default','\epoc32\data\z\graphics\wsini_integ_color64k.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_07.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec t_wservinteg.iby opengles.iby graphics_testharness.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','h4hrp_graphics8_armv5_dpdef','Graphics Test ROM (8) - WServ Integ DP Default','\epoc32\data\z\graphics\wsini_integ.ini,\epoc32\data\z\system\data\wsini.ini;\epoc32\data\z\system\data\testexecute_modified.ini,\epoc32\data\z\system\data\testexecute.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_08.txt','')
-RomAndAutoRom('armv5','h4hrp pagedrom techview platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DGRAPHICS_TEST_GCE','h4hrp_graphics9_armv5_dpdef','Graphics Test ROM (9) - Hybrid GCE DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_09.txt','')
+RomAndAutoRom('armv5','h4hrp pagedrom textshell platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE','h4hrp_graphics9_armv5_dpdef','Graphics Test ROM (9) - Hybrid GCE DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_09.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE','h4hrp_graphics11_armv5_dpdef','Graphics Test ROM (11) - Graphics Resource DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_11.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE','h4hrp_graphics11a_armv5_dpdef','Graphics Test ROM (11a) - DirectGDI tests (requiring USB/Memory Card support) DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_11a.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','h4hrp_graphics12_armv5_dpdef','Graphics Test ROM (12) DP Default','\epoc32\data\z\graphics\wsini_integ_color16ma.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_12.txt','')
--- a/graphicstest/graphicstestharness/automation/h4/roms.wdp.tb92.txt	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/automation/h4/roms.wdp.tb92.txt	Fri Mar 12 15:50:05 2010 +0200
@@ -13,7 +13,7 @@
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby te_uibench_s60.iby egl.iby opengles.iby openvg.iby internaltestfonts.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DFBSRASTERIZER_DRV="^<"fbsrasterizer_test.iby"^>" -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_uibench_s60_armv5_wdp','Graphics Test ROM UIBench S60 WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_uibench_s60.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics7_armv5_wdp','Graphics Test ROM (7) WDP','\epoc32\data\z\graphics\wsini_integ_color64k.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_07.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec t_wservinteg.iby opengles.iby graphics_testharness.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics8_armv5_wdp','Graphics Test ROM (8) - WServ Integ WDP','\epoc32\data\z\graphics\wsini_integ.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_08.txt','')
-RomAndAutoRom('armv5','h4hrp pagedrom techview platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DGRAPHICS_TEST_GCE -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics9_armv5_wdp','Graphics Test ROM (9) - Hybrid GCE WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_09.txt','')
+RomAndAutoRom('armv5','h4hrp pagedrom textshell platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics9_armv5_wdp','Graphics Test ROM (9) - Hybrid GCE WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_09.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics11_armv5_wdp','Graphics Test ROM (11) - Graphics Resource WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_11.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics11a_armv5_wdp','Graphics Test ROM (11a) - DirectGDI tests (requiring USB/Memory Card support) WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_11a.txt','')
 RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics12_armv5_wdp','Graphics Test ROM (12) WDP','\epoc32\data\z\graphics\wsini_integ_color16ma.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_12.txt','')
--- a/graphicstest/graphicstestharness/automation/h6/roms.tb92.txt	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/automation/h6/roms.tb92.txt	Fri Mar 12 15:50:05 2010 +0200
@@ -13,7 +13,7 @@
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby te_uibench_s60.iby egl.iby opengles.iby openvg.iby internaltestfonts.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DFBSRASTERIZER_DRV="^<"fbsrasterizer_test.iby"^>"','34xx_sdp_uibench_s60_armv5_dpdef','Graphics Test ROM UIBench S60 DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_uibench_s60.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','34xx_sdp_graphics7_armv5_dpdef','Graphics Test ROM (7) DP Default','\epoc32\data\z\graphics\wsini_integ_h6_color64k.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_07.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec t_wservinteg.iby opengles.iby graphics_testharness.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','34xx_sdp_graphics8_armv5_dpdef','Graphics Test ROM (8) - WServ Integ DP Default','\epoc32\data\z\graphics\wsini_integ.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_08.txt','')
-RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DGRAPHICS_TEST_GCE','34xx_sdp_graphics9_armv5_dpdef','Graphics Test ROM (9) - Hybrid GCE DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_09.txt','')
+RomAndAutoRom('armv5','34xx_sdp pagedrom textshell platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE','34xx_sdp_graphics9_armv5_dpdef','Graphics Test ROM (9) - Hybrid GCE DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_09.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE','34xx_sdp_graphics11_armv5_dpdef','Graphics Test ROM (11) - Graphics Resource DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_11.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE','34xx_sdp_graphics11a_armv5_dpdef','Graphics Test ROM (11a) - DirectGDI tests (requiring USB/Memory Card support) DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_11a.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','34xx_sdp_graphics12_armv5_dpdef','Graphics Test ROM (12) DP Default','\epoc32\data\z\graphics\wsini_integ_h6_color16ma.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_12.txt','')
@@ -26,7 +26,7 @@
 RomAndAutoRom('armv5','34xx_sdp pagedrom minigui platsec graphics_testharness.iby csc_plugin.iby tcsc.iby egltesthybrid.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE','34xx_sdp_graphicseglhybrid_armv5_dpdef','Graphics Test ROM (eglhybrid) - EGL Hybrid Graphics Implementation DP Default','\epoc32\data\z\wstest\wsini_csc_nga_h6.ini,\epoc32\data\z\wsini_minigui.ini;\epoc32\data\z\graphicstest\testexecute_minigui.ini,\epoc32\data\z\system\data\testexecute.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_eglhybrid.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom minigui platsec graphics_testharness.iby csc_plugin.iby tcsc.iby egltestref.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_USE_EGL_REF','34xx_sdp_graphicseglref_armv5_dpdef','Graphics Test ROM (eglref) - EGL Reference Graphics Implementation DP Default','\epoc32\data\z\wstest\wsini_csc_nga_h6.ini,\epoc32\data\z\wsini_minigui.ini;\epoc32\data\z\graphicstest\testexecute_minigui.ini,\epoc32\data\z\system\data\testexecute.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_eglref.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby talf.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE','34xx_sdp_graphics23_armv5_dpdef','Graphics Test ROM (23) - ALF/ChangeTracking DP Default','\epoc32\data\z\talf\wsini.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_23.txt','')
-RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby t_eventchecker.iby t_bitgdirenderstage.iby wserv.oby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DRVT','34xx_sdp_graphics24_armv5_dpdef','Graphics Test ROM (24) - BitGDI Renderstage DP Default','\epoc32\data\z\wstest\tbitgdirenderstage\arm\wsini.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_24.txt','')
+RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby t_eventchecker.iby t_bitgdirenderstage.iby wserv.oby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DRVT','34xx_sdp_graphics24_armv5_dpdef','Graphics Test ROM (24) - BitGDI Renderstage DP Default','\epoc32\data\z\wstest\tbitgdirenderstage\arm\wsini.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_24.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec wserv.oby graphics_testharness.iby talf.iby','-D_NAND2 -DWITH_TVOUT -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','34xx_sdp_graphics25_armv5_dpdef','Graphics Test ROM (25) - ALF/ChangeTracking per screen DP Default','\epoc32\data\z\talf\wsini_ct_recovery.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_25.txt','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec appfwk_test.iby','-D_NAND2 -DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -D_DEBUG','34xx_sdp_uiframeworks_armv5_dpdef','UI Frameworks DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_uif.txt','')
 Rom('armv5', '34xx_sdp minigui', '-nosymbols -DUSE_SDIO_SD_MMC', '34xx_sdp_minigui', 'MiniGUI ROM', '' )
--- a/graphicstest/graphicstestharness/automation/ne1/roms.tb92.txt	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/automation/ne1/roms.tb92.txt	Fri Mar 12 15:50:05 2010 +0200
@@ -11,7 +11,7 @@
 RomAndAutoRom('armv5','naviengine techview platsec graphics_testharness.iby te_uibench_s60.iby egl.iby opengles.iby openvg.iby internaltestfonts.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24UBPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DFBSRASTERIZER_DRV="^<"fbsrasterizer_test.iby"^>"','naviengine_uibench_s60_armv5','Graphics Test ROM UIBench S60 DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_uibench_s60.txt','')
 RomAndAutoRom('armv5','naviengine techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','naviengine_graphics7_armv5','Graphics Test ROM (7)','\epoc32\data\z\graphics\wsini_integ_naviengine_color64k.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_07.txt','')
 RomAndAutoRom('armv5','naviengine techview platsec t_wservinteg.iby opengles.iby graphics_testharness.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','naviengine_graphics8_armv5','Graphics Test ROM (8) - WServ Integ','\epoc32\data\z\graphics\wsini_integ_norotation.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_08.txt','')
-RomAndAutoRom('armv5','naviengine techview platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DGRAPHICS_TEST_GCE','naviengine_graphics9_armv5','Graphics Test ROM (9) - Hybrid GCE','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_09.txt','')
+RomAndAutoRom('armv5','naviengine textshell platsec surfacemanagertest.iby wservtest.iby gce_tests.iby tdisplaychannel.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE','naviengine_graphics9_armv5','Graphics Test ROM (9) - Hybrid GCE','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_09.txt','')
 RomAndAutoRom('armv5','naviengine techview platsec graphics_testharness.iby directgditest.iby ityperast.iby graphicsresourcetest.iby opengles.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE','naviengine_graphics11_armv5','Graphics Test ROM (11) - Graphics Resource','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_11.txt','')
 RomAndAutoRom('armv5','naviengine techview platsec graphics_test2.iby wservtest.iby csc_plugin.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','naviengine_graphics12_armv5','Graphics Test ROM (12)','\epoc32\data\z\graphics\wsini_integ_naviengine_color16ma.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_12.txt','')
 RomAndAutoRom('armv5','naviengine techview platsec graphics_testharness.iby t_wservgenericplugin.iby','-DUSE_SDIO_SD_MMC -DSMP -DUSE_24BPP_DISPLAY_VARIANT -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW','naviengine_graphics13_armv5','Graphics Test ROM (13) - Generic Plugin','\epoc32\data\z\wstest\genericplugin\wsini_nga_onescreen.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\ne1\tests_13.txt','')
--- a/graphicstest/graphicstestharness/batch/replace.py	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/batch/replace.py	Fri Mar 12 15:50:05 2010 +0200
@@ -14,7 +14,7 @@
 # Description: 
 #
 
-import sys
+import sys
 # first argument is path to file to modify
 filePath=sys.argv[1]
 outFile=filePath
--- a/graphicstest/graphicstestharness/group/tprofiler.mmp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/graphicstestharness/group/tprofiler.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -22,7 +22,7 @@
 SOURCE			tprofiler.cpp
 
 USERINCLUDE		../inc
-SYSTEMINCLUDE	/epoc32/include
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 LIBRARY			euser.lib testexecuteutils.lib testexecutelogclient.lib hal.lib
 
--- a/graphicstest/uibench/s60/group/glplanets.mmp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/uibench/s60/group/glplanets.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -22,8 +22,7 @@
 userinclude     .
 userinclude     ../src
 userinclude     ../src/tests_zorder
-systeminclude   /epoc32/include
-systeminclude   /epoc32/include/stdapis
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 sourcepath      .
 START resource glplanets_reg.rss
--- a/graphicstest/uibench/s60/group/multiplesurfaces.mmp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/uibench/s60/group/multiplesurfaces.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -25,8 +25,7 @@
 userinclude     ..\src\tests_zorder
 userinclude     ..\src\windows
 
-systeminclude   /epoc32/include
-systeminclude   /epoc32/include/stdapis
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 sourcepath      .
 START resource multiplesurfaces_reg.rss
--- a/graphicstest/uibench/s60/group/te_uibench_s60.mmp	Sat Feb 20 00:07:50 2010 +0200
+++ b/graphicstest/uibench/s60/group/te_uibench_s60.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -93,7 +93,7 @@
 USERINCLUDE  ../src/tests_egl
 
 //system includes
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 START BITMAP videoplay2.mbm
--- a/m3g/m3gcore11/inc/m3g_appearance.h	Sat Feb 20 00:07:50 2010 +0200
+++ b/m3g/m3gcore11/inc/m3g_appearance.h	Fri Mar 12 15:50:05 2010 +0200
@@ -125,28 +125,32 @@
  */
 static M3G_INLINE M3Guint m3gGetAppearanceSortKey(const Appearance *appearance)
 {
-    M3Guint key = appearance ? appearance->sortKey : 0;
+    if (appearance) {
+        M3Guint key = appearance->sortKey;
 
-    /* The blending state bit is set dynamically, as it may change
-     * without changing the appearance (we have no signaling from
-     * CompositingMode for that) */
-    
-    if (appearance->compositingMode != NULL
-        && appearance->compositingMode->blendingMode != M3G_REPLACE) {
-        key |= (1u << (32 - M3G_APPEARANCE_HARD_SORT_BITS));
-    }
+        /* The blending state bit is set dynamically, as it may change
+         * without changing the appearance (we have no signaling from
+         * CompositingMode for that) */
+        
+        if (appearance->compositingMode != NULL
+            && appearance->compositingMode->blendingMode != M3G_REPLACE) {
+            key |= (1u << (32 - M3G_APPEARANCE_HARD_SORT_BITS));
+        }
 
-    if (m3gGetColorMaskWorkaround(M3G_INTERFACE(appearance))) {
-        /* Override the top 2 bits of the sorting key so that ColorMask
-         * changes are minimized */
-        if (appearance) {
-            key &= ~(0x03 << 22);
-            key |= (((M3Guint) m3gColorMask(appearance)) & 1) << 23;
-            key |= (((M3Guint) m3gAlphaMask(appearance)) & 1) << 22;
+        if (m3gGetColorMaskWorkaround(M3G_INTERFACE(appearance))) {
+            /* Override the top 2 bits of the sorting key so that ColorMask
+             * changes are minimized */
+            if (appearance) {
+                key &= ~(0x03 << 22);
+                key |= (((M3Guint) m3gColorMask(appearance)) & 1) << 23;
+                key |= (((M3Guint) m3gAlphaMask(appearance)) & 1) << 22;
+            }
         }
-    }
 
-    return key;
+        return key;
+    } 
+
+    return M3G_FALSE;
 }
 
 /*!
--- a/m3g/m3gcore11/src/m3g_appearance.c	Sat Feb 20 00:07:50 2010 +0200
+++ b/m3g/m3gcore11/src/m3g_appearance.c	Fri Mar 12 15:50:05 2010 +0200
@@ -427,9 +427,8 @@
 
         if (appearance != NULL) {
     		m3gInitObject(&appearance->object, m3g, M3G_CLASS_APPEARANCE);
+            m3gRegenerateSortKey(appearance);
         }
-
-        m3gRegenerateSortKey(appearance);
         
         return (M3GAppearance) appearance;
     }
--- a/m3g/m3gcore11/src/m3g_fog.c	Sat Feb 20 00:07:50 2010 +0200
+++ b/m3g/m3gcore11/src/m3g_fog.c	Fri Mar 12 15:50:05 2010 +0200
@@ -197,9 +197,10 @@
     M3G_ASSERT_GL;
 }
 
+#ifdef M3G_USE_NGL_API
 /*!
  * \internal
- * \brief Applies fog to OpenGL. This is used for
+ * \brief Applies fog to NGL. This is used for
  * Sprite3D objects only.
  *
  * \param self          Fog object
@@ -232,12 +233,9 @@
 
 		glEnable(GL_FOG);
 		glFogf(GL_FOG_MODE, GL_LINEAR);
-#ifdef M3G_USE_NGL_API
+
         /* NGL works differently in fog calculation */
 		glFogf(GL_FOG_START, -m3gDiv(finalZ, fogValue));
-#else
-		glFogf(GL_FOG_START, m3gAbs(m3gDiv(finalZ, fogValue)));
-#endif
 		glFogf(GL_FOG_END, 0.f);
 		glFogxv(GL_FOG_COLOR, temp);
     }
@@ -245,7 +243,7 @@
 		glDisable(GL_FOG);
     }
 }
-
+#endif
 /*----------------------------------------------------------------------
  * Virtual function table
  *--------------------------------------------------------------------*/
--- a/m3g/m3gcore11/src/m3g_indexbuffer.c	Sat Feb 20 00:07:50 2010 +0200
+++ b/m3g/m3gcore11/src/m3g_indexbuffer.c	Fri Mar 12 15:50:05 2010 +0200
@@ -483,7 +483,7 @@
                                    M3Gint *indices)
 {
     M3Gint i, j, tri = 0;
-    M3Gint triIndices[4];
+    M3Gint triIndices[4] = {0, 0, 0, 0};
     M3G_VALIDATE_OBJECT(buffer);
     M3G_UNREF(batchIndex);
 
--- a/m3g/m3gcore11/src/m3g_sprite.c	Sat Feb 20 00:07:50 2010 +0200
+++ b/m3g/m3gcore11/src/m3g_sprite.c	Fri Mar 12 15:50:05 2010 +0200
@@ -278,7 +278,10 @@
         m3gTransformVec4(projMatrix, &x);
         m3gTransformVec4(projMatrix, &y);
     }
-
+#ifndef M3G_USE_NGL_API
+    /* Store w after projection */
+    eyeSpace->w = ot.w;
+#endif
     m3gScaleVec4(&ot, m3gRcp(ot.w));
     m3gScaleVec4(&x, m3gRcp(x.w));
     m3gScaleVec4(&y, m3gRcp(y.w));
@@ -331,12 +334,12 @@
         x.x = m3gMul(x.x, (M3Gfloat) rIsect.width);
         y.y = m3gMul(y.y, (M3Gfloat) rIsect.height);
     }
-
+#ifdef M3G_USE_NGL_API
     /* Store final Z */
     if (eyeSpace != NULL) {
         eyeSpace->w = ot.z;
     }
-
+#endif
     /* Set up positions */
     vert[0 * 3 + 0] = (M3Gint) m3gMul(65536, m3gSub(ot.x, x.x));
     vert[0 * 3 + 1] = m3gRoundToInt(m3gAdd(m3gMul(65536, m3gAdd(ot.y, y.y)), 0.5f));
@@ -464,7 +467,11 @@
     glMatrixMode(GL_MODELVIEW);
 
     /* Apply fog and compositing mode */
+#ifdef M3G_USE_NGL_API
     m3gApplySpriteFog(sprite->appearance->fog, eyeSpace.z, eyeSpace.w);
+#else
+    m3gApplyFog(sprite->appearance->fog);
+#endif
     m3gApplyCompositingMode(sprite->appearance->compositingMode, ctx);
 
     {
@@ -484,6 +491,32 @@
 
     m3gPushScreenSpace(ctx, M3G_FALSE);
 
+#ifndef M3G_USE_NGL_API
+    /* Transform the sprite vertices (in NDC) back to eye coordinates, so that 
+       the fog distance will be calculated correctly in the OpenGL pipeline. */
+    {
+        GLfloat transform[16];
+        GLfloat scaleW[16] = { 0.f, 0.f, 0.f, 0.f,
+                               0.f, 0.f, 0.f, 0.f,
+                               0.f, 0.f, 0.f, 0.f,
+                               0.f, 0.f, 0.f, 0.f };
+        Matrix invProjMatrix;
+        const Matrix *projMatrix = m3gProjectionMatrix(m3gGetCurrentCamera(ctx));
+
+        m3gMatrixInverse(&invProjMatrix, projMatrix);
+		m3gGetMatrixColumns(&invProjMatrix, transform);
+        
+        glMatrixMode(GL_MODELVIEW);
+        glMultMatrixf(transform);
+        scaleW[0] = scaleW[5] = scaleW[10] = scaleW[15] = eyeSpace.w;
+        glMultMatrixf(scaleW);
+
+        glMatrixMode(GL_PROJECTION);
+        m3gGetMatrixColumns(projMatrix, transform);
+        glLoadMatrixf(transform);
+    }
+#endif
+
     /* Load indices -> draws the sprite */
     M3G_BEGIN_PROFILE(M3G_INTERFACE(ctx), M3G_PROFILE_NGL_DRAW);
     glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
--- a/windowing/windowserver/debuglog/DECODER.CPP	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/debuglog/DECODER.CPP	Fri Mar 12 15:50:05 2010 +0200
@@ -189,10 +189,10 @@
 	switch (aOpcode)
 		{
 	case EWsWinOpReceiveFocus:
-		aText.AppendFormat(_L("ReceiveFocus(%d)"), pData.Bool);
+		aText.AppendFormat(_L("ReceiveFocus(%d)"), *pData.Bool);
 		break;
 	case EWsWinOpAutoForeground:
-		aText.AppendFormat(_L("AutoForeground(%d)"), pData.Bool);
+		aText.AppendFormat(_L("AutoForeground(%d)"), *pData.Bool);
 		break;
 	case EWsWinOpCancelCaptureKey:
 		aText.AppendFormat(_L("CancelCaptureKey(%d)"), *pData.UInt);
@@ -781,6 +781,24 @@
 		aText.AppendFormat(LogCreateGraphic);		
 		}
 		break;
+	case EWsClOpRegisterSurface:
+		{
+		TInt screenNumber = pData.SurfaceRegister->screenNumber;
+		const TSurfaceId& surfaceId = pData.SurfaceRegister->surfaceId;
+		
+		_LIT(LogRegisterSurface,"RegisterSurface(aScreenNumber(%d), TSurfaceId{%x,%x,%x,%x})");
+		aText.AppendFormat(LogRegisterSurface, screenNumber, surfaceId.iInternal[0], surfaceId.iInternal[1], surfaceId.iInternal[2], surfaceId.iInternal[3]);
+		}
+		break;
+	case EWsClOpUnregisterSurface:
+		{
+		TInt screenNumber = pData.SurfaceRegister->screenNumber;
+		const TSurfaceId& surfaceId = pData.SurfaceRegister->surfaceId;
+		
+		_LIT(LogUnregisterSurface,"UnregisterSurface(aScreenNumber(%d), TSurfaceId{%x,%x,%x,%x})");
+		aText.AppendFormat(LogUnregisterSurface, screenNumber, surfaceId.iInternal[0], surfaceId.iInternal[1], surfaceId.iInternal[2], surfaceId.iInternal[3]);
+		}
+		break;
 	case EWsClOpSetCloseProximityThresholds:
 		{
 		_LIT(LogSetCloseProximityThresholds,"SetCloseProximityThresholds(%d, %d)");
@@ -1259,19 +1277,19 @@
 	case EWsWinOpMoveToGroup:
 		{
 		_LIT(LogWinMoveToGroup,"MoveToGroup(%d)");
-		aText.AppendFormat(LogWinMoveToGroup, pData.Int);
+		aText.AppendFormat(LogWinMoveToGroup, *pData.Int);
 		}
 		break;	
 	case EWsWinOpStoreDrawCommands:
 		{
 		_LIT(LogWinStoreDrawCommands,"EnableRedrawStore(%u)");
-		aText.AppendFormat(LogWinStoreDrawCommands, pData.Bool);
+		aText.AppendFormat(LogWinStoreDrawCommands, *pData.Bool);
 		}
 		break;	
 	case EWsWinOpSetPointerCapturePriority:
 		{
 		_LIT(LogWinSetPointerCapturePriority,"SetPointerCapturePriority(%d)");
-		aText.AppendFormat(LogWinSetPointerCapturePriority, pData.Int);
+		aText.AppendFormat(LogWinSetPointerCapturePriority, *pData.Int);
 		}
 		break;	
 	case EWsWinOpGetPointerCapturePriority:
@@ -1289,7 +1307,7 @@
 	case EWsWinOpSetTransparencyPolicy:
 		{
 		_LIT(LogWinSetTransparentPolicy,"SetTransparencyPolicy(TransparencyPolicy= %d)");
-		aText.AppendFormat(LogWinSetTransparentPolicy, pData.Int);
+		aText.AppendFormat(LogWinSetTransparentPolicy, *pData.Int);
 		}
 		break;	
 	case EWsWinOpIsRedrawStoreEnabled:
@@ -1316,6 +1334,64 @@
 		aText.AppendFormat(LogClientHandle);
 		}
 		break;
+    case EWsWinOpSetBackgroundSurface:
+        {
+        _LIT(LogWinSetBackgroundSurface,"SetBackgroundSurface(TSurfaceId{%x,%x,%x,%x})");
+        aText.AppendFormat(LogWinSetBackgroundSurface, pData.Surface->iInternal[0],pData.Surface->iInternal[1],pData.Surface->iInternal[2],pData.Surface->iInternal[3]);
+        }
+        break;
+    case EWsWinOpKeyColor:
+        {
+        _LIT(LogWinKeyColor,"KeyColor()");
+        aText.AppendFormat(LogWinKeyColor);
+        }
+        break;          
+    case EWsWinOpSetBackgroundSurfaceConfig:
+        {        
+        TSurfaceConfiguration aSurfaceConfig = pData.SurfaceConfigurationAndTrigger->surfaceConfig;
+        TSurfaceId surfaceid;
+        aSurfaceConfig.GetSurfaceId(surfaceid);
+        CFbsBitGc::TGraphicsOrientation orientation = aSurfaceConfig.Orientation();
+        TRect extent;
+        aSurfaceConfig.GetExtent(extent);
+        TRect viewport;
+        aSurfaceConfig.GetViewport(viewport);
+        TBool flip = aSurfaceConfig.Flip();
+        TBool triggerRedraw = pData.SurfaceConfigurationAndTrigger->triggerRedraw;
+        
+        TLongBuf extentbuf(TDebugLogTextHandler::FormatRect(extent));
+        TLongBuf viewportbuf(TDebugLogTextHandler::FormatRect(viewport));
+        
+        _LIT(LogWinSetBackgroundSurfaceConfig,"SetBackgroundSurface({%x,%x,%x,%x},%d,%S,%S,%d,%d)");
+        aText.AppendFormat(LogWinSetBackgroundSurfaceConfig, surfaceid.iInternal[0],
+                                                             surfaceid.iInternal[1],
+                                                             surfaceid.iInternal[2],
+                                                             surfaceid.iInternal[3],
+                                                             orientation,
+                                                             &extentbuf, 
+                                                             &viewportbuf,
+                                                             flip,
+                                                             triggerRedraw);
+        }
+        break;
+    case EWsWinOpRemoveBackgroundSurface:
+        {
+        _LIT(LogWinRemoveBackgroundSurface,"RemoveBackgroundSurface(%d)");
+        aText.AppendFormat(LogWinRemoveBackgroundSurface, *(pData.Bool));
+        }
+        break;
+    case EWsWinOpGetBackgroundSurfaceConfig:
+        {
+        _LIT(LogWinGetBackgroundSurfaceConfig,"GetBackgroundSurface()");
+        aText.AppendFormat(LogWinGetBackgroundSurfaceConfig);
+        }
+        break;
+    case EWsWinOpClearRedrawStore:
+        {
+        _LIT(LogWinClearRedrawStore,"ClearRedrawStore()");
+        aText.AppendFormat(LogWinClearRedrawStore);
+        }
+        break;
 	default:
 		UnKnownOpcode(aText, aOpcode);
 		break;
@@ -1786,7 +1862,7 @@
 		{
 		TShortBuf buf1(TDebugLogTextHandler::FormatPoint(pData.GdiBltMasked->destination));
 		TLongBuf buf2(TDebugLogTextHandler::FormatRect(pData.GdiBltMasked->source));
-		_LIT(LogGcBitBltMasked,"BitBltMasked(%S, {%d}, %S)");
+		_LIT(LogGcBitBltMasked,"BitBltMasked(%S, {%d}, %S, {%d}, %d)");
 		aText.AppendFormat(LogGcBitBltMasked, &buf1, hHandleToValue(pData.GdiBltMasked->handle),
 										&buf2, hHandleToValue(pData.GdiBltMasked->maskHandle),
 										pData.GdiBltMasked->invertMask);
@@ -1859,7 +1935,7 @@
 	case EWsGcOpSetFaded:
 		{
 		_LIT(KLitGcSetFaded, "SetFaded(%d)");
-		aText.AppendFormat(KLitGcSetFaded, pData.Bool);
+		aText.AppendFormat(KLitGcSetFaded, *pData.Bool);
 		}
 		break;
 	case EWsGcOpSetFadeParams:
@@ -1884,7 +1960,7 @@
 	case EWsGcOpSetOpaque:
 		{
 		_LIT(KLitGcOpSetOpaque, "SetOpaque(%d)");
-		aText.AppendFormat(KLitGcOpSetOpaque, pData.Bool);
+		aText.AppendFormat(KLitGcOpSetOpaque, *pData.Bool);
 		}
 		break;
 	default:
@@ -2023,20 +2099,20 @@
 	case EWsSdOpSetScreenMode:
 		{
 		_LIT(LogScreenDeviceSetScreenMode,"ScreenMode(%d)");
-		aText.AppendFormat(LogScreenDeviceSetScreenMode,pData.Int);
+		aText.AppendFormat(LogScreenDeviceSetScreenMode,*pData.Int);
 		}
 		break;
 	case EWsSdOpGetScreenModeSizeAndRotation:
 	case EWsSdOpGetScreenModeSizeAndRotation2:
 		{
 		_LIT(LogScreenDeviceGetScreenModeSizeAndRotation,"GetScreenModeSizeAndRotation(%d)");
-		aText.AppendFormat(LogScreenDeviceGetScreenModeSizeAndRotation,pData.Int);
+		aText.AppendFormat(LogScreenDeviceGetScreenModeSizeAndRotation,*pData.Int);
 		}
 		break;
 	case EWsSdOpSetScreenModeEnforcement:
 		{
 		_LIT(LogScreenDeviceSetScreenModeEnforcement,"SetScreenModeEnforcement(%d)");
-		aText.AppendFormat(LogScreenDeviceSetScreenModeEnforcement,pData.Int);
+		aText.AppendFormat(LogScreenDeviceSetScreenModeEnforcement,*pData.Int);
 		}
 		break;
 	case EWsSdOpScreenModeEnforcement:
@@ -2054,7 +2130,7 @@
 	case EWsSdOpGetRotationList:
 		{
 		_LIT(LogScreenDeviceGetRotationList,"GetRotationList(%d)");
-		aText.AppendFormat(LogScreenDeviceGetRotationList,pData.Int);
+		aText.AppendFormat(LogScreenDeviceGetRotationList,*pData.Int);
 		}
 		break;
 	case EWsSdOpPaletteAttributes:
@@ -2090,13 +2166,13 @@
 	case EWsSdOpGetScreenModeOrigin:
 		{
 		_LIT(LogScreenDeviceGetScreenModeOrigin,"GetScreenModeOrigin(%d)");
-		aText.AppendFormat(LogScreenDeviceGetScreenModeOrigin, pData.Int);
+		aText.AppendFormat(LogScreenDeviceGetScreenModeOrigin, *pData.Int);
 		}	
 		break;
 	case EWsSdOpGetScreenModeScale:
 		{
 		_LIT(LogScreenDeviceGetScreenModeScale,"GetScreenModeScale(%d)");
-		aText.AppendFormat(LogScreenDeviceGetScreenModeScale, pData.Int);
+		aText.AppendFormat(LogScreenDeviceGetScreenModeScale, *pData.Int);
 		}	
 		break;
 	case EWsSdOpGetCurrentScreenModeScale:
@@ -2108,13 +2184,13 @@
 	case EWsSdOpSetAppScreenMode:
 		{
 		_LIT(LogScreenDeviceSetAppScreenMode,"SetAppScreenMode(%d)");
-		aText.AppendFormat(LogScreenDeviceSetAppScreenMode, pData.Int);
+		aText.AppendFormat(LogScreenDeviceSetAppScreenMode, *pData.Int);
 		}	
 		break;		
 	case EWsSdOpGetScreenModeScaledOrigin:
 		{
 		_LIT(LogScreenDeviceGetScreenModeScaledOrigin,"GetScreenModeScaledOrigin(%d)");
-		aText.AppendFormat(LogScreenDeviceGetScreenModeScaledOrigin, pData.Int);
+		aText.AppendFormat(LogScreenDeviceGetScreenModeScaledOrigin, *pData.Int);
 		}	
 		break;		
 	case EWsSdOpGetCurrentScreenModeScaledOrigin:
@@ -2151,13 +2227,13 @@
 	case EWsSdOpGetScreenModeDisplayMode:
 		{
 		_LIT(LogScreenDeviceGetScreenModeDisplayMode,"GetScreenModeDisplayMode(%d)");
-		aText.AppendFormat(LogScreenDeviceGetScreenModeDisplayMode, pData.Int);
+		aText.AppendFormat(LogScreenDeviceGetScreenModeDisplayMode, *pData.Int);
 		}	
 		break;		
 	case EWsClOpSetBackLight:
 		{
 		_LIT(LogScreenDeviceSetBackLight,"SetBackLight(%u)");
-		aText.AppendFormat(LogScreenDeviceSetBackLight, pData.UInt);
+		aText.AppendFormat(LogScreenDeviceSetBackLight, *pData.UInt);
 		}	
 		break;		
 	default:
@@ -2272,7 +2348,7 @@
 	case EWsDirectOpGetRegion:
 		{
 		_LIT(LogDirectGetRegion,"GetRegion(%d)");
-		aText.AppendFormat(LogDirectGetRegion,pData.Int);
+		aText.AppendFormat(LogDirectGetRegion,*pData.Int);
 		}
 		break;
 	case EWsDirectOpCancel:
@@ -2341,13 +2417,13 @@
 	case EWsClickOpSetKeyClick:
 		{			
 		_LIT(LogSetKeyClick,"SetKeyClick(%u)");
-		aText.AppendFormat(LogSetKeyClick, pData.Bool);
+		aText.AppendFormat(LogSetKeyClick, *pData.Bool);
 		}
 		break;
 	case EWsClickOpSetPenClick:
 		{			
 		_LIT(LogSetPenClick,"SetPenClick(%u)");
-		aText.AppendFormat(LogSetPenClick, pData.Bool);
+		aText.AppendFormat(LogSetPenClick, *pData.Bool);
 		}	
 		break;
 	case EWsClickOpKeyClickEnabled:
--- a/windowing/windowserver/debuglog/DebLogRD.CPP	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/debuglog/DebLogRD.CPP	Fri Mar 12 15:50:05 2010 +0200
@@ -55,7 +55,8 @@
 	buf.Copy(aDes.Mid(pos));
 	buf.Append(' ');
 	buf.Append(aDes2);
-	RDebug::Print(buf);
+	_LIT(KDebugFormatString, "%S");
+	RDebug::Print(KDebugFormatString, &buf);
 	}
 
 void CDebugLogPrint::WriteToLog8L(const TDesC8 &aDes, const TDesC8 &aDes2)
@@ -70,6 +71,7 @@
 	TPtr16 ptr(&buf[bufLen],buf.MaxLength()-bufLen);
 	ptr.Copy(aDes2);
 	buf.SetLength(bufLen+aDes2.Length());
-	RDebug::Print(buf);
+	_LIT(KDebugFormatString, "%S");
+	RDebug::Print(KDebugFormatString, &buf);
 	}
 
--- a/windowing/windowserver/group/DEBLOG.MMP	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/group/DEBLOG.MMP	Fri Mar 12 15:50:05 2010 +0200
@@ -24,6 +24,8 @@
 CAPABILITY PowerMgmt ReadDeviceData WriteDeviceData ProtServ
 TARGETTYPE		dll
 
+MACRO       SYMBIAN_GRAPHICS_GCE
+
 SOURCEPATH		../debuglog
 SOURCE			DEBUGLOG.CPP DECODER.CPP TXTHNDLR.CPP
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/windowing/windowserver/group/samplegraphicsurface.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -0,0 +1,46 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// samplegraphicsurface.dll Sample CWsGraphics demonstrating PlaceSurface
+// 
+//
+
+/**
+ @file
+*/
+
+TARGET			samplegraphicsurface.dll
+CAPABILITY		All -Tcb
+TARGETTYPE		dll
+
+MACRO			SYMBIAN_GRAPHICS_GCE
+
+UID 0x1000008D 0x10285C49
+VENDORID		0x70000001
+
+DEFFILE			samplegraphicsurface.DEF
+
+SOURCEPATH		../nga/samplegraphicsurfacedrawer
+
+
+USERINCLUDE      ../inc
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib
+LIBRARY			wsgraphicdrawer.lib 
+LIBRARY			fbscli.lib ws32.lib estor.lib
+UNPAGED
+
+SOURCE graphicsurface.cpp
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/windowing/windowserver/group/samplegraphicsurfacedrawer.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -0,0 +1,47 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// samplegraphicsurfacedrawer.DLL sample Surface-based Graphics ECOM plugins for Window Server
+// 
+//
+
+/**
+ @file
+*/
+
+TARGET		10285c4a.dll //samplegraphicsurfacedrawer.DLL
+TARGETTYPE	PLUGIN //ECOMIIC
+UID			0x10009D8D 0x10285C4A
+CAPABILITY	All -Tcb
+VENDORID	0x70000001
+
+MACRO		SYMBIAN_GRAPHICS_GCE
+
+#ifndef USERINCLUDE_WSGRAPHICDRAWERINTERFACE_H
+macro USERINCLUDE_WSGRAPHICDRAWERINTERFACE_H
+#endif
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY		ecom.lib estor.lib fbscli.lib euser.lib
+LIBRARY		wsgraphicdrawer.lib ws32.lib w32stdgraphic.lib
+
+UNPAGED
+
+SOURCEPATH	../nga/samplegraphicsurfacedrawer
+
+RESOURCE	10285C4A.RSS
+
+SOURCE proxy.cpp graphicsurfacedrawer.CPP
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/windowing/windowserver/group/samplegraphictestsurfacemulti.mmp	Fri Mar 12 15:50:05 2010 +0200
@@ -0,0 +1,46 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// samplegraphictestsurfacemulti.dll Sample test crp for surfaces
+// 
+//
+
+/**
+ @file
+*/
+
+TARGET			samplegraphictestsurfacemulti.dll
+CAPABILITY		All -Tcb
+TARGETTYPE		dll
+
+UID 0x1000008D 0x10285E99
+VENDORID		0x70000001
+
+MACRO			SYMBIAN_GRAPHICS_GCE
+
+DEFFILE			samplegraphictestsurfacemulti.DEF
+
+SOURCEPATH		../tgce/samplegraphictestsurfacemultidrawer
+
+USERINCLUDE     ../nga/samplegraphicsurfacedrawer ../inc
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			euser.lib
+LIBRARY			wsgraphicdrawer.lib 
+LIBRARY			samplegraphicsurface.lib
+LIBRARY			fbscli.lib ws32.lib estor.lib
+UNPAGED
+
+SOURCE graphictestsurfacemulti.cpp
+SMPSAFE
--- a/windowing/windowserver/inc/WSGRAPHICDRAWERARRAY.H	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/inc/WSGRAPHICDRAWERARRAY.H	Fri Mar 12 15:50:05 2010 +0200
@@ -29,7 +29,7 @@
 */	{
 public:
 	//Placeholder for transacion record
-	class XRollBackBase;
+	struct XRollBackBase;
 	
 	//transactional manipulation methods that are deprecated because they leak 
 	IMPORT_C void AddLC(CWsGraphicDrawer* aDrawer);
--- a/windowing/windowserver/nga/CLIENT/RSCRDEV.CPP	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/nga/CLIENT/RSCRDEV.CPP	Fri Mar 12 15:50:05 2010 +0200
@@ -254,6 +254,11 @@
 	TInt64 twips=aTwips;
 	TSize displaySizeInPixels = DisplaySizeInPixels();
 	TSize physicalScreenSizeInTwips = PhysicalScreenSizeInTwips();
+	if (displaySizeInPixels.iWidth <= 0 ||
+	        physicalScreenSizeInTwips.iWidth <= 0)
+	    {
+        return 0;
+	    }
 	twips=(twips*displaySizeInPixels.iWidth+(physicalScreenSizeInTwips.iWidth/2))/physicalScreenSizeInTwips.iWidth;
 	return I64INT(twips);
 	}
@@ -267,6 +272,11 @@
 	TInt64 twips=aTwips;
 	TSize displaySizeInPixels = DisplaySizeInPixels();
 	TSize physicalScreenSizeInTwips = PhysicalScreenSizeInTwips();
+   if (displaySizeInPixels.iHeight <= 0 ||
+            physicalScreenSizeInTwips.iHeight <= 0)
+        {
+        return 0;
+        }
 	twips=(twips*displaySizeInPixels.iHeight+(physicalScreenSizeInTwips.iHeight/2))/physicalScreenSizeInTwips.iHeight;
 	return I64INT(twips);
 	}
@@ -280,6 +290,11 @@
 	TInt64 pixels=aPixels;
 	TSize displaySizeInPixels = DisplaySizeInPixels();
 	TSize physicalScreenSizeInTwips = PhysicalScreenSizeInTwips();
+   if (displaySizeInPixels.iWidth <= 0 ||
+            physicalScreenSizeInTwips.iWidth <= 0)
+        {
+        return 0;
+        }
 	pixels=(pixels*physicalScreenSizeInTwips.iWidth+(displaySizeInPixels.iWidth/2))/displaySizeInPixels.iWidth;
 	return I64INT(pixels);
 	}
@@ -294,6 +309,11 @@
 	TInt64 pixels=aPixels;
 	TSize displaySizeInPixels = DisplaySizeInPixels();
 	TSize physicalScreenSizeInTwips = PhysicalScreenSizeInTwips();
+   if (displaySizeInPixels.iHeight <= 0 ||
+            physicalScreenSizeInTwips.iHeight <= 0)
+        {
+        return 0;
+        }
 	pixels=(pixels*physicalScreenSizeInTwips.iHeight+(displaySizeInPixels.iHeight/2))/displaySizeInPixels.iHeight;
 	return I64INT(pixels);
 	}
--- a/windowing/windowserver/nga/SERVER/POINTER.CPP	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/nga/SERVER/POINTER.CPP	Fri Mar 12 15:50:05 2010 +0200
@@ -54,6 +54,9 @@
 CCirBuf<TPoint>*   CWsPointerBuffer::iPointerBuffer=NULL;
 TSglQue<CWsPointerBuffer> CWsPointerBuffer::iList(_FOFF(CWsPointerBuffer,iQue));
 TInt                TWsPointer::iYOffset;
+#if defined(__WINS__)
+TBool               TWsPointer::iEmulatorRotatePointerCoords;
+#endif
 
 static _LIT_SECURITY_POLICY_C1(KSecurityPolicy_SwEvent,ECapabilitySwEvent);
 
@@ -70,7 +73,14 @@
        {
        iYOffset = 0;
        }
-	
+
+#if defined(__WINS__)    
+	//An emulator may or may not deploy a renderchain or displaydriver that supports rotated drawing.
+	//On a real device target the coordinate system is always rotated together with wserv's screendevice.
+	_LIT( KWSERVIniFileVarEmulatorRotPointCoords, "EMULATOR_ROTATE_POINTER_COORDS");
+	iEmulatorRotatePointerCoords = WsIniFile->FindVar(KWSERVIniFileVarEmulatorRotPointCoords);
+#endif
+
 	iRootWindow = CWsTop::Screen()->RootWindow();
 	
 	TMachineInfoV1Buf machineInfo;
@@ -679,23 +689,17 @@
 			}
 		else
 			{
-			CScreen* screen=iRootWindow->Screen();
 	#if !defined(__WINS__)
-			TSize screenSize=screen->SizeInPixels()-TSize(1,1);		//This is in the current rotation
-			switch (screen->Orientation())
+			TranslateCoordsOnRotation(xy);
+	#else
+			if(iEmulatorRotatePointerCoords)
 				{
-				case CFbsBitGc::EGraphicsOrientationRotated90:
-					xy.SetXY(xy.iY,screenSize.iHeight-xy.iX);
-					break;
-				case CFbsBitGc::EGraphicsOrientationRotated180:
-					xy=-(xy-screenSize);
-					break;
-				case CFbsBitGc::EGraphicsOrientationRotated270:
-					xy.SetXY(screenSize.iWidth-xy.iY,xy.iX);
-					break;
-				default:;		//To stop warning
+				//emulators that support rotated drawing and touch may want to enable 
+				//rotation of pointer events in wsini.
+				TranslateCoordsOnRotation(xy);
 				}
 	#endif
+			CScreen* screen=iRootWindow->Screen();
 			ShiftYCoordinate(xy.iY);
 			// Move the raw event position by shifting it by Origin and scale
 			xy=screen->PhysicalToLogical(xy);
@@ -707,6 +711,25 @@
 	return ETrue;
 	}
 
+void TWsPointer::TranslateCoordsOnRotation(TPoint& aPoint)
+	{
+	CScreen* screen=iRootWindow->Screen();
+	TSize screenSize=screen->SizeInPixels()-TSize(1,1);     //This is in the current rotation
+	switch (screen->Orientation())
+		{
+		case CFbsBitGc::EGraphicsOrientationRotated90:
+			aPoint.SetXY(aPoint.iY,screenSize.iHeight-aPoint.iX);
+			break;
+		case CFbsBitGc::EGraphicsOrientationRotated180:
+			aPoint=-(aPoint-screenSize);
+			break;
+		case CFbsBitGc::EGraphicsOrientationRotated270:
+			aPoint.SetXY(screenSize.iWidth-aPoint.iY,aPoint.iX);
+			break;
+		default:;       //To stop warning
+		}
+	}
+
 /**
  * Validates events sent to the Window Server by its Client (Anim or Window Group).
  * May overwrite aRawEvent's Z coordinate and/or pointer number if Client or digitizer driver
--- a/windowing/windowserver/nga/SERVER/pointer.h	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/nga/SERVER/pointer.h	Fri Mar 12 15:50:05 2010 +0200
@@ -66,6 +66,7 @@
 #else
 	static TBool PreProcessDriverEvent(TRawEvent &aRawEvent);
 #endif
+	static void TranslateCoordsOnRotation(TPoint& aPoint);
 	static TBool PreProcessClientEvent(TRawEvent &aRawEvent, TBool aAdvancedPointersEnabled);
 	static TBool IsPointerEventType(TRawEvent::TType aType);
 	static void ProcessWsEvent(TWsEvent& aEvent,const CWsWindowGroup* aForceInGroup,TBool aNatural);	
@@ -229,6 +230,11 @@
 	
 	/** Used to offset the y pointer */
 	static TInt iYOffset;
+	
+#if defined(__WINS__)
+	/** Tell whether to rotate pointer coords in _WINS_ builds */
+	static TBool iEmulatorRotatePointerCoords;
+#endif
 	};
 
 class CWsPointerBuffer : public CBase
--- a/windowing/windowserver/nga/SERVER/renderstagemanager.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/nga/SERVER/renderstagemanager.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -78,7 +78,9 @@
 
 	if (!pluginMgr)
 		{
+#if _DEBUG
 		RDebug::Printf("ConstructRenderStageChain: Failed to obtain Plugin Manager at File: %s, Line: %d\n", __FILE__, __LINE__);
+#endif
 		return NULL;
 		}
 
@@ -103,7 +105,9 @@
 					TRAP(err, stage = factory->CreateFinalRenderStageL(aScreen, aScreenRedraw, aScreenNumber));
 					if (err)
 						{
+#if _DEBUG
 						RDebug::Printf("ConstructRenderStageChain: Create final renderstage error at File: %s, Line: %d Error Code: %d\n", __FILE__, __LINE__, err);
+#endif
 						}
 					}
 				else
@@ -112,7 +116,9 @@
 					TRAP(err, stage = factory->CreateRenderStageL(aScreen, aScreenRedraw, savedStage));
 					if (err)
 						{
+#if _DEBUG
 						RDebug::Printf("ConstructRenderStageChain: Create renderstage error at File: %s, Line: %d Error Code: %d\n", __FILE__, __LINE__, err);
+#endif
 						}
 					}
 				
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_changetracking.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_h6.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_naviengine.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga_changetracking.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_vga.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_vga_changetracking.ini has changed
--- a/windowing/windowserver/wins_switching/remotegcswitch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/wins_switching/remotegcswitch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -39,11 +39,16 @@
 
 FARPROC vector[MAX_ORDINAL+1];
 
-
+#ifdef _DEBUG
 void Stop(char* aErrorMessage)
+#else
+void Stop(char* /*aErrorMessage*/)
+#endif
 	{
 	int err = GetLastError();
+#if _DEBUG
 	RDebug::Printf("%S, (last error = %i)", aErrorMessage, err);
+#endif
 	_asm int 3;
 	}
 
@@ -77,8 +82,10 @@
 	UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalBoolProperty,  (TAny*)"symbian_graphics_use_gce",  &nga);
 	const char* library = nga ? "remotegc_nga.dll" : "remotegc_nonnga.dll";
 
+#ifdef _DEBUG
 	RDebug::Printf("Redirecting remotegc.dll to \"%s\" ...\n", library);
-	
+#endif
+  	
 	Emulator::Escape();		// prevent deadlock between EKA2 scheduler and MS kernel
 	// try to load selected DLL
 	HINSTANCE instance = LoadLibraryA(library);
@@ -91,7 +98,9 @@
 	else
 		{
 		fill_vector(instance);
+#ifdef _DEBUG
 		RDebug::Printf("... DLL loaded successfully");
+#endif
 		}
 	}
 
--- a/windowing/windowserver/wins_switching/ws32switch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/wins_switching/ws32switch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -39,11 +39,16 @@
 
 FARPROC vector[MAX_ORDINAL+1];
 
-
+#ifdef _DEBUG
 void Stop(char* aErrorMessage)
+#else
+void Stop(char* /*aErrorMessage*/)
+#endif
 	{
 	int err = GetLastError();
+#ifdef _DEBUG
 	RDebug::Printf("%S, (last error = %i)", aErrorMessage, err);
+#endif
 	_asm int 3;
 	}
 
@@ -76,9 +81,9 @@
 	TBool nga = EFalse;
 	UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalBoolProperty,  (TAny*)"symbian_graphics_use_gce",  &nga);
 	const char* library = nga ? "ws32_nga.dll" : "ws32_nonnga.dll";
-
+#ifdef _DEBUG
 	RDebug::Printf("Redirecting ws32.dll to \"%s\" ...\n", library);
-	
+#endif
 	Emulator::Escape();		// prevent deadlock between EKA2 scheduler and MS kernel
 	// try to load selected DLL
 	HINSTANCE instance = LoadLibraryA(library);
@@ -91,7 +96,9 @@
 	else
 		{
 		fill_vector(instance);
+#ifdef _debug
 		RDebug::Printf("... DLL loaded successfully");
+#endif
 		}
 	}
 
--- a/windowing/windowserver/wins_switching/wservswitch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/wins_switching/wservswitch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -52,7 +52,11 @@
 
 	// try to launch it
 	const TPtrC exeName = nga ?  KWservSwitchNga() : KWservSwitchNonNga();
+
+#ifdef _DEBUG
 	RDebug::Print(_L("%S: Starting \"%S\" \"%S\""), &KProcessName, &exeName, &argPtr);
+#endif
+
 	RProcess server;
 	TInt err = server.Create(exeName, argPtr, EOwnerThread);
 	delete arg;
@@ -63,7 +67,9 @@
 		}
 
 	// wait for server to start
+#ifdef _DEBUG
 	RDebug::Print(_L("%S: waiting on process ..."), &KProcessName);
+#endif
 	TRequestStatus stat;
 	server.Rendezvous(stat);
 
@@ -87,7 +93,9 @@
 	// propagate error to SysStart
 	if (error)
 		{
+#ifdef _DEBUG
 		RDebug::Print(_L("%S: Failed with error %i"), &KProcessName, error);
+#endif
 		}
 	RProcess::Rendezvous(error);
 	return error;
--- a/windowing/windowserver/wins_switching/wsgraphicdrawerswitch.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserver/wins_switching/wsgraphicdrawerswitch.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -40,10 +40,16 @@
 FARPROC vector[MAX_ORDINAL+1];
 
 
+#ifdef _DEBUG
 void Stop(char* aErrorMessage)
+#else
+void Stop(char* /*aErrorMessage*/)
+#endif
 	{
 	int err = GetLastError();
+#ifdef _DEBUG
 	RDebug::Printf("%S, (last error = %i)", aErrorMessage, err);
+#endif
 	_asm int 3;
 	}
 
@@ -77,7 +83,9 @@
 	UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalBoolProperty,  (TAny*)"symbian_graphics_use_gce",  &nga);
 	const char* library = nga ? "wsgraphicdrawer_nga.dll" : "wsgraphicdrawer_nonnga.dll";
 
+#ifdef _DEBUG
 	RDebug::Printf("Redirecting wsgraphicdrawer.dll to \"%s\" ...\n", library);
+#endif
 	
 	Emulator::Escape();		// prevent deadlock between EKA2 scheduler and MS kernel
 	// try to load selected DLL
@@ -91,7 +99,9 @@
 	else
 		{
 		fill_vector(instance);
+#ifdef _DEBUG
 		RDebug::Printf("... DLL loaded successfully");
+#endif
 		}
 	}
 
--- a/windowing/windowserverplugins/openwfc/src/openwfcwrapper.cpp	Sat Feb 20 00:07:50 2010 +0200
+++ b/windowing/windowserverplugins/openwfc/src/openwfcwrapper.cpp	Fri Mar 12 15:50:05 2010 +0200
@@ -138,8 +138,10 @@
 
 void COpenWfcWrapper::ConstructL(TInt aScreenId)
 	{
+#ifdef _DEBUG
     _LIT(KOpenWfcLog, "+ COpenWfcWrapper::ConstructL");
     RDebug::Print(KOpenWfcLog);
+#endif
 
     iScreenNumber = aScreenId;
     WFCint filterList[] = { WFC_DEVICE_FILTER_SCREEN_NUMBER, iScreenNumber, WFC_NONE};