[3.0] NativeImageSource with tbm_surface for tizen 3.0 wayland
[platform/core/uifw/dali-adaptor.git] / adaptors / x11 / native-image-source-impl-x.cpp
index b58057b..84d7887 100644 (file)
@@ -273,6 +273,20 @@ bool NativeImageSource::EncodeToFile(const std::string& filename) const
   return false;
 }
 
+void NativeImageSource::SetNativeImageSource( Any nativeImageSource )
+{
+  mPixmap = GetPixmapFromAny( nativeImageSource );
+
+  if (mPixmap)
+  {
+    // we don't own the pixmap
+    mOwnPixmap = false;
+
+    // find out the pixmap width / height and color depth
+    GetPixmapDetails();
+  }
+}
+
 bool NativeImageSource::GlExtensionCreate()
 {
   // if the image existed previously delete it.