openvg/openvgrefimplementation/sfopenvg/vgi/vgi.cpp
branchEGL_MERGE
changeset 180 f767bd5f4cfc
parent 118 6aeef2faff80
equal deleted inserted replaced
119:5f371025658c 180:f767bd5f4cfc
   136 		
   136 		
   137 		eglChooseConfig(egl.iEgldisplay, s_configAttribs, &eglconfig, 1, &numconfigs);
   137 		eglChooseConfig(egl.iEgldisplay, s_configAttribs, &eglconfig, 1, &numconfigs);
   138 		__ASSERT_ALWAYS(eglGetError() == EGL_SUCCESS,User::Invariant());
   138 		__ASSERT_ALWAYS(eglGetError() == EGL_SUCCESS,User::Invariant());
   139 		__ASSERT_ALWAYS(numconfigs == 1,User::Invariant());
   139 		__ASSERT_ALWAYS(numconfigs == 1,User::Invariant());
   140 		
   140 		
   141 		TSize maxSize(MAX_WIDTH,MAX_HEIGHT);
   141 		TSize maxSize(aSize.iWidth, aSize.iHeight);
   142 	    
   142 	    
   143 		egl.iPixmap = new(ELeave) CFbsBitmap();
   143 		egl.iPixmap = new(ELeave) CFbsBitmap();
   144 		egl.iPixmap->Create( maxSize, EColor16MA );
   144 		egl.iPixmap->Create( maxSize, EColor16MA );
   145 		 
   145 		 
   146 		egl.iEglsurface = eglCreatePixmapSurface(egl.iEgldisplay, eglconfig, (EGLNativePixmapType)egl.iPixmap, NULL);
   146 		egl.iEglsurface = eglCreatePixmapSurface(egl.iEgldisplay, eglconfig, (EGLNativePixmapType)egl.iPixmap, NULL);
   180 	TEgl& egl = GetEglInstance();
   180 	TEgl& egl = GetEglInstance();
   181 	eglDestroyContext(egl.iEgldisplay, egl.iEglcontext);
   181 	eglDestroyContext(egl.iEgldisplay, egl.iEglcontext);
   182 	eglDestroySurface(egl.iEgldisplay, egl.iEglsurface);
   182 	eglDestroySurface(egl.iEgldisplay, egl.iEglsurface);
   183 	delete egl.iPixmap;
   183 	delete egl.iPixmap;
   184 	ReleaseTls();
   184 	ReleaseTls();
       
   185 	eglReleaseThread();
   185 }
   186 }
   186 
   187 
   187 VGI_API_CALL TInt VGISymbianResize( TSize aSize )
   188 VGI_API_CALL TInt VGISymbianResize( TSize aSize )
   188 	{
   189 	{
   189 	return VGI_OK;
   190 	return VGI_OK;