1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
144 TUint8* address = reinterpret_cast<TUint8*>(bitmap->DataAddress()); |
144 TUint8* address = reinterpret_cast<TUint8*>(bitmap->DataAddress()); |
145 TInt stride = bitmap->DataStride(); |
145 TInt stride = bitmap->DataStride(); |
146 address += (bitmapSize.iHeight - 1) * stride; |
146 address += (bitmapSize.iHeight - 1) * stride; |
147 vgWritePixels(address, -stride, KDefaultSurfaceFormat,0,0, bitmapSize.iWidth, bitmapSize.iHeight); |
147 vgWritePixels(address, -stride, KDefaultSurfaceFormat,0,0, bitmapSize.iWidth, bitmapSize.iHeight); |
148 ASSERT_TRUE(vgGetError()==VG_NO_ERROR); |
148 ASSERT_TRUE(vgGetError()==VG_NO_ERROR); |
|
149 eglWaitClient(); // wait for writing to finish |
149 ASSERT_EGL_TRUE(eglDestroySurface(iDisplay, surface)); //Destroying Surface handle |
150 ASSERT_EGL_TRUE(eglDestroySurface(iDisplay, surface)); //Destroying Surface handle |
150 |
151 |
151 INFO_PRINTF1(_L("Create a EGLImage out of the SgImage")); |
152 INFO_PRINTF1(_L("Create a EGLImage out of the SgImage")); |
152 EGLImageKHR imageKHR = iEglSess->eglCreateImageKhrL(iDisplay,EGL_NO_CONTEXT,EGL_NATIVE_PIXMAP_KHR,&sgImage,KEglImageAttribsPreservedTrue); |
153 EGLImageKHR imageKHR = iEglSess->eglCreateImageKhrL(iDisplay,EGL_NO_CONTEXT,EGL_NATIVE_PIXMAP_KHR,&sgImage,KEglImageAttribsPreservedTrue); |
153 ASSERT_EGL_TRUE(imageKHR != EGL_NO_IMAGE_KHR); |
154 ASSERT_EGL_TRUE(imageKHR != EGL_NO_IMAGE_KHR); |