Updates for NativeImageInterface 46/238946/7
authorDavid Steele <david.steele@samsung.com>
Fri, 17 Jul 2020 16:53:05 +0000 (17:53 +0100)
committerDavid Steele <david.steele@samsung.com>
Wed, 22 Jul 2020 12:32:13 +0000 (13:32 +0100)
Change-Id: Ic3876022a30503861172cff8c496b23eb0035d9c

24 files changed:
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-native-image.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-native-image.h
dali/devel-api/adaptor-framework/native-image-source-queue.cpp
dali/devel-api/adaptor-framework/native-image-source-queue.h
dali/internal/imaging/android/native-image-source-impl-android.cpp
dali/internal/imaging/android/native-image-source-impl-android.h
dali/internal/imaging/android/native-image-source-queue-impl-android.cpp
dali/internal/imaging/android/native-image-source-queue-impl-android.h
dali/internal/imaging/common/native-bitmap-buffer-impl.cpp
dali/internal/imaging/common/native-bitmap-buffer-impl.h
dali/internal/imaging/common/native-image-source-impl.h
dali/internal/imaging/common/native-image-source-queue-impl.h
dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp
dali/internal/imaging/tizen/native-image-source-impl-tizen.h
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h
dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h
dali/internal/imaging/windows/native-image-source-impl-win.cpp
dali/internal/imaging/windows/native-image-source-impl-win.h
dali/public-api/adaptor-framework/native-image-source.cpp
dali/public-api/adaptor-framework/native-image-source.h

index ee6c17a15bc10b66db6010ecfee4bb11db3b261d..5fdc5c3429cd4db8dc32b837d0ea8c59bc78ac0f 100644 (file)
@@ -31,26 +31,10 @@ TestNativeImagePointer TestNativeImage::New(uint32_t width, uint32_t height)
 TestNativeImage::TestNativeImage(uint32_t width, uint32_t height)
 : mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0),createResult(true)
 {
-  mExtension = new TestNativeImageExtension();
 }
 
 TestNativeImage::~TestNativeImage()
 {
 }
 
-
-TestNativeImageNoExtPointer TestNativeImageNoExt::New(uint32_t width, uint32_t height)
-{
-  return new TestNativeImageNoExt(width, height);
-}
-
-TestNativeImageNoExt::TestNativeImageNoExt(uint32_t width, uint32_t height)
-: mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0),createResult(true)
-{
-}
-
-TestNativeImageNoExt::~TestNativeImageNoExt()
-{
-}
-
 } // namespace dali
index 0c215b76cfab90c5e240ed51fb9f9550f3410412..89d509551995cdd1b378439cc3e39293da7323a2 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
-#include <dali/devel-api/images/native-image-interface-extension.h>
 #include <dali/integration-api/gl-defines.h>
 
 namespace Dali
 {
 class TestNativeImage;
-class TestNativeImageNoExt;
 typedef IntrusivePtr<TestNativeImage> TestNativeImagePointer;
-typedef IntrusivePtr<TestNativeImageNoExt> TestNativeImageNoExtPointer;
-
-class DALI_CORE_API TestNativeImageExtension: public Dali::NativeImageInterface::Extension
-{
-public:
-  inline const char* GetCustomFragmentPreFix(){return "#extension GL_OES_EGL_image_external:require\n";}
-  inline const char* GetCustomSamplerTypename(){return "samplerExternalOES";}
-
-  inline int32_t GetEglImageTextureTarget(){return GL_TEXTURE_EXTERNAL_OES;}
-
-};
 
 class DALI_CORE_API TestNativeImage : public Dali::NativeImageInterface
 {
@@ -46,14 +33,21 @@ public:
   static TestNativeImagePointer New(uint32_t width, uint32_t height);
 
   inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
-  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
-  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
-  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 0;};
+  inline virtual bool CreateResource() { ++mExtensionCreateCalls; return createResult;};
+  inline virtual void DestroyResource() { ++mExtensionDestroyCalls; };
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return mTargetTextureError;};
   inline virtual void PrepareTexture() {};
   inline virtual uint32_t GetWidth() const {return mWidth;};
   inline virtual uint32_t GetHeight() const {return mHeight;};
   inline virtual bool RequiresBlending() const {return true;};
-  inline virtual Dali::NativeImageInterface::Extension* GetExtension() {return mExtension;}
+  inline virtual int GetTextureTarget() const {return GL_TEXTURE_EXTERNAL_OES;};
+  inline virtual const char* GetCustomFragmentPrefix() const {return "#extension GL_OES_EGL_image_external:require\n";};
+  inline const char* GetCustomSamplerTypename() const override { return "samplerExternalOES"; };
+
+  inline Any GetNativeImageHandle() const override { return nullptr; };
+  inline bool SourceChanged() const override { return false; };
+
+  inline virtual Dali::NativeImageInterface::Extension* GetExtension() {return nullptr;}
 
 private:
   TestNativeImage(uint32_t width, uint32_t height);
@@ -65,38 +59,11 @@ public:
   int32_t mExtensionCreateCalls;
   int32_t mExtensionDestroyCalls;
   int32_t mTargetTextureCalls;
-
+  uint32_t mTargetTextureError=0u;
   bool createResult;
-  TestNativeImageExtension* mExtension;
 };
 
 
-class DALI_CORE_API TestNativeImageNoExt : public Dali::NativeImageInterface
-{
-public:
-  static TestNativeImageNoExtPointer New(uint32_t width, uint32_t height);
-
-  inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
-  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
-  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
-  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
-  inline virtual void PrepareTexture() {};
-  inline virtual uint32_t GetWidth() const {return mWidth;};
-  inline virtual uint32_t GetHeight() const {return mHeight;};
-  inline virtual bool RequiresBlending() const {return true;};
-
-private:
-  TestNativeImageNoExt(uint32_t width, uint32_t height);
-  virtual ~TestNativeImageNoExt();
-
-  uint32_t mWidth;
-  uint32_t mHeight;
-public:
-  int32_t mExtensionCreateCalls;
-  int32_t mExtensionDestroyCalls;
-  int32_t mTargetTextureCalls;
-  bool createResult;
-};
 
 } // Dali
 
index acb10d50f06cbd6af6dfcab89e7e28e60edbc9a0..404157375a61660675a6af989cc148b8f0d9b7b1 100755 (executable)
@@ -61,14 +61,14 @@ void NativeImageSourceQueue::IgnoreSourceImage()
   mImpl->IgnoreSourceImage();
 }
 
-bool NativeImageSourceQueue::GlExtensionCreate()
+bool NativeImageSourceQueue::CreateResource()
 {
-  return mImpl->GlExtensionCreate();
+  return mImpl->CreateResource();
 }
 
-void NativeImageSourceQueue::GlExtensionDestroy()
+void NativeImageSourceQueue::DestroyResource()
 {
-  mImpl->GlExtensionDestroy();
+  mImpl->DestroyResource();
 }
 
 uint32_t NativeImageSourceQueue::TargetTexture()
@@ -96,6 +96,31 @@ bool NativeImageSourceQueue::RequiresBlending() const
   return mImpl->RequiresBlending();
 }
 
+int NativeImageSourceQueue::GetTextureTarget() const
+{
+  return mImpl->GetTextureTarget();
+}
+
+const char* NativeImageSourceQueue::GetCustomFragmentPrefix() const
+{
+  return mImpl->GetCustomFragmentPrefix();
+}
+
+const char* NativeImageSourceQueue::GetCustomSamplerTypename() const
+{
+  return mImpl->GetCustomSamplerTypename();
+}
+
+Any NativeImageSourceQueue::GetNativeImageHandle() const
+{
+  return mImpl->GetNativeImageHandle();
+}
+
+bool NativeImageSourceQueue::SourceChanged() const
+{
+  return mImpl->SourceChanged();
+}
+
 NativeImageInterface::Extension* NativeImageSourceQueue::GetExtension()
 {
   return mImpl->GetNativeImageInterfaceExtension();
index 0e0290303fdefa50421657a7947d3bbaa7091ee8..0848079b6e9ee5c62501972b0d63690eafeabbe3 100755 (executable)
@@ -111,42 +111,68 @@ public:
    */
   void IgnoreSourceImage();
 
+  /**
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
+   */
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
+
+
 private:   // native image
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  virtual bool GlExtensionCreate();
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  virtual void GlExtensionDestroy();
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
    */
-  virtual uint32_t TargetTexture();
+  uint32_t TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::PrepareTexture()
    */
-  virtual void PrepareTexture();
+  void PrepareTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetWidth()
    */
-  virtual uint32_t GetWidth() const;
+  uint32_t GetWidth() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetHeight()
    */
-  virtual uint32_t GetHeight() const;
+  uint32_t GetHeight() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::RequiresBlending()
    */
-  virtual bool RequiresBlending() const;
+  bool RequiresBlending() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  bool SourceChanged() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
index 19312b5a899c57e2f83f4f2da0955fd20c7805f7..2a64bfb13c487c8d96ff0c9c94378e7eba491b9c 100755 (executable)
 #include <dali/internal/graphics/gles/egl-graphics.h>
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 
+
+namespace
+{
+const char* FRAGMENT_PREFIX = "#extension GL_OES_EGL_image_external:require\n";
+const char* SAMPLER_TYPE = "samplerExternalOES";
+}
+
+
 namespace Dali
 {
 
@@ -217,12 +225,12 @@ bool NativeImageSourceAndroid::IsColorDepthSupported( Dali::NativeImageSource::C
   return true;
 }
 
-bool NativeImageSourceAndroid::GlExtensionCreate()
+bool NativeImageSourceAndroid::CreateResource()
 {
   // if the image existed previously delete it.
   if( mEglImageKHR != NULL )
   {
-    GlExtensionDestroy();
+    DestroyResource();
   }
 
   DALI_ASSERT_ALWAYS( mPixmap );
@@ -261,7 +269,7 @@ bool NativeImageSourceAndroid::GlExtensionCreate()
   return mEglImageKHR != NULL;
 }
 
-void NativeImageSourceAndroid::GlExtensionDestroy()
+void NativeImageSourceAndroid::DestroyResource()
 {
   mEglImageExtensions->DestroyImageKHR( mEglImageKHR );
 
@@ -279,6 +287,22 @@ void NativeImageSourceAndroid::PrepareTexture()
 {
 }
 
+int NativeImageSourceAndroid::GetTextureTarget() const
+{
+  return GL_TEXTURE_2D;
+}
+
+const char* NativeImageSourceAndroid::GetCustomFragmentPrefix() const
+{
+  return nullptr;
+}
+
+const char* NativeImageSourceAndroid::GetCustomSamplerTypename() const
+{
+  return nullptr;
+}
+
+
 void* NativeImageSourceAndroid::GetPixmapFromAny(Any pixmap) const
 {
   if( pixmap.Empty() )
index 3b68f1c2f333534e626e65765839a40920e4feb9..bd3e10186f940590eece541c8582c6688e7677cc 100755 (executable)
@@ -84,14 +84,14 @@ public:
   ~NativeImageSourceAndroid() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionCreate()
+   * @copydoc Dali::NativeImageSource::CreateResource()
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageSource::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
@@ -127,6 +127,37 @@ public:
     return mBlendingRequired;
   }
 
+  /**
+   * @copydoc Dali::NativeImageSource::GetTargetTexture()
+   */
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override
+  {
+    return GetNativeImageSource();
+  }
+
+  /**
+   * @copydoc Dali::NativeImageSource::SourceChanged()
+   */
+  bool SourceChanged() const override
+  {
+    return false;
+  }
+
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
    */
index 45905bdc288a4ddb4e1997a4a3fcb5b469835e30..db9ba4f9f5dd29d9e405b5f6b8698801de0e4e30 100644 (file)
@@ -76,12 +76,12 @@ void NativeImageSourceQueueAndroid::IgnoreSourceImage()
 {
 }
 
-bool NativeImageSourceQueueAndroid::GlExtensionCreate()
+bool NativeImageSourceQueueAndroid::CreateResource()
 {
   return true;
 }
 
-void NativeImageSourceQueueAndroid::GlExtensionDestroy()
+void NativeImageSourceQueueAndroid::DestroyResource()
 {
 }
 
@@ -94,19 +94,29 @@ void NativeImageSourceQueueAndroid::PrepareTexture()
 {
 }
 
-const char* NativeImageSourceQueueAndroid::GetCustomFragmentPreFix()
+const char* NativeImageSourceQueueAndroid::GetCustomFragmentPrefix() const
 {
   return FRAGMENT_PREFIX;
 }
 
-const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename()
+const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename() const
 {
   return SAMPLER_TYPE;
 }
 
-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
index be5b8b6d649856ab1151acb381892a5fb1f58c94..d0570d163793f0e25aebae4e48b3e9b97ba47df1 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/images/native-image-interface-extension.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/imaging/common/native-image-source-queue-impl.h>
@@ -39,7 +38,7 @@ class EglImageExtensions;
 /**
  * Dali internal NativeImageSourceQueue.
  */
-class NativeImageSourceQueueAndroid: public Internal::Adaptor::NativeImageSourceQueue, public NativeImageInterface::Extension
+class NativeImageSourceQueueAndroid: public Internal::Adaptor::NativeImageSourceQueue
 {
 public:
 
@@ -75,14 +74,14 @@ public:
   ~NativeImageSourceQueueAndroid() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
@@ -123,23 +122,33 @@ public:
    */
   NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
   {
-    return this;
+    return nullptr;
   }
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomFragmentPreFix()
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
    */
-  const char* GetCustomFragmentPreFix() override;
+  const char* GetCustomFragmentPrefix() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomSamplerTypename()
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
    */
-  const char* GetCustomSamplerTypename() override;
+  const char* GetCustomSamplerTypename() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetEglImageTextureTarget()
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
    */
-  int GetEglImageTextureTarget() override;
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  bool SourceChanged() const override;
 
 private:
 
index 1741803a62250fa2fdf92d86fa97146cf6666c62..3aa9442995883e47d369f37de0d84965fb1e11f2 100644 (file)
@@ -79,12 +79,12 @@ void NativeBitmapBuffer::Write( const unsigned char *src, size_t size )
   mBuffer->Write( src, size ); // Write will cause LocklessBuffer to switch to the other buffer
 }
 
-bool NativeBitmapBuffer::GlExtensionCreate()
+bool NativeBitmapBuffer::CreateResource()
 {
   return true;
 }
 
-void NativeBitmapBuffer::GlExtensionDestroy()
+void NativeBitmapBuffer::DestroyResource()
 {
 }
 
@@ -108,6 +108,31 @@ bool NativeBitmapBuffer::RequiresBlending() const
   return Pixel::HasAlpha( mPixelFormat );
 }
 
+int NativeBitmapBuffer::GetTextureTarget() const
+{
+  return 0;
+}
+
+const char* NativeBitmapBuffer::GetCustomFragmentPrefix() const
+{
+  return nullptr;
+}
+
+const char* NativeBitmapBuffer::GetCustomSamplerTypename() const
+{
+  return nullptr;
+}
+
+Any NativeBitmapBuffer::GetNativeImageHandle() const
+{
+  return nullptr;
+}
+
+bool NativeBitmapBuffer::SourceChanged() const
+{
+  return false;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index f1ff5fc5eb1ca7ef12e90e210a0800072e4dd73b..6a4fc4305bcc369ab92cbd4949d36c71b5ced032 100644 (file)
@@ -72,39 +72,65 @@ public:
 
 public:
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  virtual bool GlExtensionCreate();
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  virtual void GlExtensionDestroy();
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
    */
-  virtual unsigned int TargetTexture();
+  unsigned int TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::PrepareTexture()
    */
-  virtual void PrepareTexture();
+  void PrepareTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetWidth()
    */
-  virtual unsigned int GetWidth() const;
+  unsigned int GetWidth() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetHeight()
    */
-  virtual unsigned int GetHeight() const;
+  unsigned int GetHeight() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::RequiresBlending()
    */
-  virtual bool RequiresBlending() const;
+  bool RequiresBlending() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::RequiresBlending()
+   */
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  bool SourceChanged() const override;
+
 
 private:
   NativeBitmapBuffer( const NativeBitmapBuffer& );             ///< not defined
index 0833f51f6886d96a920448d211e03ff32a3bce00..d0a80107b47c91ba33ec8b1d8e8d5b23f65792ad 100755 (executable)
@@ -79,14 +79,14 @@ public:
   virtual ~NativeImageSource() = default;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionCreate()
+   * @copydoc Dali::NativeImageSource::CreateResource()
    */
-  virtual bool GlExtensionCreate() = 0;
+  virtual bool CreateResource() = 0;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageSource::DestroyResource()
    */
-  virtual void GlExtensionDestroy() = 0;
+  virtual void DestroyResource() = 0;
 
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
@@ -113,6 +113,31 @@ public:
    */
   virtual bool RequiresBlending() const = 0;
 
+  /**
+   * @copydoc Dali::NativeImageSource::GetTextureTarget()
+   */
+  virtual int GetTextureTarget() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetCustomFragmentPrefix()
+   */
+  virtual const char* GetCustomFragmentPrefix() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetCustomSamplerTypename()
+   */
+  virtual const char* GetCustomSamplerTypename() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetNativeImageHandle()
+   */
+  virtual Any GetNativeImageHandle() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageSource::SourceChanged()
+   */
+  virtual bool SourceChanged() const = 0;
+
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
    */
index eeb87f20a2f2bbbd352582f2f4812b63fc99225f..e7638c5a157d983b79364c557f62123b67cd22e6 100755 (executable)
@@ -63,14 +63,14 @@ public:
   virtual ~NativeImageSourceQueue() = default;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  virtual bool GlExtensionCreate() = 0;
+  virtual bool CreateResource() = 0;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  virtual void GlExtensionDestroy() = 0;
+  virtual void DestroyResource() = 0;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
@@ -97,6 +97,31 @@ public:
    */
   virtual bool RequiresBlending() const = 0;
 
+  /**
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
+   */
+  virtual int GetTextureTarget() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  virtual const char* GetCustomFragmentPrefix() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  virtual const char* GetCustomSamplerTypename() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  virtual Any GetNativeImageHandle() const = 0;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  virtual bool SourceChanged() const = 0;
+
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
    */
index 096944ce92ed3cba67f86f74fe76924d21f5fa08..4c8621d6bb1d223d9f320ca6ca26b110b62eefe1 100755 (executable)
@@ -400,7 +400,7 @@ bool NativeImageSourceTizen::IsColorDepthSupported( Dali::NativeImageSource::Col
   return false;
 }
 
-bool NativeImageSourceTizen::GlExtensionCreate()
+bool NativeImageSourceTizen::CreateResource()
 {
   // casting from an unsigned int to a void *, which should then be cast back
   // to an unsigned int in the driver.
@@ -418,7 +418,7 @@ bool NativeImageSourceTizen::GlExtensionCreate()
   return mEglImageKHR != NULL;
 }
 
-void NativeImageSourceTizen::GlExtensionDestroy()
+void NativeImageSourceTizen::DestroyResource()
 {
   Dali::Mutex::ScopedLock lock( mMutex );
   if( mEglImageKHR )
@@ -443,7 +443,7 @@ void NativeImageSourceTizen::PrepareTexture()
   {
     void* eglImage = mEglImageKHR;
 
-    if( GlExtensionCreate() )
+    if( CreateResource() )
     {
       TargetTexture();
     }
@@ -454,21 +454,31 @@ void NativeImageSourceTizen::PrepareTexture()
   }
 }
 
-const char* NativeImageSourceTizen::GetCustomFragmentPreFix()
+const char* NativeImageSourceTizen::GetCustomFragmentPrefix() const
 {
   return FRAGMENT_PREFIX;
 }
 
-const char* NativeImageSourceTizen::GetCustomSamplerTypename()
+const char* NativeImageSourceTizen::GetCustomSamplerTypename() const
 {
   return SAMPLER_TYPE;
 }
 
-int NativeImageSourceTizen::GetEglImageTextureTarget()
+int NativeImageSourceTizen::GetTextureTarget() const
 {
   return GL_TEXTURE_EXTERNAL_OES;
 }
 
+Any NativeImageSourceTizen::GetNativeImageHandle() const
+{
+  return GetNativeImageSource();
+}
+
+bool NativeImageSourceTizen::SourceChanged() const
+{
+  return false;
+}
+
 bool NativeImageSourceTizen::CheckBlending( tbm_format format )
 {
   if( mTbmFormat != format )
index 9264a25dd330e34cf0bf5368b4cfa926e98affd7..502ad7f4167aab3ca21376ec0c1f73b78ac21aff 100755 (executable)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <tbm_surface.h>
-#include <dali/devel-api/images/native-image-interface-extension.h>
 #include <dali/devel-api/threading/mutex.h>
 #include <dali/public-api/common/dali-vector.h>
 
@@ -43,7 +42,7 @@ class EglImageExtensions;
 /**
  * Dali internal NativeImageSource.
  */
-class NativeImageSourceTizen: public Internal::Adaptor::NativeImageSource, public NativeImageInterface::Extension
+class NativeImageSourceTizen: public Internal::Adaptor::NativeImageSource
 {
 public:
 
@@ -87,14 +86,14 @@ public:
   ~NativeImageSourceTizen() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionCreate()
+   * @copydoc Dali::NativeImageSource::CreateResource()
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageSource::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
@@ -131,27 +130,37 @@ public:
   }
 
   /**
-   * @copydoc Dali::NativeImageInterface::GetExtension()
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
    */
-  NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
-  {
-    return this;
-  }
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomFragmentPreFix()
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
    */
-  const char* GetCustomFragmentPreFix() override;
+  int GetTextureTarget() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomSamplerTypename()
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
    */
-  const char* GetCustomSamplerTypename() override;
+  Any GetNativeImageHandle() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetEglImageTextureTarget()
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
    */
-  int GetEglImageTextureTarget() override;
+  bool SourceChanged() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetExtension()
+   */
+  NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
+  {
+    return nullptr;
+  }
 
   /**
    * @copydoc Dali::Internal::Adaptor::NativeImageSource::AcquireBuffer()
index f95ee1a00cd1969ffb30518d8089b85ca7f62217..9bf842c345fcdc09faf8b69afd768d523be6afe6 100644 (file)
@@ -209,7 +209,7 @@ void NativeImageSourceQueueTizen::IgnoreSourceImage()
   }
 }
 
-bool NativeImageSourceQueueTizen::GlExtensionCreate()
+bool NativeImageSourceQueueTizen::CreateResource()
 {
   mEglImageExtensions = mEglGraphics->GetImageExtensions();
   DALI_ASSERT_DEBUG( mEglImageExtensions );
@@ -217,7 +217,7 @@ bool NativeImageSourceQueueTizen::GlExtensionCreate()
   return true;
 }
 
-void NativeImageSourceQueueTizen::GlExtensionDestroy()
+void NativeImageSourceQueueTizen::DestroyResource()
 {
   Dali::Mutex::ScopedLock lock( mMutex );
 
@@ -279,21 +279,33 @@ void NativeImageSourceQueueTizen::PrepareTexture()
   }
 }
 
-const char* NativeImageSourceQueueTizen::GetCustomFragmentPreFix()
+const char* NativeImageSourceQueueTizen::GetCustomFragmentPrefix() const
 {
   return FRAGMENT_PREFIX;
 }
 
-const char* NativeImageSourceQueueTizen::GetCustomSamplerTypename()
+const char* NativeImageSourceQueueTizen::GetCustomSamplerTypename() const
 {
   return SAMPLER_TYPE;
 }
 
-int NativeImageSourceQueueTizen::GetEglImageTextureTarget()
+int NativeImageSourceQueueTizen::GetTextureTarget() const
 {
   return GL_TEXTURE_EXTERNAL_OES;
 }
 
+Any NativeImageSourceQueueTizen::GetNativeImageHandle() const
+{
+  return nullptr;
+}
+
+bool NativeImageSourceQueueTizen::SourceChanged() const
+{
+  return false;
+}
+
+
+
 void NativeImageSourceQueueTizen::ResetEglImageList()
 {
   if( mConsumeSurface )
index 7f163522161f14abdca9dcbc129c7bb64ac3afc1..f82059e8f4fe7aa81b7ee72dda2137d4b31dc97f 100755 (executable)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/images/native-image-interface-extension.h>
 #include <dali/devel-api/threading/mutex.h>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <tbm_surface.h>
@@ -43,7 +42,7 @@ class EglImageExtensions;
 /**
  * Dali internal NativeImageSource.
  */
-class NativeImageSourceQueueTizen: public Internal::Adaptor::NativeImageSourceQueue, public NativeImageInterface::Extension
+class NativeImageSourceQueueTizen: public Internal::Adaptor::NativeImageSourceQueue
 {
 public:
 
@@ -79,14 +78,14 @@ public:
   ~NativeImageSourceQueueTizen() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
@@ -123,27 +122,37 @@ public:
   }
 
   /**
-   * @copydoc Dali::NativeImageInterface::GetExtension()
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
    */
-  NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
-  {
-    return this;
-  }
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomFragmentPreFix()
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
    */
-  const char* GetCustomFragmentPreFix() override;
+  int GetTextureTarget() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomSamplerTypename()
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
    */
-  const char* GetCustomSamplerTypename() override;
+  Any GetNativeImageHandle() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetEglImageTextureTarget()
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
    */
-  int GetEglImageTextureTarget() override;
+  bool SourceChanged() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetExtension()
+   */
+  NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
+  {
+    return nullptr;
+  }
 
 private:
 
index c222d3b2f06e6715480f5207a4f88b3687981b00..384844db97f6fdd03abcf0dac969324e62deb5ba 100755 (executable)
@@ -282,12 +282,12 @@ bool NativeImageSourceX::IsColorDepthSupported( Dali::NativeImageSource::ColorDe
   return true;
 }
 
-bool NativeImageSourceX::GlExtensionCreate()
+bool NativeImageSourceX::CreateResource()
 {
   // if the image existed previously delete it.
   if (mEglImageKHR != NULL)
   {
-    GlExtensionDestroy();
+    DestroyResource();
   }
 
   // casting from an unsigned int to a void *, which should then be cast back
@@ -299,7 +299,7 @@ bool NativeImageSourceX::GlExtensionCreate()
   return mEglImageKHR != NULL;
 }
 
-void NativeImageSourceX::GlExtensionDestroy()
+void NativeImageSourceX::DestroyResource()
 {
   mEglImageExtensions->DestroyImageKHR(mEglImageKHR);
 
@@ -350,6 +350,31 @@ int NativeImageSourceX::GetPixelDepth(Dali::NativeImageSource::ColorDepth depth)
   }
 }
 
+int NativeImageSourceX::GetTextureTarget() const
+{
+  return GL_TEXTURE_2D;
+}
+
+const char* NativeImageSourceX::GetCustomFragmentPrefix() const
+{
+  return nullptr;
+}
+
+const char* NativeImageSourceX::GetCustomSamplerTypename() const
+{
+  return nullptr;
+}
+
+Any NativeImageSourceX::GetNativeImageHandle() const
+{
+  return Any(mPixmap);
+}
+
+bool NativeImageSourceX::SourceChanged() const
+{
+  return false;
+}
+
 Ecore_X_Pixmap NativeImageSourceX::GetPixmapFromAny(Any pixmap) const
 {
   if (pixmap.Empty())
index 1f37eaa89e6f64f5f87a0166ff6edaf54727f76e..62b74106a9008e4c505e2688f7cafa278ffb6eef 100755 (executable)
@@ -84,14 +84,14 @@ public:
   ~NativeImageSourceX() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionCreate()
+   * @copydoc Dali::NativeImageSource::CreateResource()
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageSource::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
@@ -127,6 +127,32 @@ public:
     return mBlendingRequired;
   }
 
+  /**
+   * @copydoc Dali::NativeImageSource::GetTextureTarget()
+   */
+  virtual int GetTextureTarget() const;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetCustomFragmentPrefix()
+   */
+  virtual const char* GetCustomFragmentPrefix() const;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetCustomSamplerTypename()
+   */
+  virtual const char* GetCustomSamplerTypename() const;
+
+  /**
+   * @copydoc Dali::NativeImageSource::GetNativeImageHandle()
+   */
+  virtual Any GetNativeImageHandle() const;
+
+  /**
+   * @copydoc Dali::NativeImageSource::SourceChanged()
+   */
+  virtual bool SourceChanged() const;
+
+
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
    */
index 648848717ebe602fdbb874eb4fb8e104eace8a06..98edebaea0f663ae25d16200365cbf43a5db9b34 100644 (file)
@@ -77,12 +77,12 @@ void NativeImageSourceQueueX::IgnoreSourceImage()
 {
 }
 
-bool NativeImageSourceQueueX::GlExtensionCreate()
+bool NativeImageSourceQueueX::CreateResource()
 {
   return true;
 }
 
-void NativeImageSourceQueueX::GlExtensionDestroy()
+void NativeImageSourceQueueX::DestroyResource()
 {
 }
 
@@ -95,21 +95,31 @@ void NativeImageSourceQueueX::PrepareTexture()
 {
 }
 
-const char* NativeImageSourceQueueX::GetCustomFragmentPreFix()
+const char* NativeImageSourceQueueX::GetCustomFragmentPrefix() const
 {
   return FRAGMENT_PREFIX;
 }
 
-const char* NativeImageSourceQueueX::GetCustomSamplerTypename()
+const char* NativeImageSourceQueueX::GetCustomSamplerTypename() const
 {
   return SAMPLER_TYPE;
 }
 
-int NativeImageSourceQueueX::GetEglImageTextureTarget()
+int NativeImageSourceQueueX::GetTextureTarget() const
 {
   return 0;
 }
 
+Any NativeImageSourceQueueX::GetNativeImageHandle() const
+{
+  return nullptr;
+}
+
+bool NativeImageSourceQueueX::SourceChanged() const
+{
+  return false;
+}
+
 } // namespace Adaptor
 
 } // namespace internal
index 689f733f9c80665910f768f0c235b34ff473862e..7bc1ce2125c51e30466cc88532f7afd111a773d5 100755 (executable)
@@ -19,7 +19,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/images/native-image-interface-extension.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/imaging/common/native-image-source-queue-impl.h>
@@ -39,7 +38,7 @@ class EglImageExtensions;
 /**
  * Dali internal NativeImageSourceQueue.
  */
-class NativeImageSourceQueueX: public Internal::Adaptor::NativeImageSourceQueue, public NativeImageInterface::Extension
+class NativeImageSourceQueueX: public Internal::Adaptor::NativeImageSourceQueue
 {
 public:
 
@@ -75,14 +74,14 @@ public:
   ~NativeImageSourceQueueX() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
@@ -119,27 +118,37 @@ public:
   }
 
   /**
-   * @copydoc Dali::NativeImageInterface::GetExtension()
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
    */
-  NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
-  {
-    return this;
-  }
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomFragmentPreFix()
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
    */
-  const char* GetCustomFragmentPreFix() override;
+  const char* GetCustomSamplerTypename() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomSamplerTypename()
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
    */
-  const char* GetCustomSamplerTypename() override;
+  Any GetNativeImageHandle() const override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetEglImageTextureTarget()
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
    */
-  int GetEglImageTextureTarget() override;
+  bool SourceChanged() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetExtension()
+   */
+  NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
+  {
+    return nullptr;
+  }
 
 private:
 
index aabcdff10063ca580605e4f507033565dbfc5ee3..ad4851bcbebe01420ff73303683ab3de491e0ebb 100755 (executable)
@@ -137,12 +137,12 @@ bool NativeImageSourceWin::IsColorDepthSupported( Dali::NativeImageSource::Color
   return true;
 }
 
-bool NativeImageSourceWin::GlExtensionCreate()
+bool NativeImageSourceWin::CreateResource()
 {
   // if the image existed previously delete it.
   if (mEglImageKHR != NULL)
   {
-    GlExtensionDestroy();
+    DestroyResource();
   }
 
   // casting from an unsigned int to a void *, which should then be cast back
@@ -154,7 +154,7 @@ bool NativeImageSourceWin::GlExtensionCreate()
   return mEglImageKHR != NULL;
 }
 
-void NativeImageSourceWin::GlExtensionDestroy()
+void NativeImageSourceWin::DestroyResource()
 {
   mEglImageExtensions->DestroyImageKHR(mEglImageKHR);
 
@@ -230,6 +230,31 @@ void NativeImageSourceWin::GetPixmapDetails()
 {
 }
 
+const char* NativeImageSourceWin::GetCustomFragmentPrefix() const
+{
+  return nullptr;
+}
+
+const char* NativeImageSourceWin::GetCustomSamplerTypename() const
+{
+  return nullptr;
+}
+
+int NativeImageSourceWin::GetTextureTarget() const
+{
+  return GL_TEXTURE_2D;
+}
+
+Any NativeImageSourceWin::GetNativeImageHandle() const
+{
+  return mPixmap;
+}
+
+bool NativeImageSourceWin::SourceChanged() const
+{
+  return false;
+}
+
 uint8_t* NativeImageSourceWin::AcquireBuffer( uint16_t& width, uint16_t& height, uint16_t& stride )
 {
   return NULL;
index bc2a2571d52e230a2266d540a83515e20ab60eaf..d8b13a042e98f9f678f50bae5ad98c748b7409f2 100755 (executable)
@@ -79,14 +79,14 @@ public:
   ~NativeImageSourceWin() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionCreate()
+   * @copydoc Dali::NativeImageSource::CreateResource()
    */
-  bool GlExtensionCreate() override;
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageSource::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageSource::DestroyResource()
    */
-  void GlExtensionDestroy() override;
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageSource::TargetTexture()
@@ -122,6 +122,31 @@ public:
     return mBlendingRequired;
   }
 
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
+   */
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  bool SourceChanged() const override;
+
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
    */
index 5aa92624bb5a3b101af2bbb7f928907739564685..64d80e4be1af471643c6332b3d8ab2e65c14274d 100755 (executable)
@@ -66,14 +66,14 @@ bool NativeImageSource::IsColorDepthSupported( ColorDepth colorDepth )
   return mImpl->IsColorDepthSupported( colorDepth );
 }
 
-bool NativeImageSource::GlExtensionCreate()
+bool NativeImageSource::CreateResource()
 {
-  return mImpl->GlExtensionCreate();
+  return mImpl->CreateResource();
 }
 
-void NativeImageSource::GlExtensionDestroy()
+void NativeImageSource::DestroyResource()
 {
-  mImpl->GlExtensionDestroy();
+  mImpl->DestroyResource();
 }
 
 unsigned int NativeImageSource::TargetTexture()
@@ -101,6 +101,31 @@ bool NativeImageSource::RequiresBlending() const
   return mImpl->RequiresBlending();
 }
 
+int NativeImageSource::GetTextureTarget() const
+{
+  return mImpl->GetTextureTarget();
+}
+
+const char* NativeImageSource::GetCustomFragmentPrefix() const
+{
+  return mImpl->GetCustomFragmentPrefix();
+}
+
+const char* NativeImageSource::GetCustomSamplerTypename() const
+{
+  return mImpl->GetCustomSamplerTypename();
+}
+
+Any NativeImageSource::GetNativeImageHandle() const
+{
+  return mImpl->GetNativeImageHandle();
+}
+
+bool NativeImageSource::SourceChanged() const
+{
+  return mImpl->SourceChanged();
+}
+
 NativeImageInterface::Extension* NativeImageSource::GetExtension()
 {
   return mImpl->GetNativeImageInterfaceExtension();
index 597f06341382021f933185c696692e3b80fb5b1f..3f52899b2a206bd4c7e8db3e1dd9c6549be1ffd9 100755 (executable)
@@ -152,42 +152,67 @@ public:
    */
   bool IsColorDepthSupported( ColorDepth colorDepth );
 
+  /**
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
+   */
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
+
 private:   // native image
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  virtual bool GlExtensionCreate();
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  virtual void GlExtensionDestroy();
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
    */
-  virtual unsigned int TargetTexture();
+  unsigned int TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::PrepareTexture()
    */
-  virtual void PrepareTexture();
+  void PrepareTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetWidth()
    */
-  virtual unsigned int GetWidth() const;
+  unsigned int GetWidth() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetHeight()
    */
-  virtual unsigned int GetHeight() const;
+  unsigned int GetHeight() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::RequiresBlending()
    */
-  virtual bool RequiresBlending() const;
+  bool RequiresBlending() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  bool SourceChanged() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()