Merge latest MCL drop into NewGraphicsArchitecture branch NewGraphicsArchitecture
authorWilliam Roberts <williamr@symbian.org>
Sat, 27 Feb 2010 19:09:35 +0000
branchNewGraphicsArchitecture
changeset 12 1b9c98a0cb83
parent 8 6c0e9409e175 (current diff)
parent 11 fed1595b188e (diff)
child 13 1cb83e7796ad
Merge latest MCL drop into NewGraphicsArchitecture branch
--- a/fbs/fontandbitmapserver/sfbs/BMPUTIL.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/fbs/fontandbitmapserver/sfbs/BMPUTIL.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -34,7 +34,9 @@
 #define iPIXEL_ADDRESS      UINT2PTR(PTR2UINT(iWordPos)+iPixelShift)
 
 
-/** Constructs a TBitmapUtil object for the specified bitmap.
+/** Constructs a TBitmapUtil object for the specified bitmap. 
+
+@note The use of extended or compressed bitmaps is not supported by TBitmapUtil.
 
 @param aBitmap The bitmap on which this TBitmapUtil will operate. */
 EXPORT_C TBitmapUtil::TBitmapUtil(CFbsBitmap* aBitmap):
@@ -61,7 +63,10 @@
 							//      scanlines are always multiples of 12 bytes.
 	iScanlineWordLength(0), // Number of 4-byte words in bitmap scan line
 	iWritten(EFalse)
-	{}
+	{
+	ASSERT(iFbsBitmap);
+	__ASSERT_DEBUG(iFbsBitmap->Header().iCompression == ENoBitmapCompression, Panic(EFbsPanicInvalidBitmapType));
+	}
 
 /** Sets the current pixel position to the specified position and prepares
 the bitmap for access to its pixel data.
@@ -76,7 +81,6 @@
 set. */
 EXPORT_C void TBitmapUtil::Begin(const TPoint& aPosition)
 	{
-	ASSERT(iFbsBitmap);
 	iFbsBitmap->BeginDataAccess();
 	TSize bmpsize(iFbsBitmap->SizeInPixels());
 	ASSERT(bmpsize.iWidth > 0 && bmpsize.iHeight > 0);
--- a/fbs/fontandbitmapserver/sfbs/UTILS.H	Wed Feb 10 20:59:36 2010 +0000
+++ b/fbs/fontandbitmapserver/sfbs/UTILS.H	Sat Feb 27 19:09:35 2010 +0000
@@ -70,7 +70,8 @@
 	EFbsInvalidCompressionThreshold,
 	EFbsTypefaceIndexOutOfRange,
 	EFbsPanicBitmapDataCopy,
-	EFbsPanicBitmapReadOnly
+	EFbsPanicBitmapReadOnly,
+	EFbsPanicInvalidBitmapType
 	};
 
 class TScanLine
--- a/fbs/fontandbitmapserver/tfbs/TBITMAP.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/fbs/fontandbitmapserver/tfbs/TBITMAP.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -436,6 +436,12 @@
 		TestBitmapWhiteFillL();
 		break;
 	case 46:
+#ifdef _DEBUG
+	    ((CTBitmapStep*)iStep)->SetTestStepID(_L("GRAPHICS-FBSERV-0661"));
+	    TestBitmapUtilWithUnsupportedBitmaps();
+#endif
+        break;
+	case 47:
 		((CTBitmapStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
 		((CTBitmapStep*)iStep)->CloseTMSGraphicsStep();
 		TestComplete();
@@ -5655,6 +5661,120 @@
 	CleanupStack::PopAndDestroy(bmp);
 	}
 
+#ifdef _DEBUG
+/*
+ * Creates an extended bitmap and it tries to use it with TBitmapUtil, which should cause a panic
+ */
+LOCAL_C void DoBitmapUtilWithExtendedBitmapThreadL()
+    {  
+    const TUint8 KTestData[]        = "Extended bitmap test data 123456";
+    const TInt KTestDataSize        = sizeof(KTestData);
+    const TSize KSizeInPixels       = TSize(50,50);
+    const TDisplayMode KDisplayMode = EColor64K;
+
+    CFbsBitmap* bmp = new(ELeave)CFbsBitmap;
+    CleanupStack::PushL(bmp);
+     
+    const TUid KUidTestExtendedBitmap   = TUid::Uid(0xFFFFFFFF);
+    User::LeaveIfError(bmp->CreateExtendedBitmap(KSizeInPixels, KDisplayMode, KUidTestExtendedBitmap, KTestData, KTestDataSize));
+     
+    TBitmapUtil util(bmp); // this will cause a panic
+     
+    CleanupStack::PopAndDestroy(bmp);
+    }
+
+/*
+ * Creates a compressed bitmap and it tries to use it with TBitmapUtil, which should cause a panic
+ */
+LOCAL_C void DoBitmapUtilWithCompressedBitmapThreadL()
+    {
+    CFbsBitmap*  bmp = new (ELeave) CFbsBitmap;
+    CleanupStack::PushL(bmp);
+    bmp->Load(KRamBitmap);
+    User::LeaveIfError(bmp->Compress());
+    if(!bmp->IsCompressedInRAM())
+        {
+        User::Leave(KErrArgument);
+        }
+     
+    TBitmapUtil util(bmp); // this will cause a panic
+     
+    CleanupStack::PopAndDestroy(bmp);
+    }
+
+typedef void (*TFunctionPtr)();
+
+LOCAL_C TInt BitmapUtilWithUnsupportedBitmapThreadFunc(TAny* aFunctionPtr)
+    {
+    TInt ret = RFbsSession::Connect();
+    if(ret != KErrNone)
+        {
+        return ret;
+        }
+    
+    CTrapCleanup* trap = CTrapCleanup::New();
+    if (!trap)
+         {
+         RFbsSession::Disconnect();
+         return KErrNoMemory;
+         }
+    
+    TRAP(ret, ((TFunctionPtr)aFunctionPtr)()); // this function can leave
+    
+    delete trap;
+    RFbsSession::Disconnect();
+    
+    return ret;
+    }
+/*
+ * Creates a thread, and the test scenario for GRAPHICS-FBSERV-0661 is run in aThreadFunction, which 
+ * causes a panic. Checks if the thread has been terminated with panic with correct category and panic code.
+ */
+void CTBitmap::TestBitmapUtilWithUnsupportedBitmap(const TDesC& aThreadName, TAny* aFunctionPtr)
+    {
+    RThread thread;
+    TInt ret = thread.Create(aThreadName, BitmapUtilWithUnsupportedBitmapThreadFunc, KDefaultStackSize, 0x2000, 0x2000, aFunctionPtr);
+    TEST(ret == KErrNone);
+    TRequestStatus status;
+    thread.Logon(status);
+    thread.Resume();
+    User::WaitForRequest(status);
+    TExitType exitType = thread.ExitType();
+    TExitCategoryName exitCategory = thread.ExitCategory();
+    TInt exitReason = thread.ExitReason();
+    TEST(exitType == EExitPanic);
+    TEST(exitCategory == KFBSERVClientPanicCategory);
+    TEST(exitReason == EFbsPanicInvalidBitmapType);
+    thread.Close();   
+    }
+
+/**
+@SYMTestCaseID          GRAPHICS-FBSERV-0661
+
+@SYMTestCaseDesc        Test the use of TBitmapUtil with extended and compressed bitmaps. 
+                        NOTE: this is a debug only test.
+
+@SYMTestStatus          Implemented
+
+@SYMTestPriority        High
+
+@SYMTestActions         Create extended bitmap, and TBitmapUtil to process it. 
+                        Create bitmap and compress it,and TBitmapUtil to process it. 
+
+@SYMTestExpectedResults Panic FBSCLI 29
+*/
+void CTBitmap::TestBitmapUtilWithUnsupportedBitmaps()
+    {
+    INFO_PRINTF1(_L("Test TBitmapUtil with unsupported bitmaps"));
+    
+    // extended bitmap
+    TestBitmapUtilWithUnsupportedBitmap(_L("BitmapUtilWithExtentedBitmapThread"), (TAny*)&DoBitmapUtilWithExtendedBitmapThreadL);
+    
+    // compressed bitmap
+    TestBitmapUtilWithUnsupportedBitmap(_L("BitmapUtilWithCompressedBitmapThread"), (TAny*)&DoBitmapUtilWithCompressedBitmapThreadL);  
+    }
+#endif //_DEBUG
+
 //--------------
 __CONSTRUCT_STEP__(Bitmap)
 
--- a/fbs/fontandbitmapserver/tfbs/TBitmap.h	Wed Feb 10 20:59:36 2010 +0000
+++ b/fbs/fontandbitmapserver/tfbs/TBitmap.h	Sat Feb 27 19:09:35 2010 +0000
@@ -23,6 +23,7 @@
 #include "TGraphicsHarness.h"
 #include "../sfbs/fbsbitmapasyncstreamer.h"
 
+
 //The main test class. Add your test methods here.
 class CTBitmap : public CTGraphicsBase
 	{
@@ -91,6 +92,10 @@
 	void TestDisconnectWithBitmapL();
 	void TestTouchedAndVolatileL();
 	void TestBitmapWhiteFillL();
+#ifdef _DEBUG
+	void TestBitmapUtilWithUnsupportedBitmap(const TDesC& aThreadName, TAny* aFunctionPtr);
+	void TestBitmapUtilWithUnsupportedBitmaps();
+#endif
 private:
 	void DoStreamBitmapSizes(TDisplayMode aDispMode);
 	void DoStreamBitmap(const TSize& aSize,TDisplayMode aDispMode,TBool aBlank);
--- a/graphicscomposition/openwfcompositionengine/group/openwfc.mmp	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicscomposition/openwfcompositionengine/group/openwfc.mmp	Sat Feb 27 19:09:35 2010 +0000
@@ -44,20 +44,20 @@
 MACRO		HG_NO_ALLOCA_H
 MACRO		EGL_DLL
 
-USERINCLUDE		..\composition\include
-USERINCLUDE		..\common\include
-USERINCLUDE		..\adaptation\include
+USERINCLUDE		../composition/include
+USERINCLUDE		../common/include
+USERINCLUDE		../adaptation/include
 
-LIBRARY			libegl.lib
+LIBRARY			libEGL.lib
 LIBRARY			euser.lib
 LIBRARY			libc.lib
 LIBRARY			libpthread.lib
 LIBRARY			libm.lib
 LIBRARY			hal.lib
-LIBRARY			WFCinterop.lib
+LIBRARY			wfcinterop.lib
 LIBRARY			surfacemanager.lib
 
-SOURCEPATH	..\composition\src
+SOURCEPATH	../composition/src
 SOURCE			wfcapi.c 
 SOURCE			wfccontext.c
 SOURCE			wfcdevice.c
@@ -66,7 +66,7 @@
 SOURCE			wfcscene.c
 SOURCE			wfcpipeline.c
 
-SOURCEPATH	..\common\src
+SOURCEPATH	../common/src
 SOURCE			owfarray.c
 SOURCE			owfattributes.c
 SOURCE			owfdebug.c
@@ -77,7 +77,7 @@
 SOURCE			owfpool.c
 SOURCE			owfutils.c
 
-SOURCEPATH	..\adaptation\src\Platform\OS\symbian
+SOURCEPATH	../adaptation/src/Platform/OS/symbian
 SOURCE			owfconsole.cpp
 SOURCE			owfmessagequeue.c
 SOURCE			owfmutex.c
@@ -85,7 +85,7 @@
 SOURCE			owfthread.c
 SOURCE			owfextensions.cpp
 
-SOURCEPATH ..\adaptation\src\Platform\Graphics\symbian
+SOURCEPATH ../adaptation/src/Platform/Graphics/symbian
 SOURCE			owfdisplaycontext.cpp
 SOURCE 			owfscreen_displaychannel.cpp
 SOURCE 			owfnativestreamstub.cpp
--- a/graphicscomposition/openwfsupport/group/openwfc_interop.mmp	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicscomposition/openwfsupport/group/openwfc_interop.mmp	Sat Feb 27 19:09:35 2010 +0000
@@ -14,7 +14,7 @@
 // OpenWFC adaptation features specific to the Symbian architecture.
 //
 
-TARGET			WFCinterop.dll
+TARGET			wfcinterop.dll
 TARGETTYPE		dll
 CAPABILITY 		PowerMgmt ReadDeviceData WriteDeviceData ProtServ
 UID				0x1000008d 0x10286FC5
--- a/graphicscomposition/openwfsupport/group/openwfc_support.iby	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicscomposition/openwfsupport/group/openwfc_support.iby	Sat Feb 27 19:09:35 2010 +0000
@@ -17,7 +17,7 @@
 #define __OPENWFC_SUPPORT_IBY__
 
 REM openwfc_interop
-file=ABI_DIR\BUILD_DIR\WFCinterop.dll 		\sys\bin\WFCinterop.dll
+file=ABI_DIR\BUILD_DIR\wfcinterop.dll 		\sys\bin\wfcinterop.dll
 
 
 #endif
--- a/graphicscomposition/openwfsupport/test/group/tstreamoperation.mmp	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicscomposition/openwfsupport/test/group/tstreamoperation.mmp	Sat Feb 27 19:09:35 2010 +0000
@@ -37,7 +37,7 @@
 LIBRARY		testexecuteutils.lib
 LIBRARY		testexecutelogclient.lib
 LIBRARY		rfileloggerclient.lib
-LIBRARY		WFCinterop.lib
+LIBRARY		wfcinterop.lib
 LIBRARY		surfacemanager.lib
 LIBRARY		surfaceupdateclient.lib
 LIBRARY		gdi.lib
--- a/graphicshwdrivers/surfacemgr/group/bld.inf	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicshwdrivers/surfacemgr/group/bld.inf	Sat Feb 27 19:09:35 2010 +0000
@@ -27,6 +27,7 @@
 surfacemanager.iby			/epoc32/rom/include/surfacemanager.iby
 surfacemanager_ref.iby		/epoc32/rom/include/surfacemanager_ref.iby
 ../inc/surfacemanager.h 	SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(graphics/surfacemanager.h)
+../inc/surface_hints.h 	SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(graphics/surface_hints.h)
 
 PRJ_MMPFILES
 surfacemanagerdriver.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graphicshwdrivers/surfacemgr/inc/surface_hints.h	Sat Feb 27 19:09:35 2010 +0000
@@ -0,0 +1,193 @@
+// Copyright (c) 2007-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:
+// Surface Manager API
+//
+
+#ifndef __SURFACE_HINTS_H__
+#define __SURFACE_HINTS_H__
+
+//- Include Files  ----------------------------------------------------------
+
+#include <e32cmn.h>
+
+
+//- Namespace ---------------------------------------------------------------
+
+namespace surfaceHints
+{
+
+//- Constants ---------------------------------------------------------------
+
+/** Hint of the surface content.
+    @see TSurfaceContent for possible values
+*/
+const TInt KSurfaceContent = 0x1;
+
+/** Hint of the expected update rate of the surface content.
+    Value for a surface containing e.g. 25 fps video the value should be 25.
+    For a static UI element the value should be 0.
+    @see TSurfaceUpdate
+*/
+const TInt KSurfaceUpdate = 0x2;
+
+/** Hint whether the surface content is copy protected and can it be
+    shown on external displays.
+    @see TSurfaceProtection for possible values.
+*/
+const TInt KSurfaceProtection = 0x3;
+
+
+/** Values used for the KSurfaceContent key */
+enum TSurfaceContent
+    {
+    /** No specific use-case */
+    EGeneric,
+    /** Camera viewfinder frames */
+    EViewFinder,
+    /** Images captured by camera */
+    EStillImage,
+    /** Decoded video frames */
+    EVideoPlayback,
+    /** Video frames from video telephony */
+    EVideoTelephony,
+    /** EGL surface */
+    EGfx,
+    /** Main UI surface */
+    EUi,
+    /** Composition target surface */
+    ECompositionTarget,
+    /** Indicates that the surface has to accessible by ARM.
+        This can be orr'ed with other TSurfaceContent enumerations. */
+    EArmAccess = 0x80000000
+    };
+
+
+/** Values used for the KSurfaceProtection key. The values are bitmasks and can be combined
+* e.g. EAllowAnalogProtectionRequired | EAllowDigitalProtectionRequired.
+*/
+enum TSurfaceProtection
+    {
+    /**
+    * Not allowed on external outputs
+    */
+    EAllowInternalOnly                  = 0x00000000,
+
+    /**
+    * Allowed on all external outputs
+    */
+    EAllowAllExternals                  = 0xFFFFFFFF,
+
+    /**
+    * Allow passing content over analog outputs,
+    * e.g. composite and S-video
+    */
+    EAllowAnalog                        = 0x00000010,
+
+    /**
+    * Allow output over an analog output channel which has a protection
+    * mechanism
+    */
+    EAllowAnalogProtectionRequired      = 0x00000020,
+
+    /**
+    * Allow passing content over digital outputs,
+    * e.g. DVI and HDMI
+    */
+    EAllowDigital                       = 0x00000200,
+
+    /**
+    * Licensed product must attempt to engage HDCP to protect the content.
+    * However it should be passed through to HDMI even if HDCP is not engaged or fails to engage.
+    */
+    EAllowDigitalProtectionRequested    = 0x00000400,
+
+    /**
+    * Licensed product is required to engage HDCP to protect the content.
+    * If HDCP is not engaged or can not be engaged the content must not be passed through to HDMI.
+    */
+    EAllowDigitalProtectionRequired     = 0x00000800,
+    };
+
+
+class TSurfaceUpdate
+    {
+    /** Constructor.
+        @param aUpdateRate   How often the surface content is redrawn per second.
+        @param aTearingFree  When ETrue surface updates should be synchronized
+                             with display refresh rate, otherwise surface can
+                             be updated as fast as possible.
+    */
+    inline TSurfaceUpdate(TUint aUpdateRate, TBool aTearingFree);
+
+    /** Converts a value to TSurfaceUpdate */
+    inline TSurfaceUpdate(TInt aValue);
+
+    /** Converts TSurfaceUpdate to a signed integer, so it can be used as
+        a value for KSurfaceUpdate key. */
+    inline operator TInt() const;
+
+    /** Getter for surface update rate.
+        @return updates per second
+    */
+    inline TUint UpdateRate() const;
+
+    /** Getter for surface update synchronization.
+        @return ETrue - updates should be synchronized with display refresh rate,
+                EFalse - surface can be updated as fast as possible.
+    */
+    inline TBool TearingFree() const;
+
+    private:
+        TUint iValue;
+    };
+
+
+//- Forward Declarations ----------------------------------------------------
+
+
+//- Class Definitions -------------------------------------------------------
+
+
+//- Inline Functions --------------------------------------------------------
+
+TSurfaceUpdate::TSurfaceUpdate(TUint aUpdateRate, TBool aTearingFree)
+    : iValue( ( aUpdateRate & 0xFFFF ) | ( aTearingFree ? 0x80000000 : 0x0 ) )
+    {
+    }
+TSurfaceUpdate::TSurfaceUpdate(TInt aValue)
+    : iValue( static_cast<TUint>( aValue ) )
+    {
+    }
+
+TSurfaceUpdate::operator TInt() const
+    {
+    return static_cast<TInt>( iValue );
+    }
+
+TUint TSurfaceUpdate::UpdateRate() const
+    {
+    return ( iValue & 0xFFFF );
+    }
+
+TBool TSurfaceUpdate::TearingFree() const
+    {
+    return ( iValue & 0x80000000 ) ? ETrue : EFalse;
+    }
+
+}; //namespace surfaceHints
+
+#endif //__SURFACE_HINTS_H__
+
+// End of File
+
--- a/graphicstest/graphicstestharness/automation/h6/roms.txt	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicstest/graphicstestharness/automation/h6/roms.txt	Sat Feb 27 19:09:35 2010 +0000
@@ -12,7 +12,7 @@
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby internaltestfonts.iby te_outlineshadow.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_graphics5b_armv5_dpdef','Graphics Test ROM (5b) - UIBench - Outline Shadow DP Default','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_05b.txt','')
 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\wstest\wsini-h6gcedsa.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_h6.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 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 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','')
 RomAndAutoRom('armv5','34xx_sdp pagedrom techview platsec graphics_testharness.iby t_wservgenericplugin.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_graphics13_armv5_dpdef','Graphics Test ROM (13) - Generic Plugin DP Default','\epoc32\data\z\wstest\genericplugin\wsini_nga.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h6\tests_13.txt','')
--- a/graphicstest/graphicstestharness/batch/unminigui.cmd	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicstest/graphicstestharness/batch/unminigui.cmd	Sat Feb 27 19:09:35 2010 +0000
@@ -44,7 +44,7 @@
 	)
 )
 echo Restore testexecute.ini
-if EXIST %TESTEXECUTE_INI%.mgbak(
+if EXIST %TESTEXECUTE_INI%.mgbak (
 	del /f %TESTEXECUTE_INI%
 	copy %TESTEXECUTE_INI%.mgbak %TESTEXECUTE_INI%
 	del /f %TESTEXECUTE_INI%.mgbak
--- a/graphicstest/graphicstestharness/src/graphicsmemoryhogger.cpp	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicstest/graphicstestharness/src/graphicsmemoryhogger.cpp	Sat Feb 27 19:09:35 2010 +0000
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 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"
@@ -25,6 +25,7 @@
 #include <s32file.h>
 #include <bautils.h>
 #include <hal.h>
+#include <e32hal.h>
 #include "graphicsmemoryhogger.h"
 
 _LIT(KTGraphicsMemoryHoggerPanic, "TGfxMemHog");
--- a/graphicstest/uibench/group/bld.inf	Wed Feb 10 20:59:36 2010 +0000
+++ b/graphicstest/uibench/group/bld.inf	Sat Feb 27 19:09:35 2010 +0000
@@ -14,7 +14,7 @@
 //
 
 // also include the s60 tests
-#include "..\s60\group\bld.inf"
+#include "../s60/group/bld.inf"
 
 
 PRJ_EXPORTS
--- a/m3g/m3gcore11/BWINS/m3gcoreU.DEF	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/BWINS/m3gcoreU.DEF	Sat Feb 27 19:09:35 2010 +0000
@@ -341,4 +341,5 @@
 	m3gSetUserData @ 340 NONAME
 	m3gSetAlphaWrite @ 341 NONAME
 	m3gGetAlphaWrite @ 342 NONAME
+	m3gInvalidateMemoryTarget @ 343 NONAME
 
--- a/m3g/m3gcore11/EABI/m3gcoreU.DEF	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/EABI/m3gcoreU.DEF	Sat Feb 27 19:09:35 2010 +0000
@@ -341,4 +341,5 @@
 	m3gSetUserData @ 340 NONAME
 	m3gSetAlphaWrite @ 341 NONAME
 	m3gGetAlphaWrite @ 342 NONAME
+	m3gInvalidateMemoryTarget @ 343 NONAME
 
--- a/m3g/m3gcore11/group/m3g.mmp	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/group/m3g.mmp	Sat Feb 27 19:09:35 2010 +0000
@@ -62,10 +62,10 @@
 // layer specific include directories
 OS_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE   /EPOC32/INCLUDE/LIBC
+SYSTEMINCLUDE   /epoc32/include/libc
 SYSTEMINCLUDE   ../../../inc
 SYSTEMINCLUDE   ../../inc
 
 LIBRARY         euser.lib estlib.lib fbscli.lib
 LIBRARY         efsrv.lib ws32.lib
-LIBRARY         libgles_cm.lib ezlib.lib
+LIBRARY         libGLESv1_CM.lib ezlib.lib libEGL.lib
--- a/m3g/m3gcore11/inc/m3g_gl.h	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/inc/m3g_gl.h	Sat Feb 27 19:09:35 2010 +0000
@@ -29,7 +29,7 @@
 
 #if !(defined(M3G_NGL_CONTEXT_API) || defined(M3G_NGL_TEXTURE_API))
 #   include <GLES/gl.h>
-#   include <GLES/egl.h>
+#   include <EGL/egl.h>
 #else
 
 /*@notfunction@*/
@@ -93,7 +93,7 @@
     
 M3Gbool m3gglGetNativeBitmapParams(M3GNativeBitmap bitmap,
                                    M3GPixelFormat *format,
-                                   M3Gint *width, M3Gint *height);
+                                   M3Gint *width, M3Gint *height, M3Gint *pixels);
 M3Gbool m3gglGetNativeWindowParams(M3GNativeWindow wnd,
                                    M3GPixelFormat *format,
                                    M3Gint *width, M3Gint *height);
--- a/m3g/m3gcore11/src/m3g_image.c	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/src/m3g_image.c	Sat Feb 27 19:09:35 2010 +0000
@@ -807,6 +807,7 @@
         return 3;
     case M3G_RGBA8:
     case M3G_BGRA8:
+    case M3G_ARGB8:
     case M3G_BGR8_32:
     case M3G_RGB8_32:
         return 4;
@@ -841,8 +842,14 @@
 
     while (count > 0) {
         M3Gsizei n = (count < SPAN_BUFFER_SIZE) ? count : SPAN_BUFFER_SIZE;
-        convertToARGB(srcFormat, src, n, temp);
-        convertFromARGB(temp, n, dstFormat, dst);
+        if (srcFormat == M3G_ARGB8 && dstFormat != M3G_ARGB8) {
+            convertFromARGB((M3Guint*)src, n, dstFormat, dst);
+        } else if (srcFormat != M3G_ARGB8 && dstFormat == M3G_ARGB8) {
+            convertToARGB(srcFormat, src, n, (M3Guint*)dst);
+        } else {
+            convertToARGB(srcFormat, src, n, temp);
+            convertFromARGB(temp, n, dstFormat, dst);
+        }
         count -= SPAN_BUFFER_SIZE; /* \note may go negative */
         src += n * srcBpp;
         dst += n * dstBpp;
@@ -1252,7 +1259,6 @@
             /* Allocate pixel & palette data; the palette is stored at
              * the beginning of the pixel data chunk */
 
-            /* \ comment */
             M3Gbool paletted = ((img->flags & M3G_PALETTED) != 0)
                 && m3gSupportedPaletteFormat(srcFormat);
             M3GPixelFormat internalFormat = getInternalFormat(srcFormat,
--- a/m3g/m3gcore11/src/m3g_image.inl	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/src/m3g_image.inl	Sat Feb 27 19:09:35 2010 +0000
@@ -90,6 +90,7 @@
         return GL_RGB;
     case M3G_RGBA8:
     case M3G_BGRA8:
+    case M3G_ARGB8:
         return GL_RGBA;
     case M3G_PALETTE8_RGB8:
         return GL_PALETTE8_RGB8_OES;
--- a/m3g/m3gcore11/src/m3g_rendercontext.c	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/src/m3g_rendercontext.c	Sat Feb 27 19:09:35 2010 +0000
@@ -69,7 +69,11 @@
     EGLSurface handle;
     M3Gbitmask bufferBits;
     M3Gbitmask type;
+    M3Guint width;
+    M3Guint height;
+    M3Guint format;
     M3Guint targetHandle;
+    void* pixels;
     M3Guint lastUseTime;
 } GLSurfaceRecord;
 #endif /*!M3G_NGL_CONTEXT_API*/
@@ -82,12 +86,9 @@
     M3Gbitmask type;
     M3GPixelFormat format;
     M3Gint width, height;
-#   if defined(M3G_NGL_CONTEXT_API)
     M3Guint stride;
     /*@shared@*/ void *pixels, *lockedPixels;
-#   else
     EGLSurface surface;
-#   endif
     M3Guint handle;
     M3Guint userData;
     
@@ -1324,7 +1325,7 @@
      * hog resources */
 #   if !defined(M3G_NGL_CONTEXT_API)
     if (ctx->target.type != SURFACE_EGL) {
-    m3gSwapBuffers(ctx->target.surface);
+//    m3gSwapBuffers(ctx->target.surface);
     }
 #   endif
     m3gCollectGLObjects(M3G_INTERFACE(ctx));
--- a/m3g/m3gcore11/src/m3g_rendercontext.inl	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/src/m3g_rendercontext.inl	Sat Feb 27 19:09:35 2010 +0000
@@ -26,7 +26,7 @@
 #   error This file is for the OES API only
 #endif
 
-#include <GLES/egl.h>
+#include <EGL/egl.h>
 #include "m3g_image.h"
 
 /*----------------------------------------------------------------------
@@ -40,9 +40,10 @@
  */
 static EGLConfig m3gQueryEGLConfig(M3Genum format,
                                    M3Gbitmask bufferBits,
-                                   EGLint surfaceBits)
+                                   EGLint surfaceBits,
+                                   M3GNativeBitmap bitmapHandle)
 {
-    struct { int attrib, value; } attribs[9];
+    struct { int attrib, value; } attribs[10];
     int samples;
 
     /* Determine color depth */
@@ -93,37 +94,72 @@
     attribs[5].attrib = EGL_SURFACE_TYPE;
     attribs[5].value = surfaceBits;
 
-    /* Try to get multisampling if requested */
+
+    if (bitmapHandle) {
+        /* This attribute is matched only for pixmap targets */
+        attribs[6].attrib = EGL_MATCH_NATIVE_PIXMAP;
+        attribs[6].value = bitmapHandle;
+
+        /* Try to get multisampling if requested */
+
+        attribs[7].attrib = EGL_SAMPLE_BUFFERS;
+        attribs[8].attrib = EGL_SAMPLES;
 
-    attribs[6].attrib = EGL_SAMPLE_BUFFERS;
-    attribs[7].attrib = EGL_SAMPLES;
-    attribs[8].attrib = EGL_NONE;
+        attribs[9].attrib = EGL_NONE;
+    } else {
+        /* Try to get multisampling if requested */
 
+        attribs[6].attrib = EGL_SAMPLE_BUFFERS;
+        attribs[7].attrib = EGL_SAMPLES;
+
+        attribs[8].attrib = EGL_NONE;
+    }
+    
+    
     /* Try 4 samples if multisampling enabled, then 2, then 1 */
     
     samples = (bufferBits & M3G_MULTISAMPLE_BUFFER_BIT) ? 4 : 1;
     for ( ; samples > 0; samples >>= 1) {
         
-        if (samples > 1) {
-            attribs[6].value = 1;
-            attribs[7].value = samples;
-        }
-        else {
-            attribs[6].value = EGL_FALSE;
-            attribs[7].value = 0;
+        if (bitmapHandle) {
+            if (samples > 1) {
+                attribs[7].value = 1;
+                attribs[8].value = samples;
+            }
+            else {
+                attribs[7].value = EGL_FALSE;
+                attribs[8].value = 0;
+            }
+        } else {
+            if (samples > 1) {
+                attribs[6].value = 1;
+                attribs[7].value = samples;
+            }
+            else {
+                attribs[6].value = EGL_FALSE;
+                attribs[7].value = 0;
+            }
         }
 
         /* Get the first matching config; according to EGL sorting
          * rules, this should be an accelerated one if possible */
         {
             EGLConfig config;
-            int numConfigs;
+            int numConfigs;  
+            EGLint error;            
+        
             eglChooseConfig(eglGetDisplay(EGL_DEFAULT_DISPLAY),
                             (const int *) attribs,
                             &config, 1,
                             &numConfigs);
             
-            M3G_ASSERT(eglGetError() == EGL_SUCCESS);
+            error = eglGetError();
+            if (error != EGL_SUCCESS) {
+                M3G_LOG1(M3G_LOG_FATAL_ERRORS, "eglChooseConfig  failed: %d\n", error);
+            }
+            
+            
+            M3G_ASSERT(error == EGL_SUCCESS);
 
             /* If we got a config, return that; otherwise, drop the
              * number of multisampling samples and try again, or
@@ -154,6 +190,7 @@
 {
     M3G_LOG(M3G_LOG_INTERFACE, "Initializing EGL\n");
     eglInitialize(eglGetDisplay(EGL_DEFAULT_DISPLAY), NULL, NULL);
+    eglBindAPI(EGL_OPENGL_ES_API);
 }
 
 /*!
@@ -170,7 +207,7 @@
  * \internal
  * \brief Creates a new EGL context
  */
-static EGLContext m3gCreateGLContext(M3Genum format,
+/*static EGLContext m3gCreateGLContext(M3Genum format,
                                      M3Gbitmask bufferBits,
                                      M3Gbitmask reqSurfaceBits,
                                      EGLContext share,
@@ -181,7 +218,7 @@
 
     M3G_ASSERT((reqSurfaceBits & ~(EGL_PIXMAP_BIT|EGL_PBUFFER_BIT|EGL_WINDOW_BIT)) == 0);
     
-    config = m3gQueryEGLConfig(format, bufferBits, reqSurfaceBits);
+    config = m3gQueryEGLConfig(format, bufferBits, reqSurfaceBits, NULL);
     
     if (!config || !eglGetConfigAttrib(eglGetDisplay(EGL_DEFAULT_DISPLAY),
                                        config,
@@ -205,7 +242,7 @@
     M3G_LOG1(M3G_LOG_OBJECTS, "New GL context 0x%08X\n", (unsigned) ctx);
     return ctx;
 }
-
+*/
 /*!
  * \internal
  * \brief Deletes an EGL context
@@ -236,7 +273,7 @@
                                          M3GNativeWindow wnd)
 {
     EGLSurface surf;
-    EGLConfig config = m3gQueryEGLConfig(format, bufferBits, EGL_WINDOW_BIT);
+    EGLConfig config = m3gQueryEGLConfig(format, bufferBits, EGL_WINDOW_BIT, NULL);
     
     if (!config) {
         return NULL;
@@ -272,7 +309,7 @@
                                          M3GNativeBitmap bmp)
 {
     EGLSurface surf;
-    EGLConfig config = m3gQueryEGLConfig(format, bufferBits, EGL_PIXMAP_BIT);
+    EGLConfig config = m3gQueryEGLConfig(format, bufferBits, EGL_PIXMAP_BIT, bmp);
     
     if (!config) {
         return NULL;
@@ -317,7 +354,7 @@
     attrib[3] = height;
     attrib[4] = EGL_NONE;
     
-    config = m3gQueryEGLConfig(format, bufferBits, EGL_PBUFFER_BIT);
+    config = m3gQueryEGLConfig(format, bufferBits, EGL_PBUFFER_BIT, NULL);
     if (!config) {
         return NULL;
     }
@@ -410,7 +447,7 @@
     if (internalFormat == M3G_RGB8_32) {
         glFormat = GL_RGBA;
     }
-    if (internalFormat == M3G_BGR8_32) {
+    if (internalFormat == M3G_BGR8_32 || internalFormat == M3G_ARGB8) {
         glFormat = GL_RGBA;
         mustConvert = M3G_TRUE;
     }
@@ -714,6 +751,7 @@
     M3GPixelFormat format = ctx->target.format;
     M3Gbitmask bufferBits = ctx->bufferBits;
     M3Gbitmask surfaceType = ctx->target.type;
+    M3GNativeBitmap bitmapHandle = ctx->target.handle;
     int i;
 
     /* Images always go via pbuffers; EGL surfaces can always be
@@ -742,7 +780,7 @@
 
     /* No dice; must resort to querying from EGL */
 
-    return (m3gQueryEGLConfig(format, bufferBits, (EGLint) surfaceType) != NULL);
+    return (m3gQueryEGLConfig(format, bufferBits, (EGLint) surfaceType, bitmapHandle) != NULL);
 }
 
 /*!
@@ -918,38 +956,45 @@
     if (ctx->target.type == SURFACE_IMAGE) {
         m3gDrawFrameBufferImage(ctx, (Image *) ctx->target.handle);
     }
-    else if (ctx->target.type == SURFACE_BITMAP) {
+    else if (ctx->target.type == SURFACE_BITMAP || ctx->target.type == SURFACE_MEMORY) {
 
         M3Gubyte *src;
         M3Gsizei stride;
 
-        /* Obtain a pointer to the native bitmap and copy the data to
-         * the backbuffer from there */
-        
-        if (m3gglLockNativeBitmap((M3GNativeBitmap) ctx->target.handle,
-                                  &src, &stride)) {
+        M3Gint clipWidth = ctx->clip.x1 - ctx->clip.x0;
+        M3Gint clipHeight = ctx->clip.y1 - ctx->clip.y0;
+        M3Gint srcOffset;
 
-            M3Gint clipWidth = ctx->clip.x1 - ctx->clip.x0;
-            M3Gint clipHeight = ctx->clip.y1 - ctx->clip.y0;
-            M3Gint srcOffset =
-                (ctx->target.height - ctx->clip.y1) * stride
-                + ctx->clip.x0 * m3gBytesPerPixel(ctx->target.format);
-            
-            m3gBlitFrameBufferPixels(
-                ctx,
-                ctx->clip.x0, ctx->clip.y0,
-                clipWidth, clipHeight,
-                ctx->target.format,
-                stride,
-                src + srcOffset);
-                
+        if (ctx->target.type == SURFACE_BITMAP) {
+            /* Obtain a pointer to the native bitmap and copy the data to
+             * the backbuffer from there */
+            if (!m3gglLockNativeBitmap((M3GNativeBitmap) ctx->target.handle,
+                                      &src, &stride)) {
+                /* No dice! There's no way that we know of to copy the
+                 * data between the buffers */
+                M3G_ASSERT(M3G_FALSE);
+            }
+        } else {
+            /* Memory target */
+            src = ctx->target.pixels;
+            stride = ctx->target.stride;
+        }
+
+        srcOffset =
+            (ctx->target.height - ctx->clip.y1) * stride
+            + ctx->clip.x0 * m3gBytesPerPixel(ctx->target.format);
+        
+        m3gBlitFrameBufferPixels(
+            ctx,
+            ctx->clip.x0, ctx->clip.y0,
+            clipWidth, clipHeight,
+            ctx->target.format,
+            stride,
+            src + srcOffset);
+
+        if (ctx->target.type == SURFACE_BITMAP) {
             m3gglReleaseNativeBitmap((M3GNativeBitmap) ctx->target.handle);
         }
-        else {
-            /* No dice! There's no way that we know of to copy the
-             * data between the buffers */
-            M3G_ASSERT(M3G_FALSE);
-        }
     }
     else {
         /* Buffered rendering is not supported for window and pbuffer
@@ -969,67 +1014,75 @@
     if (ctx->target.type == SURFACE_IMAGE) {
         m3gCopyFrameBufferImage((Image *) ctx->target.handle);
     }
-    else if (ctx->target.type == SURFACE_BITMAP) {
+    else if (ctx->target.type == SURFACE_BITMAP || ctx->target.type == SURFACE_MEMORY) {
         
-        /* We must copy the back buffer to a native bitmap: first
-         * attempt a fast buffer-to-buffer copy using EGL, but if that
-         * fails, obtain a pointer and do the copy ourselves */
+        M3GPixelFormat format = ctx->target.format;
+        M3Gint width = ctx->clip.x1 - ctx->clip.x0;
+        M3Gint height = ctx->clip.y1 - ctx->clip.y0;
+        M3Gint xOffset = ctx->clip.x0;
+        M3Gint yOffset = ctx->clip.y0;
+        M3Gint row;
 
-        /* We can only do the fast copy for the full buffer */
+        M3Gubyte *dst;
+        M3Gsizei stride;
+        M3Gubyte *temp;
 
-        M3Gbool fullClip = (ctx->clip.x0 == 0)
-            && (ctx->clip.y0 <= ctx->target.height - ctx->display.height)
-            && (ctx->clip.x1 >= ctx->display.width)
-            && (ctx->clip.y1 >= ctx->clip.y0 + ctx->display.height);
-        
-        if (!fullClip || !eglCopyBuffers(eglGetDisplay(EGL_DEFAULT_DISPLAY),
-                                         ctx->backBuffer.glSurface,
-                                         (NativePixmapType) ctx->target.handle)) {
+        if (ctx->target.type == SURFACE_BITMAP) {
+            /* We must copy the back buffer to a native bitmap: first
+             * attempt a fast buffer-to-buffer copy using EGL, but if that
+             * fails, obtain a pointer and do the copy ourselves */
+
+            /* We can only do the fast copy for the full buffer */
+
+            M3Gbool fullClip = (ctx->clip.x0 == 0)
+                && (ctx->clip.y0 <= ctx->target.height - ctx->display.height)
+                && (ctx->clip.x1 >= ctx->display.width)
+                && (ctx->clip.y1 >= ctx->clip.y0 + ctx->display.height);
+            
+            if (fullClip && eglCopyBuffers(eglGetDisplay(EGL_DEFAULT_DISPLAY),
+                                             ctx->backBuffer.glSurface,
+                                             (NativePixmapType) ctx->target.handle)) 
+            {
+                return;
+            }
             
             /* Fast copy failed, try the generic approach */
-
-            M3Gubyte *dst;
-            M3Gsizei stride;
-            
-            if (m3gglLockNativeBitmap((M3GNativeBitmap) ctx->target.handle,
+            if (!m3gglLockNativeBitmap((M3GNativeBitmap) ctx->target.handle,
                                       &dst, &stride)) {
-                
-                /* OK, got the pointer; now, copy a scanline at a
-                 * time, and we can pretty much assume conversion
-                 * since the fast method didn't work */
-
-                M3GPixelFormat format = ctx->target.format;
-                M3Gint width = ctx->clip.x1 - ctx->clip.x0;
-                M3Gint height = ctx->clip.y1 - ctx->clip.y0;
-                M3Gint xOffset = ctx->clip.x0;
-                M3Gint yOffset = ctx->clip.y0;
-                M3Gint row;
-
-                M3Gubyte *temp = m3gAllocTemp(M3G_INTERFACE(ctx), width * 4);
-                if (!temp) {
-                    return; /* out of memory */
-                }
-
-                dst += (ctx->target.height - (yOffset + height)) * stride
-                    + xOffset * m3gBytesPerPixel(format);
-                
-                for (row = 0; row < height; ++row) {
-                    glReadPixels(xOffset, yOffset + height - row - 1,
-                                 width, 1,
-                                 GL_RGBA, GL_UNSIGNED_BYTE,
-                                 temp);
-                    m3gConvertPixels(M3G_RGBA8, temp, format, dst, width);
-                    dst += stride;
-                }
-                m3gFreeTemp(M3G_INTERFACE(ctx));
-                
-                m3gglReleaseNativeBitmap((M3GNativeBitmap) ctx->target.handle);
-            }
-            else {
                 /* No dice! There's no way that we know of to copy the
                  * data between the buffers */
                 M3G_ASSERT(M3G_FALSE);
             }
+        } else {
+            /* Memory target */
+            dst = ctx->target.pixels;
+            stride = ctx->target.stride;
+        }
+                
+        /* OK, got the pointer; now, copy a scanline at a
+         * time, and we can pretty much assume conversion
+         * since the fast method didn't work */
+
+        temp = m3gAllocTemp(M3G_INTERFACE(ctx), width * 4);
+        if (!temp) {
+            return; /* out of memory */
+        }
+
+        dst += (ctx->target.height - (yOffset + height)) * stride
+            + xOffset * m3gBytesPerPixel(format);
+        
+        for (row = 0; row < height; ++row) {
+            glReadPixels(xOffset, yOffset + height - row - 1,
+                         width, 1,
+                         GL_RGBA, GL_UNSIGNED_BYTE,
+                         temp);
+            m3gConvertPixels(M3G_RGBA8, temp, format, dst, width);
+            dst += stride;
+        }
+        m3gFreeTemp(M3G_INTERFACE(ctx));
+
+        if (ctx->target.type == SURFACE_BITMAP) {
+            m3gglReleaseNativeBitmap((M3GNativeBitmap) ctx->target.handle);
         }
     }
     else {
@@ -1102,24 +1155,25 @@
          * done in this order so that we don't lose any shared texture
          * objects when deleting a context. */
 
-        if (surfaceTypeBits == SURFACE_EGL) {
+        //if (surfaceTypeBits == SURFACE_EGL) 
+        {
             EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
             EGLint configID;
             eglQuerySurface(dpy,
-                            (EGLSurface) ctx->target.handle,
+                            surface,//(EGLSurface) ctx->target.handle,
                             EGL_CONFIG_ID,
                             &configID);
             glrc = eglCreateContext(dpy, (EGLConfig) configID, shareRc, NULL);
-            M3G_ASSERT(glrc);
+            //M3G_ASSERT(glrc);
         }
-        else {
+        /*else {
             glrc = m3gCreateGLContext(format,
                                       bufferBits,
                                       surfaceTypeBits,
                                       shareRc,
                                       &lru->surfaceTypeBits);
         }
-        
+        */
         if (!glrc) {
             m3gRaiseError(M3G_INTERFACE(ctx), M3G_OUT_OF_MEMORY);
             return NULL;
@@ -1181,9 +1235,13 @@
     for (i = 0; i < M3G_MAX_GL_SURFACES; ++i) {
         GLSurfaceRecord *surf = &ctx->glSurface[i];
         
-        if (surf->type == ctx->target.type
-            && surf->targetHandle == ctx->target.handle
-            && (ctx->bufferBits & surf->bufferBits) == ctx->bufferBits) {
+        if ((surf->type == ctx->target.type)
+            && (surf->targetHandle == ctx->target.handle)
+            && ((ctx->bufferBits & surf->bufferBits) == ctx->bufferBits)
+            && (surf->width == ctx->target.width)
+            && (surf->height == ctx->target.height)
+            && (surf->format == ctx->target.format)
+            && (surf->pixels == ctx->target.pixels)) {
             
             surf->lastUseTime = ctx->cacheTimeStamp;
             return surf->handle;
@@ -1241,6 +1299,10 @@
             lru->type         = ctx->target.type;
             lru->targetHandle = ctx->target.handle;
             lru->bufferBits   = ctx->bufferBits;
+            lru->width        = ctx->target.width;
+            lru->height       = ctx->target.height;
+            lru->format       = ctx->target.format;
+            lru->pixels       = ctx->target.pixels;
             lru->lastUseTime  = ctx->cacheTimeStamp;
             return lru->handle;
         }
@@ -1302,6 +1364,8 @@
  */
 static void m3gMakeGLCurrent(RenderContext *ctx)
 {
+    eglBindAPI(EGL_OPENGL_ES_API);
+
     if (ctx != NULL) {
         EGLContext eglCtx = NULL;
         if (ctx->target.buffered) {
@@ -1357,13 +1421,13 @@
                          M3GNativeBitmap hBitmap)
 {
     M3GPixelFormat format;
-    M3Gint width, height;
+    M3Gint width, height, pixels;
     RenderContext *ctx = (RenderContext *) hCtx;
     M3G_VALIDATE_OBJECT(ctx);
     
     M3G_LOG1(M3G_LOG_RENDERING, "Binding bitmap 0x%08X\n", (unsigned) hBitmap);
     
-    if (!m3gglGetNativeBitmapParams(hBitmap, &format, &width, &height)) {
+    if (!m3gglGetNativeBitmapParams(hBitmap, &format, &width, &height, &pixels)) {
         m3gRaiseError(M3G_INTERFACE(ctx), M3G_INVALID_OBJECT);
         return;
     }
@@ -1376,7 +1440,10 @@
         return; /* appropriate error raised automatically */
     }
 
-    /* placeholder for bitmap target specific setup */
+    /* Set the bitmap target specific parameters */
+    
+    ctx->target.pixels = (void*)pixels;
+
 }
 
 /*!
@@ -1417,28 +1484,57 @@
 }
 
 /*!
- * \brief Unsupported with OpenGL ES
+ * \brief Binds a new memory rendering target to this rendering
+ * context
+ *
+ * Upon first binding of a specific target, binding the buffer may
+ * require auxiliary data to be allocated, depending on the rendering
+ * modes set for this context. In that case, the binding will be
+ * canceled, and the function will return a non-zero value giving the
+ * number of bytes of additional memory that needs to be supplied for
+ * binding of that target to succeed. The function must then be called
+ * again and a pointer to a sufficient memory block supplied as the \c
+ * mem parameter.
+ *
+ * \param pixels NULL to signal that the frame buffer is accessed
+ * using a callback upon rendering time
  */
-/*@access EGLContext@*/
-M3G_API void m3gBindMemoryTarget(M3GRenderContext context,
-                                 /*@shared@*/ void *pixels,
-                                 M3Guint width, M3Guint height,
-                                 M3GPixelFormat format,
-                                 M3Guint stride,
-                                 M3Guint userHandle)
+/*@access M3GGLContext@*/
+void m3gBindMemoryTarget(M3GRenderContext context,
+                         /*@shared@*/ void *pixels,
+                         M3Guint width, M3Guint height,
+                         M3GPixelFormat format,
+                         M3Guint stride,
+                         M3Guint userHandle)
 {
     RenderContext *ctx = (RenderContext*) context;
     Interface *m3g = M3G_INTERFACE(ctx);
     M3G_VALIDATE_OBJECT(ctx);
 
-    M3G_UNREF(pixels);
-    M3G_UNREF(width);
-    M3G_UNREF(height);
-    M3G_UNREF(format);
-    M3G_UNREF(stride);
-    M3G_UNREF(userHandle);
+    M3G_LOG1(M3G_LOG_RENDERING, "Binding memory buffer 0x%08X\n",
+             (unsigned) pixels);
+    
+    /* Check for bitmap specific errors */
+    
+    if (width == 0 || height == 0 || stride < width) {
+        m3gRaiseError(m3g, M3G_INVALID_VALUE);
+        return; 
+    }
+
+    /* Effect the generic target binding */
     
-    m3gRaiseError(m3g, M3G_INVALID_OPERATION);
+    if (!m3gBindRenderTarget(ctx,
+                             SURFACE_MEMORY,
+                             width, height,
+                             format,
+                             userHandle)) {
+        return; /* appropriate error raised automatically */
+    }
+
+    /* Set the memory target specific parameters */
+    
+    ctx->target.pixels = pixels;
+    ctx->target.stride = stride;
 }
 
 /*!
@@ -1515,3 +1611,24 @@
     
     m3gDeleteGLSurfaces(ctx, (M3Gbitmask) SURFACE_WINDOW, (M3Guint) hWindow);
 }
+
+/*!
+ * \brief Invalidate a previously bound memorytarget
+ *
+ * This should be called prior to deleting a memory buffer that has
+ * been used as an M3G rendering target in the past. 
+ *
+ * \param hCtx    M3G rendering context
+ * \param pixels  pointer to the memory buffer
+ */
+M3G_API void m3gInvalidateMemoryTarget(M3GRenderContext hCtx,
+                                       void *pixels)
+{
+    RenderContext *ctx = (RenderContext *) hCtx;
+    M3G_VALIDATE_OBJECT(ctx);
+
+    M3G_LOG1(M3G_LOG_RENDERING, "Invalidating memory target 0x%08X\n",
+             (unsigned) pixels);
+    
+    m3gDeleteGLSurfaces(ctx, (M3Gbitmask) SURFACE_MEMORY, (M3Guint) pixels);
+}
--- a/m3g/m3gcore11/src/m3g_symbian_gl.cpp	Wed Feb 10 20:59:36 2010 +0000
+++ b/m3g/m3gcore11/src/m3g_symbian_gl.cpp	Sat Feb 27 19:09:35 2010 +0000
@@ -43,6 +43,7 @@
     case EColor16MU:
         return M3G_BGR8_32;
     case EColor16MA:    
+    case EColor16MAP:    
         return M3G_BGRA8;
     case ERgb:
         return M3G_RGB8_32;
@@ -84,7 +85,7 @@
  */
 extern "C" M3Gbool m3gglGetNativeBitmapParams(M3GNativeBitmap bitmap,
                                               M3GPixelFormat *format,
-                                              M3Gint *width, M3Gint *height)
+                                              M3Gint *width, M3Gint *height, M3Gint *pixels)
 {
     CFbsBitmap *pBitmap = (CFbsBitmap *) bitmap;
 
@@ -94,6 +95,10 @@
     *width = size.iWidth;
     *height = size.iHeight;
     
+    pBitmap->LockHeap();
+    *pixels = (M3Gint) pBitmap->DataAddress();
+    pBitmap->UnlockHeap();
+    
     return M3G_TRUE;
 }
 
--- a/windowing/windowserver/SERVER/w32cmd.h	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/SERVER/w32cmd.h	Sat Feb 27 19:09:35 2010 +0000
@@ -1,4 +1,4 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1999-2010 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"
@@ -968,7 +968,7 @@
 	const TBool *Bool;
 	const TUid *Uid;
 	const TPointerCursorMode *Mode;
-	const TXYInputType *XyInput;
+    const TInt *XyInput;
 	const TPoint *Point;
 	const TRgb *rgb;
 	const RqStatPtr *RequestStatus;
--- a/windowing/windowserver/bwins/WS322U.DEF	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/bwins/WS322U.DEF	Sat Feb 27 19:09:35 2010 +0000
@@ -333,7 +333,7 @@
 	?SetPointerCursorArea@RWsSession@@QAEXHABVTRect@@@Z @ 332 NONAME ; public: void __thiscall RWsSession::SetPointerCursorArea(int,class TRect const &)
 	?SetPointerCursorMode@RWsSession@@QAEXW4TPointerCursorMode@@@Z @ 333 NONAME ; public: void __thiscall RWsSession::SetPointerCursorMode(enum TPointerCursorMode)
 	?SetPointerCursorPosition@RWsSession@@QAEHABVTPoint@@@Z @ 334 NONAME ; public: int __thiscall RWsSession::SetPointerCursorPosition(class TPoint const &)
-	?SimulateXyInputType@RWsSession@@QAEXW4TXYInputType@@@Z @ 335 NONAME ; public: void __thiscall RWsSession::SimulateXyInputType(enum TXYInputType)
+	?SimulateXyInputType@RWsSession@@QAEXH@Z @ 335 NONAME ; void RWsSession::SimulateXyInputType(int)
 	?MoveToGroup@RWindowBase@@QAEHH@Z @ 336 NONAME ; public: int __thiscall RWindowBase::MoveToGroup(int)
 	?SendMessageToAllWindowGroups@RWsSession@@QAEHHVTUid@@ABVTDesC8@@@Z @ 337 NONAME ; public: int __thiscall RWsSession::SendMessageToAllWindowGroups(int,class TUid,class TDesC8 const &)
 	?SendMessageToAllWindowGroups@RWsSession@@QAEHVTUid@@ABVTDesC8@@@Z @ 338 NONAME ; public: int __thiscall RWsSession::SendMessageToAllWindowGroups(class TUid,class TDesC8 const &)
--- a/windowing/windowserver/group/BLD.INF	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/group/BLD.INF	Sat Feb 27 19:09:35 2010 +0000
@@ -36,7 +36,7 @@
 
 PRJ_MMPFILES
 #ifdef SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV
-#include "openwfc/bld.inf"
+#include "openwfc/BLD.INF"
 #else
-#include "restricted/bld.inf"
+#include "restricted/BLD.INF"
 #endif
--- a/windowing/windowserver/group/openwfc/BLD.INF	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/group/openwfc/BLD.INF	Sat Feb 27 19:09:35 2010 +0000
@@ -125,10 +125,6 @@
 ../../group/WSGRAPHICDRAWER_nga.MMP
 ../../group/openwfc/WServ_nga.MMP
 ../../group/RemoteGc_nga.mmp
-#ifndef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS // PREQ2669
-../../group/samplegraphicsurface.MMP
-../../group/samplegraphicsurfacedrawer.MMP
-#endif
 ../../group/graphicsresourcewrapper.mmp
 
 
--- a/windowing/windowserver/inc/W32STD.H	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/inc/W32STD.H	Sat Feb 27 19:09:35 2010 +0000
@@ -1,4 +1,4 @@
-// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1994-2010 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"
@@ -1496,7 +1496,7 @@
 #if defined(__WINS__)
 // Function for WINS behaviour only
 	IMPORT_C void SetRemoveKeyCode(TBool aRemove);
-	IMPORT_C void SimulateXyInputType(TXYInputType aInputType);		//Only for testing WSERV
+	IMPORT_C void SimulateXyInputType(TInt aInputType);		//Only for testing WSERV
 #endif
 //
 	IMPORT_C void SimulateRawEvent(TRawEvent aEvent);
--- a/windowing/windowserver/minigui/group/minigui.oby	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/minigui/group/minigui.oby	Sat Feb 27 19:09:35 2010 +0000
@@ -112,10 +112,7 @@
 #include <traces.iby>
 #include <mmf_plugin.iby>
 #include <omxilcompref.iby>
-
-#ifdef SYMBIAN_MULTIMEDIA_OPENMAX_IL_V2
-# include <omxilcomp.iby>
-#endif
+#include <omxilcomp.iby>
 
 #include <omxilcore.iby>
 	
--- a/windowing/windowserver/nga/CLIENT/RWS.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nga/CLIENT/RWS.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -1,4 +1,4 @@
-// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1995-2010 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"
@@ -2044,7 +2044,7 @@
 	WriteInt(aRemove,EWsClOpRemoveKeyCode);
 	}
 
-EXPORT_C void RWsSession::SimulateXyInputType(TXYInputType aInputType)
+EXPORT_C void RWsSession::SimulateXyInputType(TInt aInputType)
 	{
 	WriteInt(aInputType,EWsClOpSimulateXyInput);
 	}
--- a/windowing/windowserver/nga/SERVER/TCURSOR.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nga/SERVER/TCURSOR.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -138,7 +138,9 @@
 			clipRect=aSet.rect;
 			}
 
-		if (pos != iPos || size != iSize || iType != type ||
+		TPoint absPos(pos.iX,pos.iY);
+		absPos=absPos+win->Origin();
+		if (pos != iPos || absPos != iAbsPos || size != iSize || iType != type ||
 			flags != iFlags || clipRect != iClipRect || color != iColor ||
 			customTextCursor != iCustomTextCursor || win != iWin)
 			{
@@ -153,7 +155,7 @@
 			TCursorSprite::Hide();
 			}
 
-		UpdateAttributes(pos, size, type, flags, clipRect, color, customTextCursor, win);
+		UpdateAttributes(pos, absPos, size, type, flags, clipRect, color, customTextCursor, win);
 
 		if (customTextCursor && iInternalFlags&EHasFocus)
 			{
@@ -167,11 +169,12 @@
 			}
 		}
 	}
-void RWsTextCursor::UpdateAttributes(TPoint aPos, TSize aSize, TInt aType, TUint aFlags, TRect aClipRect, TRgb aColor, CWsCustomTextCursor* aCustomTextCursor, CWsClientWindow* aWin)
+void RWsTextCursor::UpdateAttributes(TPoint aPos, TPoint aAbsPos, TSize aSize, TInt aType, TUint aFlags, TRect aClipRect, TRgb aColor, CWsCustomTextCursor* aCustomTextCursor, CWsClientWindow* aWin)
 	{
-	if (aPos != iPos || aSize != iSize)
+	if (aPos != iPos || aSize != iSize || aAbsPos != iAbsPos)
 		{
 		iPos = aPos;
+        iAbsPos = aAbsPos;
 		iSize = aSize;
 		WS_ASSERT_DEBUG(iGroupWin->Screen(),EWsPanicNoScreen);
 		MWsWindowTreeObserver* const windowTreeObserver = iGroupWin->Screen()->WindowTreeObserver();
--- a/windowing/windowserver/nga/SERVER/openwfc/ANIMDLL.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nga/SERVER/openwfc/ANIMDLL.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -83,7 +83,7 @@
 			iBitFlags.Clear(EWinAnimConstructed);
 			}
 		CWsAnim **pAnim;
-		for(pAnim= &iWindow->iAnimList;(*pAnim)!=this;pAnim= &(*pAnim)->iNextWin)
+		for(pAnim= &iWindow->iAnimList;(*pAnim)!=NULL && (*pAnim)!=this;pAnim= &(*pAnim)->iNextWin)
 			{}
 		*pAnim=iNextWin;
 		
--- a/windowing/windowserver/nga/SERVER/openwfc/windowelementset.cpp	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nga/SERVER/openwfc/windowelementset.cpp	Sat Feb 27 19:09:35 2010 +0000
@@ -353,7 +353,7 @@
 	//as that would propagate a client panic in SetBackgroundSurface which did not previously occur.
 	aElement.SetSourceRotation(GcToElementRotation(aSurfaceConfiguration.Orientation()));
 	// Set or clear flip if the element flags are changing
-	if (aSurfaceConfiguration.Flip() != aElement.SourceFlipping()) 
+	if ( (!aSurfaceConfiguration.Flip()) != (!aElement.SourceFlipping()) ) 
 	    {
         aElement.SetSourceFlipping(!aElement.SourceFlipping());
 	    }
--- a/windowing/windowserver/nga/SERVER/tcursor.h	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nga/SERVER/tcursor.h	Sat Feb 27 19:09:35 2010 +0000
@@ -88,7 +88,7 @@
 	void Clear();
 	void doDraw(const TRegion& aRegion);
 	void ScheduleReDrawNow();
-	void UpdateAttributes(TPoint aPos, TSize aSize, TInt aType, TUint aFlags, TRect aClipRect, TRgb aColor, CWsCustomTextCursor* aCustomTextCursor, CWsClientWindow* aWin);
+	void UpdateAttributes(TPoint aPos, TPoint aAbsPos, TSize aSize, TInt aType, TUint aFlags, TRect aClipRect, TRgb aColor, CWsCustomTextCursor* aCustomTextCursor, CWsClientWindow* aWin);
 	void NotifyObserver(MWsWindowTreeObserver::TAttributes aAttribute) const;
 private:
 	CWsWindowGroup *iGroupWin;
@@ -96,6 +96,7 @@
 	TUint iInternalFlags;
 	TInt iType;
 	TPoint iPos;
+	TPoint iAbsPos;
 	TSize iSize;
     TUint iFlags;
 	TRgb iColor;
--- a/windowing/windowserver/nonnga/CLIENT/RWS.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nonnga/CLIENT/RWS.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -1,4 +1,4 @@
-// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1995-2010 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"
@@ -2040,7 +2040,7 @@
 	WriteInt(aRemove,EWsClOpRemoveKeyCode);
 	}
 
-EXPORT_C void RWsSession::SimulateXyInputType(TXYInputType aInputType)
+EXPORT_C void RWsSession::SimulateXyInputType(TInt aInputType)
 	{
 	WriteInt(aInputType,EWsClOpSimulateXyInput);
 	}
--- a/windowing/windowserver/nonnga/SERVER/CLIENT.CPP	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/nonnga/SERVER/CLIENT.CPP	Sat Feb 27 19:09:35 2010 +0000
@@ -1,4 +1,4 @@
-// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1994-2010 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"
@@ -1144,7 +1144,7 @@
 			iRemoveKeyCode=*pData.Bool;
 			break;
 		case EWsClOpSimulateXyInput:
-			WsPointer::SetXyInputType(*pData.XyInput);
+			WsPointer::SetXyInputType(static_cast<TXYInputType>(*pData.XyInput));
 			break;
 #endif
 		case EWsClOpNoFlickerFree:
--- a/windowing/windowserver/test/scripts/wstest_t_redraw_s0_nga.script	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/test/scripts/wstest_t_redraw_s0_nga.script	Sat Feb 27 19:09:35 2010 +0000
@@ -26,7 +26,7 @@
 // RUN_TEST_STEP 100 tautoserver_nga TMemLeakCheckEnable
 //
 
-RUN_TEST_STEP 100 tautoserver_nga TRedrawTest
+RUN_TEST_STEP 120 tautoserver_nga TRedrawTest
 RUN_TEST_STEP 100 tautoserver_nga TOOMDRAW
 RUN_TEST_STEP 600 tautoserver_nga TRedrawStoring
 
--- a/windowing/windowserver/test/scripts/wstest_t_redraw_s1_nga.script	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/test/scripts/wstest_t_redraw_s1_nga.script	Sat Feb 27 19:09:35 2010 +0000
@@ -26,7 +26,7 @@
 // RUN_TEST_STEP 100 tautoserver_nga TMemLeakCheckEnable
 //
 
-RUN_TEST_STEP 100 tautoserver_nga TRedrawTest z:\wstest\graphics-wserv-autotest.ini
+RUN_TEST_STEP 120 tautoserver_nga TRedrawTest z:\wstest\graphics-wserv-autotest.ini
 RUN_TEST_STEP 100 tautoserver_nga TOOMDRAW z:\wstest\graphics-wserv-autotest.ini
 RUN_TEST_STEP 600 tautoserver_nga TRedrawStoring z:\wstest\graphics-wserv-autotest.ini
 
--- a/windowing/windowserver/test/t_integ/group/bld.inf	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserver/test/t_integ/group/bld.inf	Sat Feb 27 19:09:35 2010 +0000
@@ -13,8 +13,6 @@
 // Description:
 // @file
 // @test
-// @internalComponent
-// 
 //
 
 PRJ_TESTEXPORTS
@@ -23,6 +21,7 @@
 ../scripts/graphics-wserv-integ.script			z:/graphics/graphics-wserv-integ.script
 ../scripts/graphics-wserv-integ-basic.script		z:/graphics/graphics-wserv-integ-basic.script
 ../scripts/graphics-wserv-integ-dsa.script		z:/graphics/graphics-wserv-integ-dsa.script
+../scripts/graphics-wserv-integ-dsa-h6.script		z:/graphics/graphics-wserv-integ-dsa-h6.script
 ../scripts/graphics-wserv-integ-surface.script		z:/graphics/graphics-wserv-integ-surface.script
 ../scripts/graphics-wserv-integ-surface1.script		z:/graphics/graphics-wserv-integ-surface1.script
 ../scripts/graphics-wserv-integ-surface2.script		z:/graphics/graphics-wserv-integ-surface2.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/windowing/windowserver/test/t_integ/scripts/graphics-wserv-integ-dsa-h6.script	Sat Feb 27 19:09:35 2010 +0000
@@ -0,0 +1,45 @@
+/////////////////////////////////////////////////////////////////////
+// graphics-wserv-integ-dsa.script
+//
+// Tests Public elements of the DSA class
+// as a means of confidence that the APIs work as expected.
+// 
+// The purpose is to provide a regression test suite of Public
+// APIs for DSA. Negative testing is performed to confirm that correct 
+// errors are returned when incorrect parameters are given.
+//
+// The tests are fully automated.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	t_wservintegserver
+
+//! @file
+//! @SYMTestSuiteName		graphics-wserv-integ-dsa
+//! @SYMScriptTestEnvironment	This test script requires a modified ROM, which replaces
+//! 				the default wsini.ini with wsini_dsa_h6.ini.
+
+START_TESTCASE 			GRAPHICS-WSERV-INTEG-DSA-0001-0002
+//! @SYMTestCaseID		GRAPHICS-WSERV-INTEG-DSA-0001-0002
+//! @SYMPREQ					1007 1019
+//! @SYMREQ						8222 8223 8227
+//! @SYMAPI			DSA
+//! @SYMAuthor			Andy Kinney
+//! @SYMCreationDate		16/03/2007
+//! @SYMTestCaseDependencies	setup-graphics-wserv-integ-dsa.script wsini_dsa.ini
+//! @SYMTestCaseDesc		Check DSA app is aborted when screen rotated
+//! @SYMTestActions		1. Start non-DSA app (t_app1.exe)
+//!				2. Start DSA app (t_dsaapp.exe)
+//!				3. t_dsaapp draws to top half of screen
+//!				   red/green alternate frames
+//!				4. t_app1 rotates screen to 0 after (dummy rotation since 90 degree not supported on H6)
+//!				   number of iterations divided by number of rotations
+//!				5. t_dsaapp reaches last iteration and writes result file
+//!				6. TEF Step code reads result file and checks for expected
+//!				   values, and reports pass or fail
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	The screen does not rotate and no panics are generated. Top half of screen is displaying
+//!				alternate frames of green and blue. DSA App does not count any abort requests
+/! @SYMTestType		CIT
+RUN_TEST_STEP			180	t_wservintegserver	WServIntegDsa	c:\graphics\graphics-wserv-integ-dsa.ini	graphics-wserv-integ-dsa-0001-002
+END_TESTCASE 			GRAPHICS-WSERV-INTEG-DSA-0001-0002
--- a/windowing/windowserverplugins/group/BLD.INF	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserverplugins/group/BLD.INF	Sat Feb 27 19:09:35 2010 +0000
@@ -31,9 +31,9 @@
 PRJ_MMPFILES
 
 #ifndef SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV
-#include "../restricted/group/bld.inf"
+#include "../restricted/group/BLD.INF"
 #else
-#include "../openwfc/group/bld.inf"
+#include "../openwfc/group/BLD.INF"
 #endif
 
 
--- a/windowing/windowserverplugins/openwfc/group/stdplugin.mmp	Wed Feb 10 20:59:36 2010 +0000
+++ b/windowing/windowserverplugins/openwfc/group/stdplugin.mmp	Sat Feb 27 19:09:35 2010 +0000
@@ -74,7 +74,7 @@
 LIBRARY     libwfc.lib
 LIBRARY     wfcinterop.lib
 LIBRARY     surfacemanager.lib
-LIBRARY	 	libegl.lib
+LIBRARY	 	libEGL.lib
 //TODO Change the following line once eglsynchelper has been corrected
 //     to be available as a dynamic library
 STATICLIBRARY  eglsynchelper.lib