[Tizen] Add API for setting resource destruction callback
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / tizen / native-image-source-impl-tizen.h
index 502ad7f..77d3bd5 100755 (executable)
@@ -172,6 +172,11 @@ public:
    */
   bool ReleaseBuffer() override;
 
+  /**
+   * @copydoc Dali::NativeImageSource::SetResourceDestructionCallback()
+   */
+  void SetResourceDestructionCallback(EventThreadCallback* callback) override;
+
 private:
 
   /**
@@ -195,7 +200,6 @@ private:
   void DestroySurface();
 
 private:
-
   uint32_t mWidth;                        ///< image width
   uint32_t mHeight;                       ///< image height
   bool mOwnTbmSurface;                        ///< Whether we created pixmap or not
@@ -209,6 +213,7 @@ private:
   bool mSetSource;
   mutable Dali::Mutex mMutex;
   bool mIsBufferAcquired;                      ///< Whether AcquireBuffer is called
+  std::unique_ptr<EventThreadCallback> mResourceDestructionCallback;
 };
 
 } // namespace Adaptor