egl/egltest/src/egltest_image_multiprocess.cpp
changeset 103 2717213c588a
parent 36 01a6848ebfd7
child 116 171fae344dd4
--- a/egl/egltest/src/egltest_image_multiprocess.cpp	Fri Jun 11 14:58:47 2010 +0300
+++ b/egl/egltest/src/egltest_image_multiprocess.cpp	Tue Jun 22 15:21:29 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-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"
@@ -518,7 +518,10 @@
         ASSERT_EQUALS(rSgImageLocal.Open(sgImageId), KErrNone);
         }
 
-	INFO_PRINTF2(_L("Process %d, Creating an EGLImage from the shared RSgImage"),aIdx);
+	// Wait for both processes to reach this point
+    Rendezvous(aIdx);
+    
+    INFO_PRINTF2(_L("Process %d, Creating an EGLImage from the shared RSgImage"),aIdx);
 	CleanupClosePushL(rSgImageLocal);
 	EGLImageKHR eglImageLocal = iEglSess->eglCreateImageKhrL(iDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, &rSgImageLocal, KEglImageAttribsPreservedTrue);
 	ASSERT_EGL_TRUE(eglImageLocal != EGL_NO_IMAGE_KHR);
@@ -695,6 +698,9 @@
         ASSERT_EQUALS(rSgImageLocal.Open(sgImageId),KErrNone);
         }
 
+	// Wait for both processes to reach this point
+    Rendezvous(aIdx);
+
 	INFO_PRINTF2(_L("Process %d, Creating an EGLImage from the shared RSgImage"),aIdx);
 	CleanupClosePushL(rSgImageLocal);
 	EGLImageKHR eglImageLocal = iEglSess->eglCreateImageKhrL(iDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, &rSgImageLocal, KEglImageAttribsPreservedTrue);
@@ -2106,6 +2112,9 @@
     	ASSERT_EQUALS(rSgImageLocal.Open(sgImageId),KErrNone);
         }
 
+	// Wait for both processes to reach this point
+    Rendezvous(aIdx);
+    
     INFO_PRINTF2(_L("Process %d, Creating an EGLImage from the shared RSgImage"),aIdx);
 	CleanupClosePushL(rSgImageLocal);
 	EGLImageKHR eglImageLocal = iEglSess->eglCreateImageKhrL(iDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, &rSgImageLocal, KEglImageAttribsPreservedTrue);