[Tizen] Add FreeReleasedBuffers method to NativeImageSourceQueue
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / android / native-image-source-queue-impl-android.cpp
index db9ba4f..ff0addc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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
 {
-
-namespace
-{
-
-const char* FRAGMENT_PREFIX = "\n";
-const char* SAMPLER_TYPE = "sampler2D";
-
-}
-
-NativeImageSourceQueueAndroid* NativeImageSourceQueueAndroid::New( uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
+NativeImageSourceQueueAndroid* NativeImageSourceQueueAndroid::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
-  NativeImageSourceQueueAndroid* image = new NativeImageSourceQueueAndroid( width, height, depth, nativeImageSourceQueue );
+  NativeImageSourceQueueAndroid* image = new NativeImageSourceQueueAndroid(width, height, colorFormat, nativeImageSourceQueue);
   return image;
 }
 
-NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid( uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
-: mWidth( width ),
-  mHeight( height )
+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" );
+  DALI_LOG_ERROR("NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid: Not supported\n");
 }
 
 NativeImageSourceQueueAndroid::~NativeImageSourceQueueAndroid()
@@ -66,9 +55,9 @@ Any NativeImageSourceQueueAndroid::GetNativeImageSourceQueue() const
   return Any();
 }
 
-void NativeImageSourceQueueAndroid::SetSize( uint32_t width, uint32_t height )
+void NativeImageSourceQueueAndroid::SetSize(uint32_t width, uint32_t height)
 {
-  mWidth = width;
+  mWidth  = width;
   mHeight = height;
 }
 
@@ -76,6 +65,25 @@ void NativeImageSourceQueueAndroid::IgnoreSourceImage()
 {
 }
 
+bool NativeImageSourceQueueAndroid::CanDequeueBuffer()
+{
+  return false;
+}
+
+uint8_t* NativeImageSourceQueueAndroid::DequeueBuffer(uint32_t& width, uint32_t& height, uint32_t& stride)
+{
+  return nullptr;
+}
+
+bool NativeImageSourceQueueAndroid::EnqueueBuffer(uint8_t* buffer)
+{
+  return false;
+}
+
+void NativeImageSourceQueueAndroid::FreeReleasedBuffers()
+{
+}
+
 bool NativeImageSourceQueueAndroid::CreateResource()
 {
   return true;
@@ -94,14 +102,14 @@ void NativeImageSourceQueueAndroid::PrepareTexture()
 {
 }
 
-const char* NativeImageSourceQueueAndroid::GetCustomFragmentPrefix() const
+bool NativeImageSourceQueueAndroid::ApplyNativeFragmentShader(std::string& shader)
 {
-  return FRAGMENT_PREFIX;
+  return false;
 }
 
 const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename() const
 {
-  return SAMPLER_TYPE;
+  return nullptr;
 }
 
 int NativeImageSourceQueueAndroid::GetTextureTarget() const
@@ -121,6 +129,6 @@ bool NativeImageSourceQueueAndroid::SourceChanged() const
 
 } // namespace Adaptor
 
-} // namespace internal
+} // namespace Internal
 
 } // namespace Dali