diff -r 57c618273d5c -r bbf46f59e123 egl/egltest/src/egltestcommonsession.cpp --- a/egl/egltest/src/egltestcommonsession.cpp Thu Aug 19 11:11:18 2010 +0300 +++ b/egl/egltest/src/egltestcommonsession.cpp Tue Aug 31 16:31:06 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -451,7 +451,7 @@ } } -EXPORT_C static TEglConfigMatchType GetMatchType(EGLint aAttrib, TEglConfigMatchRule aMatchRule) +LOCAL_C TEglConfigMatchType GetMatchType(EGLint aAttrib, TEglConfigMatchRule aMatchRule) { const TConfigMatchRuleItem* curMatchRuleItem = KConfigMatchRules[aMatchRule]; @@ -779,7 +779,7 @@ return ETrue; } -EXPORT_C void CTestEglSession::CreateWindowSurfaceAndMakeCurrentL(EGLConfig aConfig, RWindow& aWindow, TBool aVgAlphaFormatPre, EGLenum aBindAPI, TInt aRenderVersionNumber) +EXPORT_C void CTestEglSession::CreateWindowSurfaceAndMakeCurrentL(EGLConfig aConfig, RWindow& aWindow, TBool aVgAlphaFormatPre, EGLenum aBindAPI, TInt aRenderVersionNumber, EGLint* aAttribList) { ASSERT_EQUALS(iSurface, EGL_NO_SURFACE); ASSERT_EQUALS(iContext, EGL_NO_CONTEXT); @@ -787,12 +787,16 @@ ASSERT_EGL_TRUE(eglBindAPI(aBindAPI)); // Create a Window surface from the native image - const EGLint* windowAttribs = (aVgAlphaFormatPre && aBindAPI == EGL_OPENVG_API) ? KPixmapAttribsVgAlphaFormatPre : KPixmapAttribsNone; + const EGLint* windowAttribs = aAttribList; + if(!windowAttribs) + { + windowAttribs = (aVgAlphaFormatPre && aBindAPI == EGL_OPENVG_API) ? KPixmapAttribsVgAlphaFormatPre : KPixmapAttribsNone; + } iSurface = eglCreateWindowSurface(iDisplay, aConfig, &aWindow, windowAttribs); ASSERT_EGL_TRUE(iSurface != EGL_NO_SURFACE); // 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, aConfig, EGL_NO_CONTEXT, attrib_list_ctx); @@ -930,7 +934,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, aConfig, EGL_NO_CONTEXT, attrib_list_ctx); @@ -1049,7 +1053,7 @@ ASSERT_EGL_TRUE(iSurface != EGL_NO_SURFACE); // 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); @@ -1080,7 +1084,7 @@ ASSERT_EGL_TRUE(iSurface != EGL_NO_SURFACE); // 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, aConfig, EGL_NO_CONTEXT, attrib_list_ctx); @@ -1716,7 +1720,7 @@ return EFalse; } } - if(aExtension & KEGL_NOK__private__signal_sync) + if(aExtension & KEGL_NOK__private__signal_sync || extensionName.Compare(KEglNokPrivateSignalSync)==0) { TBool bFoundExtensionEGL_NOK__private__signal_sync = FindExtensionStringL(EIsEGL,KEglNokPrivateSignalSync); if (!bFoundExtensionEGL_NOK__private__signal_sync) @@ -1725,7 +1729,7 @@ return EFalse; } } - if(aExtension & KEGL_NOKIA_swap_buffers) + if(aExtension & KEGL_NOKIA_swap_buffers || extensionName.Compare(KEglNokiaSwapBuffers)==0) { TBool bFoundExtensionEGL_NOKIA_swap_buffer = FindExtensionStringL(EIsEGL,KEglNokiaSwapBuffers); if (!bFoundExtensionEGL_NOKIA_swap_buffer) @@ -1735,7 +1739,7 @@ } } #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE - if(aExtension & KEGL_SYMBIAN_image_preserved) + if(aExtension & KEGL_SYMBIAN_image_preserved || extensionName.Compare(KEglSymbianImagePreserved) { TBool bFoundExtensionEGL_SYMBIAN_image_preserved = FindExtensionStringL(EIsEGL,KEglSymbianImagePreserved); if (!bFoundExtensionEGL_SYMBIAN_image_preserved) @@ -1745,7 +1749,24 @@ } } #endif //SYMBIAN_GRAPHICS_EGL_SGIMAGELITE - + if(aExtension & KEGL_NOK_image_endpoint || extensionName.Compare(KEglNokiaImageEndpoint)==0) + { + TBool bFoundExtensionEGL_NOK_image_endpoint = FindExtensionStringL(EIsEGL,KEglNokiaImageEndpoint); + if (!bFoundExtensionEGL_NOK_image_endpoint) + { + // The extension is not supported + return EFalse; + } + } + if(aExtension & KEGL_NOK_surface_scaling || extensionName.Compare(KEglNokiaSurfaceScaling)==0) + { + TBool bFoundExtensionEGL_NOK_surface_scaling = FindExtensionStringL(EIsEGL,KEglNokiaSurfaceScaling); + if (!bFoundExtensionEGL_NOK_surface_scaling) + { + // The extension is not supported + return EFalse; + } + } return ETrue; } @@ -1840,7 +1861,6 @@ TBitmapUtil bmpUtil(bitmap); bmpUtil.Begin(TPoint(0,0)); for (TInt colIndex = 0; colIndex < width; ++colIndex) - { bmpUtil.SetPos(TPoint(colIndex, 0)); for (TInt rowIndex =0; rowIndex < height; ++rowIndex)