[Tizen] Add API for setting resource destruction callback
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / ubuntu-x11 / native-image-source-impl-x.cpp
index 54ad246..72a90d0 100755 (executable)
@@ -93,7 +93,8 @@ NativeImageSourceX::NativeImageSourceX( uint32_t width, uint32_t height, Dali::N
   mBlendingRequired( false ),
   mColorDepth( depth ),
   mEglImageKHR( NULL ),
-  mEglImageExtensions( NULL )
+  mEglImageExtensions( NULL ),
+  mResourceDestructionCallback()
 {
   DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
 
@@ -425,6 +426,11 @@ bool NativeImageSourceX::ReleaseBuffer()
   return false;
 }
 
+void NativeImageSourceX::SetResourceDestructionCallback(EventThreadCallback* callback)
+{
+  mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
+}
+
 } // namespace Adaptor
 
 } // namespace internal