[Tizen] Add API for setting resource destruction callback
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / ubuntu-x11 / native-image-source-impl-x.h
index 62b7410..7c52239 100755 (executable)
@@ -130,27 +130,27 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetTextureTarget()
    */
-  virtual int GetTextureTarget() const;
+  int GetTextureTarget() const override;
 
   /**
    * @copydoc Dali::NativeImageSource::GetCustomFragmentPrefix()
    */
-  virtual const char* GetCustomFragmentPrefix() const;
+  const char* GetCustomFragmentPrefix() const override;
 
   /**
    * @copydoc Dali::NativeImageSource::GetCustomSamplerTypename()
    */
-  virtual const char* GetCustomSamplerTypename() const;
+  const char* GetCustomSamplerTypename() const override;
 
   /**
    * @copydoc Dali::NativeImageSource::GetNativeImageHandle()
    */
-  virtual Any GetNativeImageHandle() const;
+  Any GetNativeImageHandle() const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SourceChanged()
    */
-  virtual bool SourceChanged() const;
+  bool SourceChanged() const override;
 
 
   /**
@@ -171,6 +171,11 @@ public:
    */
   bool ReleaseBuffer() override;
 
+  /**
+   * @copydoc Dali::NativeImageSource::SetResourceDestructionCallback()
+   */
+  void SetResourceDestructionCallback(EventThreadCallback* callback) override;
+
 private:
 
   /**
@@ -220,6 +225,7 @@ private:
   Dali::NativeImageSource::ColorDepth mColorDepth;  ///< color depth of image
   void* mEglImageKHR;                         ///< From EGL extension
   EglImageExtensions* mEglImageExtensions;    ///< The EGL Image Extensions
+  std::unique_ptr<EventThreadCallback> mResourceDestructionCallback;
 };
 
 } // namespace Adaptor