- CreateNativeRenderable();
- setenv( "EGL_PLATFORM", "tbm", 1 );
+ if( surface.Empty() )
+ {
+ CreateNativeRenderable();
+ }
+ else
+ {
+ // check we have a valid type
+ DALI_ASSERT_ALWAYS( ( surface.GetType() == typeid (tbm_surface_queue_h) ) && "Surface type is invalid" );
+ mTbmQueue = AnyCast< tbm_surface_queue_h >( surface );
+ }