[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-native-image-source.cpp
index 2277014..d2be2d7 100755 (executable)
 // CLASS HEADER
 #include <dali/public-api/adaptor-framework/native-image-source.h>
 
+// INTERNAL INCLUDES
+#include "test-native-image-source.h"
+
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/any.h>
 
 namespace Dali
 {
 
+const char* NativeImageSourceTest::GetCustomFragmentPrefix()
+{
+  return "#extension GL_OES_EGL_image_external:require\n";
+}
+
 NativeImageSourcePtr NativeImageSource::New( unsigned int width, unsigned int height, ColorDepth depth )
 {
   Any empty;
@@ -62,12 +70,12 @@ bool NativeImageSource::IsColorDepthSupported( ColorDepth colorDepth )
   return false;
 }
 
-bool NativeImageSource::GlExtensionCreate()
+bool NativeImageSource::CreateResource()
 {
   return false;
 }
 
-void NativeImageSource::GlExtensionDestroy()
+void NativeImageSource::DestroyResource()
 {
 }
 
@@ -95,6 +103,32 @@ bool NativeImageSource::RequiresBlending() const
   return false;
 }
 
+int NativeImageSource::GetTextureTarget() const
+{
+  return 0;
+}
+
+bool NativeImageSource::ApplyNativeFragmentShader(std::string& shader)
+{
+  shader = Dali::NativeImageSourceTest::GetCustomFragmentPrefix() + shader;
+  return true;
+}
+
+const char* NativeImageSource::GetCustomSamplerTypename() const
+{
+  return "";
+}
+
+Any NativeImageSource::GetNativeImageHandle() const
+{
+  return nullptr;
+}
+
+bool NativeImageSource::SourceChanged() const
+{
+  return false;
+}
+
 NativeImageInterface::Extension* NativeImageSource::GetExtension()
 {
   return NULL;