Revert "[3.0] Remove an exception for gl feature from framework-tizen"
[platform/core/uifw/dali-adaptor.git] / adaptors / tizen / native-render-surface-tizen.cpp
index 3799b0e..7f1b1a7 100644 (file)
@@ -74,7 +74,6 @@ NativeRenderSurface::NativeRenderSurface(Dali::PositionSize positionSize,
 {
   ecore_wl_init(NULL);
   CreateNativeRenderable();
-  setenv( "EGL_PLATFORM", "tbm", 1 );
 }
 
 NativeRenderSurface::~NativeRenderSurface()
@@ -120,7 +119,6 @@ Any NativeRenderSurface::GetSurface()
 void NativeRenderSurface::InitializeEgl( EglInterface& egl )
 {
   DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
-  unsetenv( "EGL_PLATFORM" );
 
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
 
@@ -186,9 +184,10 @@ void NativeRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
   eglImpl.SwapBuffers();
 
-  {
-    ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition );
+  // flush gl instruction queue
+  glAbstraction.Flush();
 
+  {
     if( tbm_surface_queue_can_acquire( mImpl->mTbmQueue, 1 ) )
     {
       if( tbm_surface_queue_acquire( mImpl->mTbmQueue, &mImpl->mConsumeSurface ) != TBM_SURFACE_QUEUE_ERROR_NONE )
@@ -203,9 +202,14 @@ void NativeRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract
   if( mImpl->mRenderNotification )
   {
     // use notification trigger
-    // Tell the event-thread to render the tbm_surface
+    // Tell the event-thread to render the pixmap
     mImpl->mRenderNotification->Trigger();
   }
+  else
+  {
+    // FIXME
+  }
+
 }
 
 void NativeRenderSurface::StopRender()
@@ -255,7 +259,6 @@ void NativeRenderSurface::CreateNativeRenderable()
 
 void NativeRenderSurface::ReleaseSurface()
 {
-  ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition );
   if( mImpl->mConsumeSurface )
   {
     tbm_surface_queue_release( mImpl->mTbmQueue, mImpl->mConsumeSurface );