Guest EGL change so that newly created surfaces are registered with the Window Server. (Probably needed by ALF) bug235_bringup_0
authorJon Medhurst
Fri, 22 Oct 2010 14:10:40 +0100
branchbug235_bringup_0
changeset 65 3e31350c2490
parent 64 5023b77b78d4
child 66 07904b9e3bd7
Guest EGL change so that newly created surfaces are registered with the Window Server. (Probably needed by ALF)
guestrendering/guestegl/src/guestegl.cpp
--- a/guestrendering/guestegl/src/guestegl.cpp	Fri Oct 22 13:37:16 2010 +0100
+++ b/guestrendering/guestegl/src/guestegl.cpp	Fri Oct 22 14:10:40 2010 +0100
@@ -33,8 +33,13 @@
 
 // FAISALMEMON STUB CODE
 #define EGL_CHECK_ERROR(a, b, c)      /* This does no checking; just a stub */
-void CGuestEGL::EglInternalFunction_DestroyWindowSurface(TSurfaceInfo&)
+void CGuestEGL::EglInternalFunction_DestroyWindowSurface(TSurfaceInfo& aSurfaceInfo)
 	{
+	RWindow* window = aSurfaceInfo.iNativeWindow;
+	TInt screen = window->ScreenNumber();
+	RWsSession* session = window->Session();
+	session->UnregisterSurface(screen, aSurfaceInfo.iSurfaceId);
+
 	return; // stub code
 	}
 
@@ -300,6 +305,11 @@
 				surfaceInfo->iSurfaceUpdateSession.Connect();
 				TSurfaceConfiguration surfaceConfig;
 				surfaceConfig.SetSurfaceId(surfaceInfo->iSurfaceId);
+
+				TInt screen = window->ScreenNumber();
+				RWsSession& session = *window->Session();
+				session.RegisterSurface(screen, surfaceInfo->iSurfaceId);
+
 				window->SetBackgroundSurface(surfaceConfig, ETrue);
 				}
 			CVghwUtils::SwitchFromVghwHeap(threadHeap);