Add API for setting resource destruction callback
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / macos / native-image-source-impl-mac.cpp
index 5b80733..cc99b1b 100644 (file)
@@ -45,7 +45,8 @@ NativeImageSourceCocoa::NativeImageSourceCocoa(
   unsigned int                        height,
   Dali::NativeImageSource::ColorDepth depth,
   Any                                 nativeImageSource)
-: mImage(MakeRef<CGImageRef>(nullptr))
+: mImage(MakeRef<CGImageRef>(nullptr)),
+  mResourceDestructionCallback()
 {
   DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
   DALI_ASSERT_ALWAYS(nativeImageSource.Empty());
@@ -154,9 +155,9 @@ void NativeImageSourceCocoa::PrepareTexture()
 {
 }
 
-const char* NativeImageSourceCocoa::GetCustomFragmentPrefix() const
+bool NativeImageSourceCocoa::ApplyNativeFragmentShader(std::string& shader)
 {
-  return nullptr;
+  return false;
 }
 
 const char* NativeImageSourceCocoa::GetCustomSamplerTypename() const
@@ -205,4 +206,9 @@ bool NativeImageSourceCocoa::ReleaseBuffer()
   return false;
 }
 
+void NativeImageSourceCocoa::SetResourceDestructionCallback(EventThreadCallback* callback)
+{
+  mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
+}
+
 } // namespace Dali::Internal::Adaptor