X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fimaging%2Fandroid%2Fnative-image-source-impl-android.cpp;h=bb6693f42da1becebfd8780c0af54b73aca4b649;hb=06e1bc7147010573ecfad8977280220ed03843a7;hp=e06af8eeba6cf95034db056667b36cb9c8bc4d5e;hpb=a8616553984c8f7ccfd0ab1946367aa8d4f7e6ba;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/imaging/android/native-image-source-impl-android.cpp b/dali/internal/imaging/android/native-image-source-impl-android.cpp index e06af8e..bb6693f 100644 --- a/dali/internal/imaging/android/native-image-source-impl-android.cpp +++ b/dali/internal/imaging/android/native-image-source-impl-android.cpp @@ -56,15 +56,16 @@ NativeImageSourceAndroid* NativeImageSourceAndroid::New(uint32_t width, uint32_t 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()); @@ -285,6 +286,11 @@ void NativeImageSourceAndroid::DestroyResource() mEglImageExtensions->DestroyImageKHR(mEglImageKHR); mEglImageKHR = NULL; + + if(mResourceDestructionCallback) + { + mResourceDestructionCallback->Trigger(); + } } uint32_t NativeImageSourceAndroid::TargetTexture() @@ -390,6 +396,11 @@ bool NativeImageSourceAndroid::ReleaseBuffer() return false; } +void NativeImageSourceAndroid::SetResourceDestructionCallback(EventThreadCallback* callback) +{ + mResourceDestructionCallback = std::unique_ptr(callback); +} + } // namespace Adaptor } // namespace Internal