[3.0] Set alpha to wayland window by Application::New(..., OPAQUE or Transparent) 96/51196/1 accepted/tizen/mobile/20151109.063452 accepted/tizen/tv/20151109.063501 accepted/tizen/wearable/20151109.063508 submit/tizen/20151109.023959
authortaeyoon <taeyoon0.lee@samsung.com>
Wed, 4 Nov 2015 05:13:33 +0000 (14:13 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Thu, 5 Nov 2015 07:25:14 +0000 (16:25 +0900)
  - Use ecore_wl_window_alpha_set()

Change-Id: Ie5e978c9c87f64f81b1c31250c43c4cb62184f8f

adaptors/wayland/window-render-surface-wl.cpp

index 7eb0dc8..2c6884c 100644 (file)
@@ -108,6 +108,15 @@ void WindowRenderSurface::CreateEglSurface( EglInterface& eglIf )
 
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );
 
+  if( mColorDepth == COLOR_DEPTH_32 )
+  {
+    ecore_wl_window_alpha_set( mWlWindow, true );
+  }
+  else
+  {
+    ecore_wl_window_alpha_set( mWlWindow, false );
+  }
+
   // create the EGL surface
   mWlSurface = ecore_wl_window_surface_create(mWlWindow);
   mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
@@ -132,6 +141,15 @@ bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& egl )
     mEglWindow = NULL;
   }
 
+  if( mColorDepth == COLOR_DEPTH_32 )
+  {
+    ecore_wl_window_alpha_set( mWlWindow, true );
+  }
+  else
+  {
+    ecore_wl_window_alpha_set( mWlWindow, false );
+  }
+
   mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
 
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );