guestrendering/guestegl/src/guestegl.cpp
branchbug235_bringup_0
changeset 50 a7fcb1229472
parent 47 75fe64f1ad18
child 59 d9b81aebba7b
equal deleted inserted replaced
49:3b4f7e9d873f 50:a7fcb1229472
   314 	
   314 	
   315 	}
   315 	}
   316 
   316 
   317 const char* CGuestEGL::eglQueryString(EGLDisplay aDisplay, EGLint aName)
   317 const char* CGuestEGL::eglQueryString(EGLDisplay aDisplay, EGLint aName)
   318 	{
   318 	{
   319 	return NULL; // stub code
   319 	RemoteFunctionCallData rfcdata;
       
   320 	EglRFC eglApiData( rfcdata );
       
   321 	eglApiData.Init( EglRFC::EeglQueryString );
       
   322 	eglApiData.AppendEGLDisplay(aDisplay);
       
   323 	eglApiData.AppendEGLint(aName);
       
   324 	TEglThreadState* threadState = CVghwUtils::CreateThreadState();
       
   325 	EGLBoolean result = EGL_FALSE;
       
   326 	if (threadState)
       
   327 		{
       
   328 		/*
       
   329 		 * This command is pointless at the moment.  We actually want the host
       
   330 		 * to return a string, not a boolean.  The serialization interface does
       
   331 		 * not currently support the returning of strings from the host side,
       
   332 		 * so there is no way to get back the result of the query properly.
       
   333 		 * 
       
   334 		 * We should improve the guest/host interface to add this support.  Then
       
   335 		 * this code can be made "useful".  At the moment, returning true means
       
   336 		 * the host knows about the extension and wants to reply with a non-NULL
       
   337 		 * string. 
       
   338 		 */
       
   339 		result = threadState->ExecEglBooleanCmd(eglApiData);
       
   340 		if (result == EGL_FALSE)
       
   341 			{
       
   342 			return NULL;
       
   343 			}
       
   344 		}
       
   345 		
       
   346 	switch (aName)
       
   347 		{
       
   348 		case EGL_CLIENT_APIS:
       
   349 			return "OpenVG OpenGL_ES OpenGL_ES2";
       
   350 		case EGL_EXTENSIONS:
       
   351 			return "KHR_reusable_sync EGL_SYMBIAN_COMPOSITION";
       
   352 		case EGL_VENDOR:
       
   353 			return "Symbian Foundation";
       
   354 		case EGL_VERSION:
       
   355 			return "1.4 guestegl";
       
   356 		}
       
   357 	
       
   358 	return NULL;
   320 	}
   359 	}
   321 // FAISALMEMON END OF STUB CODE
   360 // FAISALMEMON END OF STUB CODE
   322 
   361 
   323 CGuestEGL::CGuestEGL() :
   362 CGuestEGL::CGuestEGL() :
   324 		iEglSyncExtension(NULL)
   363 		iEglSyncExtension(NULL)