#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
-namespace
-{
-const char* FRAGMENT_PREFIX = "#extension GL_OES_EGL_image_external:require\n";
-const char* SAMPLER_TYPE = "samplerExternalOES";
-} // namespace
-
namespace Dali
{
namespace Internal
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
+bool NativeImageSourceAndroid::ApplyNativeFragmentShader(std::string& shader)
{
- return nullptr;
+ return false;
}
const char* NativeImageSourceAndroid::GetCustomSamplerTypename() const
return false;
}
+void NativeImageSourceAndroid::SetResourceDestructionCallback(EventThreadCallback* callback)
+{
+ mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
+}
+
} // namespace Adaptor
} // namespace Internal