Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / android / native-image-source-queue-impl-android.cpp
index 7043979..79e009f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/integration-api/gl-defines.h>
 
 // INTERNAL INCLUDES
+#include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 #include <dali/internal/graphics/gles/egl-graphics.h>
-#include <dali/internal/adaptor/common/adaptor-impl.h>
 
 namespace Dali
 {
-
 namespace Internal
 {
-
 namespace Adaptor
 {
+NativeImageSourceQueueAndroid* NativeImageSourceQueueAndroid::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
+{
+  NativeImageSourceQueueAndroid* image = new NativeImageSourceQueueAndroid(width, height, colorFormat, nativeImageSourceQueue);
+  return image;
+}
 
-namespace
+NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
+: mWidth(width),
+  mHeight(height)
 {
+  DALI_LOG_ERROR("NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid: Not supported\n");
+}
 
-const char* FRAGMENT_PREFIX = "\n";
-const char* SAMPLER_TYPE = "sampler2D";
+NativeImageSourceQueueAndroid::~NativeImageSourceQueueAndroid()
+{
+}
 
+Any NativeImageSourceQueueAndroid::GetNativeImageSourceQueue() const
+{
+  return Any();
 }
 
-NativeImageSourceQueueAndroid* NativeImageSourceQueueAndroid::New( uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
+void NativeImageSourceQueueAndroid::SetSize(uint32_t width, uint32_t height)
 {
-  NativeImageSourceQueueAndroid* image = new NativeImageSourceQueueAndroid( width, height, depth, nativeImageSourceQueue );
-  return image;
+  mWidth  = width;
+  mHeight = height;
 }
 
-NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid( uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
-: mWidth( width ),
-  mHeight( height )
+void NativeImageSourceQueueAndroid::IgnoreSourceImage()
 {
-  DALI_LOG_ERROR( "NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid: Not supported\n" );
 }
 
-NativeImageSourceQueueAndroid::~NativeImageSourceQueueAndroid()
+bool NativeImageSourceQueueAndroid::CanDequeueBuffer()
 {
+  return false;
 }
 
-Any NativeImageSourceQueueAndroid::GetNativeImageSourceQueue() const
+uint8_t* NativeImageSourceQueueAndroid::DequeueBuffer(uint32_t& width, uint32_t& height, uint32_t& stride)
 {
-  return Any();
+  return nullptr;
 }
 
-void NativeImageSourceQueueAndroid::SetSize( uint32_t width, uint32_t height )
+bool NativeImageSourceQueueAndroid::EnqueueBuffer(uint8_t* buffer)
 {
-  mWidth = width;
-  mHeight = height;
+  return false;
 }
 
-bool NativeImageSourceQueueAndroid::GlExtensionCreate()
+bool NativeImageSourceQueueAndroid::CreateResource()
 {
   return true;
 }
 
-void NativeImageSourceQueueAndroid::GlExtensionDestroy()
+void NativeImageSourceQueueAndroid::DestroyResource()
 {
 }
 
@@ -90,23 +98,33 @@ void NativeImageSourceQueueAndroid::PrepareTexture()
 {
 }
 
-const char* NativeImageSourceQueueAndroid::GetCustomFragmentPreFix()
+bool NativeImageSourceQueueAndroid::ApplyNativeFragmentShader(std::string& shader)
 {
-  return FRAGMENT_PREFIX;
+  return false;
 }
 
-const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename()
+const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename() const
 {
-  return SAMPLER_TYPE;
+  return nullptr;
 }
 
-int NativeImageSourceQueueAndroid::GetEglImageTextureTarget()
+int NativeImageSourceQueueAndroid::GetTextureTarget() const
 {
-  return 0;
+  return GL_TEXTURE_2D;
+}
+
+Any NativeImageSourceQueueAndroid::GetNativeImageHandle() const
+{
+  return nullptr;
+}
+
+bool NativeImageSourceQueueAndroid::SourceChanged() const
+{
+  return false;
 }
 
 } // namespace Adaptor
 
-} // namespace internal
+} // namespace Internal
 
 } // namespace Dali