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-queue-impl-tizen.cpp
index 8028efd..7f72939 100644 (file)
@@ -38,8 +38,7 @@ namespace
 {
 #define TBM_SURFACE_QUEUE_SIZE 3
 
-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
 int FORMATS_BLENDING_REQUIRED[] = {
@@ -73,7 +72,8 @@ NativeImageSourceQueueTizen* NativeImageSourceQueueTizen::New(uint32_t width, ui
 }
 
 NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
-: mMutex(),
+: mCustomFragmentPrefix(),
+  mMutex(),
   mWidth(width),
   mHeight(height),
   mTbmQueue(NULL),
@@ -89,6 +89,8 @@ NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t width, uint32_
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
 
+  mCustomFragmentPrefix = mEglGraphics->GetEglImageExtensionString();
+
   mTbmQueue = GetSurfaceFromAny(nativeImageSourceQueue);
 
   if(mTbmQueue != NULL)
@@ -280,7 +282,7 @@ void NativeImageSourceQueueTizen::PrepareTexture()
 
 const char* NativeImageSourceQueueTizen::GetCustomFragmentPrefix() const
 {
-  return FRAGMENT_PREFIX;
+  return mCustomFragmentPrefix;
 }
 
 const char* NativeImageSourceQueueTizen::GetCustomSamplerTypename() const