return image;
}
-NativeImageSourceAndroid::NativeImageSourceAndroid(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
+NativeImageSourceAndroid::NativeImageSourceAndroid( uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource )
: mWidth(width),
- mHeight(height),
+ mHeight(height ),
mOwnPixmap(true),
mPixmap(NULL),
mBlendingRequired(false),
mColorDepth(depth),
mEglImageKHR(NULL),
- mEglImageExtensions(NULL)
+ mEglImageExtensions(NULL),
+ mResourceDestructionCallback()
{
DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
mEglImageExtensions->DestroyImageKHR(mEglImageKHR);
mEglImageKHR = NULL;
+
+ if(mResourceDestructionCallback)
+ {
+ mResourceDestructionCallback->Trigger();
+ }
}
uint32_t NativeImageSourceAndroid::TargetTexture()
return GL_TEXTURE_2D;
}
-const char* NativeImageSourceAndroid::GetCustomFragmentPrefix() const
-{
- return nullptr;
-}
-
bool NativeImageSourceAndroid::ApplyNativeFragmentShader(std::string& shader)
{
return false;
return false;
}
+void NativeImageSourceAndroid::SetResourceDestructionCallback(EventThreadCallback* callback)
+{
+ mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
+}
+
} // namespace Adaptor
} // namespace Internal