#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
+
+namespace
+{
+const char* FRAGMENT_PREFIX = "#extension GL_OES_EGL_image_external:require\n";
+const char* SAMPLER_TYPE = "samplerExternalOES";
+}
+
+
namespace Dali
{
mBlendingRequired( false ),
mColorDepth( depth ),
mEglImageKHR( NULL ),
- mEglImageExtensions( NULL )
+ mEglImageExtensions( NULL ),
+ mResourceDestructionCallback()
{
DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
return true;
}
-bool NativeImageSourceAndroid::GlExtensionCreate()
+bool NativeImageSourceAndroid::CreateResource()
{
// if the image existed previously delete it.
if( mEglImageKHR != NULL )
{
- GlExtensionDestroy();
+ DestroyResource();
}
DALI_ASSERT_ALWAYS( mPixmap );
return mEglImageKHR != NULL;
}
-void NativeImageSourceAndroid::GlExtensionDestroy()
+void NativeImageSourceAndroid::DestroyResource()
{
mEglImageExtensions->DestroyImageKHR( mEglImageKHR );
{
}
+int NativeImageSourceAndroid::GetTextureTarget() const
+{
+ return GL_TEXTURE_2D;
+}
+
+const char* NativeImageSourceAndroid::GetCustomFragmentPrefix() const
+{
+ return nullptr;
+}
+
+const char* NativeImageSourceAndroid::GetCustomSamplerTypename() const
+{
+ return nullptr;
+}
+
+
void* NativeImageSourceAndroid::GetPixmapFromAny(Any pixmap) const
{
if( pixmap.Empty() )
return false;
}
+void NativeImageSourceAndroid::SetResourceDestructionCallback(EventThreadCallback* callback)
+{
+ mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
+}
+
} // namespace Adaptor
} // namespace internal