// set the initial values before render thread starts
mSurface = adaptorInterfaces.GetRenderSurfaceInterface();
- mDisplayConnection = Dali::DisplayConnection::New();
+ if( mSurface )
+ {
+ mDisplayConnection = Dali::DisplayConnection::New( mSurface->GetSurfaceType() );
+ }
+ else
+ {
+ mDisplayConnection = Dali::DisplayConnection::New();
+ }
}
RenderHelper::~RenderHelper()
void RenderHelper::ReplaceSurface( RenderSurface* newSurface )
{
+ mSurface->DestroyEglSurface(*mEGL);
+
// This is designed for replacing pixmap surfaces, but should work for window as well
// we need to delete the egl surface and renderable (pixmap / window)
// Then create a new pixmap/window and new egl surface