Revert "[Tizen] Revert "Make to use right egl image extension name in the glsl 3.x""
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / tizen / native-image-source-impl-tizen.cpp
index e98ddae..16a5720 100644 (file)
@@ -38,8 +38,7 @@ namespace Adaptor
 {
 namespace
 {
-const char* FRAGMENT_PREFIX = "#extension GL_OES_EGL_image_external:require\n";
-const char* SAMPLER_TYPE    = "samplerExternalOES";
+const char* SAMPLER_TYPE = "samplerExternalOES";
 
 // clang-format off
 tbm_format FORMATS_BLENDING_REQUIRED[] = {
@@ -75,7 +74,8 @@ NativeImageSourceTizen* NativeImageSourceTizen::New(uint32_t width, uint32_t hei
 }
 
 NativeImageSourceTizen::NativeImageSourceTizen(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
-: mWidth(width),
+: mCustomFragmentPrefix(),
+  mWidth(width),
   mHeight(height),
   mOwnTbmSurface(false),
   mTbmSurface(NULL),
@@ -94,6 +94,8 @@ NativeImageSourceTizen::NativeImageSourceTizen(uint32_t width, uint32_t height,
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
 
+  mCustomFragmentPrefix = mEglGraphics->GetEglImageExtensionString();
+
   mTbmSurface = GetSurfaceFromAny(nativeImageSource);
 
   if(mTbmSurface != NULL)
@@ -462,7 +464,7 @@ void NativeImageSourceTizen::PrepareTexture()
 
 const char* NativeImageSourceTizen::GetCustomFragmentPrefix() const
 {
-  return FRAGMENT_PREFIX;
+  return mCustomFragmentPrefix;
 }
 
 const char* NativeImageSourceTizen::GetCustomSamplerTypename() const