Fixed compile. This change now provides alpha support for the integration of guestegl with the host bug235_bringup_0
authorFaisal Memon <faisal.memon@nokia.com>
Fri, 24 Sep 2010 11:24:11 +0100
branchbug235_bringup_0
changeset 41 2110890eb027
parent 40 eaa1315a8556
child 42 2865e884ac3b
Fixed compile. This change now provides alpha support for the integration of guestegl with the host
guestrendering/guestegl/inc/guestegl.h
guestrendering/guestegl/src/guestegl.cpp
--- a/guestrendering/guestegl/inc/guestegl.h	Fri Sep 24 10:52:02 2010 +0100
+++ b/guestrendering/guestegl/inc/guestegl.h	Fri Sep 24 11:24:11 2010 +0100
@@ -16,6 +16,7 @@
 #ifndef __GUEST__EGL_H
 #define __GUEST__EGL_H
 
+#include <graphics/surfacemanager.h>
 
 // CLASS DECLARATION
 typedef enum
--- a/guestrendering/guestegl/src/guestegl.cpp	Fri Sep 24 10:52:02 2010 +0100
+++ b/guestrendering/guestegl/src/guestegl.cpp	Fri Sep 24 11:24:11 2010 +0100
@@ -224,9 +224,7 @@
 	window = (RWindow*) aNativeWindow;
 	TSize size = window->Size();
 	
-	EGLSurface newSurfaceId = EGL_NO_SURFACE;
 	TSurfaceInfo* surfaceInfo = NULL;
-	EGLint error = EGL_BAD_DISPLAY;
 	TSurfaceId surfaceId;
 
     RSurfaceManager::TSurfaceCreationAttributesBuf buf;
@@ -237,7 +235,7 @@
     attributes.iPixelFormat = EUidPixelFormatARGB_8888;  // this is a guess; either query or hardcode to match syborg
     attributes.iStride = 4 * size.iWidth;          // Number of bytes between start of one line and start of next
     attributes.iOffsetToFirstBuffer = 0;
-    attributes.iAlignment = EPageAligned;                      // alignment, 1,2,4,8,16,32,64 byte aligned or EPageAligned
+    attributes.iAlignment = RSurfaceManager::EPageAligned;                      // alignment, 1,2,4,8,16,32,64 byte aligned or EPageAligned
     attributes.iHintCount=0;  
     attributes.iSurfaceHints = NULL;
     attributes.iOffsetBetweenBuffers = 0;
@@ -259,7 +257,6 @@
 				surfaceInfo->iConfigId = aConfig;
 				surfaceInfo->iSurfaceManager.Open();
 				surfaceInfo->iSurfaceManager.CreateSurface(buf, surfaceId);
-				(*pDispInfo)->iSurfaceMap.Insert(surfaceId, surfaceInfo);
 				(void) surfaceInfo->iSurfaceManager.MapSurface(surfaceId, surfaceInfo->iChunk);
 				RemoteFunctionCallData rfcdata;
 				EglRFC eglApiData( rfcdata );
@@ -273,6 +270,7 @@
 				eglApiData.AppendEGLint(1000); // horizontalPitch arbitrary
 				eglApiData.AppendEGLint(1000); // verticalPitch arbitrary
 				surfaceInfo->iHostSurfaceId = aThreadState.ExecEglSurfaceCmd(eglApiData); // todo check if is valid
+				(*pDispInfo)->iSurfaceMap.Insert(surfaceInfo->iHostSurfaceId, surfaceInfo);
 				EglInternalFunction_CreateSurface(aThreadState, aDisplay, surfaceInfo->iHostSurfaceId, aConfig, window, *surfaceInfo);
 				surfaceInfo->iSurfaceUpdateSession.Connect();
 				TSurfaceConfiguration surfaceConfig;