Change ColorDepth to ColorFormat in NativeImageSourceQueue 58/262058/5
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Mon, 2 Aug 2021 06:40:58 +0000 (15:40 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Wed, 4 Aug 2021 02:21:34 +0000 (11:21 +0900)
To clarify, ColorDepth enum changed to ColorFormat.

Change-Id: Id79463561ce8416e09a294ad501d53bbdb1d6fb5

20 files changed:
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-factory-android.cpp
dali/internal/imaging/android/native-image-source-factory-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-image-source-factory.h
dali/internal/imaging/common/native-image-source-queue-impl.h
dali/internal/imaging/macos/native-image-source-factory-mac.cpp
dali/internal/imaging/macos/native-image-source-factory-mac.h
dali/internal/imaging/tizen/native-image-source-factory-tizen.cpp
dali/internal/imaging/tizen/native-image-source-factory-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-factory-x.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-factory-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-factory-win.cpp
dali/internal/imaging/windows/native-image-source-factory-win.h

index ca80056..b148c1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 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.
 
 namespace Dali
 {
-NativeImageSourceQueuePtr NativeImageSourceQueue::New(uint32_t width, uint32_t height, ColorDepth depth)
+NativeImageSourceQueuePtr NativeImageSourceQueue::New(uint32_t width, uint32_t height, ColorFormat colorFormat)
 {
   Any                       empty;
-  NativeImageSourceQueuePtr image = new NativeImageSourceQueue(width, height, depth, empty);
+  NativeImageSourceQueuePtr image = new NativeImageSourceQueue(width, height, colorFormat, empty);
   if(image->mImpl)
   {
     return image;
@@ -37,7 +37,8 @@ NativeImageSourceQueuePtr NativeImageSourceQueue::New(uint32_t width, uint32_t h
 
 NativeImageSourceQueuePtr NativeImageSourceQueue::New(Any nativeImageSourceQueue)
 {
-  NativeImageSourceQueuePtr image = new NativeImageSourceQueue(0, 0, COLOR_DEPTH_DEFAULT, nativeImageSourceQueue);
+  //ColorFormat will be ignored.
+  NativeImageSourceQueuePtr image = new NativeImageSourceQueue(0, 0, ColorFormat::RGBA8888, nativeImageSourceQueue);
   if(image->mImpl)
   {
     return image;
@@ -145,10 +146,10 @@ NativeImageInterface::Extension* NativeImageSourceQueue::GetExtension()
   return mImpl->GetNativeImageInterfaceExtension();
 }
 
-NativeImageSourceQueue::NativeImageSourceQueue(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSourceQueue)
+NativeImageSourceQueue::NativeImageSourceQueue(uint32_t width, uint32_t height, ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
   auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
-  mImpl        = factory->CreateNativeImageSourceQueue(width, height, depth, nativeImageSourceQueue);
+  mImpl        = factory->CreateNativeImageSourceQueue(width, height, colorFormat, nativeImageSourceQueue);
 }
 
 NativeImageSourceQueue::~NativeImageSourceQueue()
index 45f8a16..0666d0e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_NATIVE_IMAGE_SOURCE_QUEUE_H
 
 /*
- * Copyright (c) 2020 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.
@@ -62,11 +62,11 @@ public:
   /**
     * @brief Enumeration for the instance when creating a native image, the color depth has to be specified.
     */
-  enum ColorDepth
+  enum class ColorFormat
   {
-    COLOR_DEPTH_DEFAULT, ///< Uses the current screen default depth (recommended)
-    COLOR_DEPTH_24,      ///< 24 bits per pixel
-    COLOR_DEPTH_32       ///< 32 bits per pixel
+    RGB888,   /// 8 red bits, 8 green bits, 8 blue bits
+    RGBA8888, /// 8 red bits, 8 green bits, 8 blue bits, alpha 8 bits
+    RGBX8888  /// 8 red bits, 8 green bits, 8 blue bits, and 8 ignored bits
   };
 
   /**
@@ -74,10 +74,10 @@ public:
    *        Depending on hardware, the width and height may have to be a power of two.
    * @param[in] width The width of the image
    * @param[in] height The height of the image
-   * @param[in] depth color depth of the image
+   * @param[in] colorFormat The color format of the image
    * @return A smart-pointer to a newly allocated image
    */
-  static NativeImageSourceQueuePtr New(uint32_t width, uint32_t height, ColorDepth depth);
+  static NativeImageSourceQueuePtr New(uint32_t width, uint32_t height, ColorFormat colorFormat);
 
   /**
    * @brief Creates a new NativeImageSourceQueue from an existing native image source.
@@ -217,10 +217,10 @@ private:
    * @brief Private constructor.
    * @param[in] width The width of the image
    * @param[in] height The height of the image
-   * @param[in] depth color depth of the image
+   * @param[in] colorFormat The color format of the image
    * @param[in] nativeImageSourceQueue contains either: native image source or is empty
    */
-  DALI_INTERNAL NativeImageSourceQueue(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSourceQueue);
+  DALI_INTERNAL NativeImageSourceQueue(uint32_t width, uint32_t height, ColorFormat colorFormat, Any nativeImageSourceQueue);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
index 6e3913d..f85ed87 100644 (file)
@@ -33,9 +33,9 @@ std::unique_ptr<NativeImageSource> NativeImageSourceFactoryAndroid::CreateNative
   return std::unique_ptr<NativeImageSource>(NativeImageSourceAndroid::New(width, height, depth, nativeImageSource));
 }
 
-std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryAndroid::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryAndroid::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
-  return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueAndroid::New(width, height, depth, nativeImageSourceQueue));
+  return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueAndroid::New(width, height, colorFormat, nativeImageSourceQueue));
 }
 
 // this should be created from somewhere
index a35d7ce..df404d6 100644 (file)
@@ -32,7 +32,7 @@ class NativeImageSourceFactoryAndroid : public NativeImageSourceFactory
 public:
   std::unique_ptr<NativeImageSource> CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
 
-  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override;
+  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
 };
 
 } // namespace Adaptor
index 15cc9f2..ac9b53a 100644 (file)
@@ -33,14 +33,13 @@ namespace Internal
 {
 namespace Adaptor
 {
-
-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)
+NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 : mWidth(width),
   mHeight(height)
 {
index aadde09..f827cde 100644 (file)
@@ -43,11 +43,11 @@ public:
    * Depending on hardware the width and height may have to be a power of two.
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
-   * @param[in] depth color depth of the image.
+   * @param[in] colorFormat The color format of the image.
    * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
    * @return A smart-pointer to a newly allocated image.
    */
-  static NativeImageSourceQueueAndroid* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  static NativeImageSourceQueueAndroid* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
   /**
    * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
@@ -171,10 +171,10 @@ private:
    * Private constructor; @see NativeImageSourceQueue::New()
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
-   * @param[in] colour depth of the image.
+   * @param[in] colorFormat The color format of the image.
    * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
    */
-  NativeImageSourceQueueAndroid(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  NativeImageSourceQueueAndroid(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
 private:
   uint32_t mWidth;  ///< image width
index 93870c3..806c030 100644 (file)
@@ -42,7 +42,7 @@ public:
 
   virtual std::unique_ptr<NativeImageSource> CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) = 0;
 
-  virtual std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) = 0;
+  virtual std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) = 0;
 };
 
 extern std::unique_ptr<NativeImageSourceFactory> GetNativeImageSourceFactory();
index f393b82..d1b7ead 100644 (file)
@@ -36,7 +36,7 @@ public:
   /**
    * @copydoc Dali::NativeImageSourceQueue::New()
    */
-  static NativeImageSourceQueue* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  static NativeImageSourceQueue* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
   /**
    * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
index 32022f2..04182e9 100644 (file)
@@ -40,10 +40,10 @@ NativeImageSourceFactoryCocoa::CreateNativeImageSource(
 
 std::unique_ptr<NativeImageSourceQueue>
 NativeImageSourceFactoryCocoa::CreateNativeImageSourceQueue(
-  unsigned int                             width,
-  unsigned int                             height,
-  Dali::NativeImageSourceQueue::ColorDepth depth,
-  Any                                      nativeImageSourceQueue)
+  unsigned int                              width,
+  unsigned int                              height,
+  Dali::NativeImageSourceQueue::ColorFormat colorFormat,
+  Any                                       nativeImageSourceQueue)
 {
   return std::unique_ptr<NativeImageSourceQueue>(nullptr);
 }
index 0e2704e..afb0d89 100644 (file)
@@ -32,10 +32,10 @@ public:
     Any                                 nativeImageSource) override;
 
   std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(
-    unsigned int                             width,
-    unsigned int                             height,
-    Dali::NativeImageSourceQueue::ColorDepth depth,
-    Any                                      nativeImageSourceQueue) override;
+    unsigned int                              width,
+    unsigned int                              height,
+    Dali::NativeImageSourceQueue::ColorFormat colorFormat,
+    Any                                       nativeImageSourceQueue) override;
 };
 
 } // namespace Dali::Internal::Adaptor
index de89485..adbb7d3 100644 (file)
@@ -33,9 +33,9 @@ std::unique_ptr<NativeImageSource> NativeImageSourceFactoryTizen::CreateNativeIm
   return std::unique_ptr<NativeImageSource>(NativeImageSourceTizen::New(width, height, depth, nativeImageSource));
 }
 
-std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryTizen::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryTizen::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
-  return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueTizen::New(width, height, depth, nativeImageSourceQueue));
+  return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueTizen::New(width, height, colorFormat, nativeImageSourceQueue));
 }
 
 // this should be created from somewhere
index 9bffead..4654f36 100644 (file)
@@ -32,7 +32,7 @@ class NativeImageSourceFactoryTizen : public NativeImageSourceFactory
 public:
   std::unique_ptr<NativeImageSource> CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
 
-  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override;
+  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
 };
 
 } // namespace Adaptor
index 35d4458..34673bc 100644 (file)
@@ -59,20 +59,20 @@ const int NUM_FORMATS_BLENDING_REQUIRED = 18;
 
 } // namespace
 
-NativeImageSourceQueueTizen* NativeImageSourceQueueTizen::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+NativeImageSourceQueueTizen* NativeImageSourceQueueTizen::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
-  NativeImageSourceQueueTizen* image = new NativeImageSourceQueueTizen(width, height, depth, nativeImageSourceQueue);
+  NativeImageSourceQueueTizen* image = new NativeImageSourceQueueTizen(width, height, colorFormat, nativeImageSourceQueue);
   DALI_ASSERT_DEBUG(image && "NativeImageSourceQueueTizen allocation failed.");
 
   if(image)
   {
-    image->Initialize(depth);
+    image->Initialize(colorFormat);
   }
 
   return image;
 }
 
-NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 : mMutex(),
   mWidth(width),
   mHeight(height),
@@ -111,7 +111,7 @@ NativeImageSourceQueueTizen::~NativeImageSourceQueueTizen()
   }
 }
 
-void NativeImageSourceQueueTizen::Initialize(Dali::NativeImageSourceQueue::ColorDepth depth)
+void NativeImageSourceQueueTizen::Initialize(Dali::NativeImageSourceQueue::ColorFormat colorFormat)
 {
   if(mWidth == 0 || mHeight == 0)
   {
@@ -120,31 +120,36 @@ void NativeImageSourceQueueTizen::Initialize(Dali::NativeImageSourceQueue::Color
 
   if(mTbmQueue == NULL)
   {
-    int format = TBM_FORMAT_ARGB8888;
+    int tbmFormat = TBM_FORMAT_ARGB8888;
 
-    switch(depth)
+    switch(colorFormat)
     {
-      case Dali::NativeImageSourceQueue::COLOR_DEPTH_DEFAULT:
-      case Dali::NativeImageSourceQueue::COLOR_DEPTH_32:
+      case Dali::NativeImageSourceQueue::ColorFormat::RGBA8888:
       {
-        format            = TBM_FORMAT_ARGB8888;
+        tbmFormat         = TBM_FORMAT_ARGB8888;
         mBlendingRequired = true;
         break;
       }
-      case Dali::NativeImageSourceQueue::COLOR_DEPTH_24:
+      case Dali::NativeImageSourceQueue::ColorFormat::RGBX8888:
       {
-        format            = TBM_FORMAT_RGB888;
+        tbmFormat         = TBM_FORMAT_XRGB8888;
+        mBlendingRequired = false;
+        break;
+      }
+      case Dali::NativeImageSourceQueue::ColorFormat::RGB888:
+      {
+        tbmFormat         = TBM_FORMAT_RGB888;
         mBlendingRequired = false;
         break;
       }
       default:
       {
-        DALI_LOG_WARNING("Wrong color depth.\n");
+        DALI_LOG_WARNING("Wrong color format.\n");
         return;
       }
     }
 
-    mTbmQueue = tbm_surface_queue_create(TBM_SURFACE_QUEUE_SIZE, mWidth, mHeight, format, 0);
+    mTbmQueue = tbm_surface_queue_create(TBM_SURFACE_QUEUE_SIZE, mWidth, mHeight, tbmFormat, 0);
     if(!mTbmQueue)
     {
       DALI_LOG_ERROR("NativeImageSourceQueueTizen::Initialize: tbm_surface_queue_create is failed! [%p]\n", mTbmQueue);
index b837d96..3e20815 100644 (file)
@@ -47,11 +47,11 @@ public:
    * Depending on hardware the width and height may have to be a power of two.
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
-   * @param[in] depth color depth of the image.
+   * @param[in] colorFormat The color format of the image.
    * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
    * @return A smart-pointer to a newly allocated image.
    */
-  static NativeImageSourceQueueTizen* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  static NativeImageSourceQueueTizen* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
   /**
    * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
@@ -175,12 +175,12 @@ private:
    * Private constructor; @see NativeImageSourceQueue::New()
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
-   * @param[in] colour depth of the image.
+   * @param[in] colorFormat The format of the image.
    * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
    */
-  NativeImageSourceQueueTizen(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  NativeImageSourceQueueTizen(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
-  void Initialize(Dali::NativeImageSourceQueue::ColorDepth depth);
+  void Initialize(Dali::NativeImageSourceQueue::ColorFormat colorFormat);
 
   void ResetEglImageList();
 
@@ -192,17 +192,17 @@ private:
   typedef std::pair<tbm_surface_h, void*> EglImagePair;
   typedef std::pair<tbm_surface_h, void*> BufferPair;
 
-  Dali::Mutex               mMutex;                ///< Mutex
-  uint32_t                  mWidth;                ///< image width
-  uint32_t                  mHeight;               ///< image height
-  tbm_surface_queue_h       mTbmQueue;             ///< Tbm surface queue handle
-  tbm_surface_h             mConsumeSurface;       ///< The current tbm surface
-  std::vector<EglImagePair> mEglImages;            ///< EGL Image vector
-  std::vector<BufferPair>   mBuffers;              ///< Buffer vector
-  EglGraphics*              mEglGraphics;          ///< EGL Graphics
-  EglImageExtensions*       mEglImageExtensions;   ///< The EGL Image Extensions
-  bool                      mOwnTbmQueue;          ///< Whether we created tbm queue
-  bool                      mBlendingRequired;     ///< Whether blending is required
+  Dali::Mutex               mMutex;              ///< Mutex
+  uint32_t                  mWidth;              ///< image width
+  uint32_t                  mHeight;             ///< image height
+  tbm_surface_queue_h       mTbmQueue;           ///< Tbm surface queue handle
+  tbm_surface_h             mConsumeSurface;     ///< The current tbm surface
+  std::vector<EglImagePair> mEglImages;          ///< EGL Image vector
+  std::vector<BufferPair>   mBuffers;            ///< Buffer vector
+  EglGraphics*              mEglGraphics;        ///< EGL Graphics
+  EglImageExtensions*       mEglImageExtensions; ///< The EGL Image Extensions
+  bool                      mOwnTbmQueue;        ///< Whether we created tbm queue
+  bool                      mBlendingRequired;   ///< Whether blending is required
 };
 
 } // namespace Adaptor
index a614cf0..dee7b8a 100644 (file)
@@ -33,9 +33,9 @@ std::unique_ptr<NativeImageSource> NativeImageSourceFactoryX::CreateNativeImageS
   return std::unique_ptr<NativeImageSource>(NativeImageSourceX::New(width, height, depth, nativeImageSource));
 }
 
-std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryX::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryX::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
-  return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueX::New(width, height, depth, nativeImageSourceQueue));
+  return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueX::New(width, height, colorFormat, nativeImageSourceQueue));
 }
 
 // this should be created from somewhere
index 640e4bd..dde5201 100644 (file)
@@ -32,7 +32,7 @@ class NativeImageSourceFactoryX : public NativeImageSourceFactory
 public:
   std::unique_ptr<NativeImageSource> CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
 
-  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override;
+  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
 };
 
 } // namespace Adaptor
index 25fbea7..8b4be71 100644 (file)
@@ -38,13 +38,13 @@ namespace
 #define TBM_SURFACE_QUEUE_SIZE 3
 } // namespace
 
-NativeImageSourceQueueX* NativeImageSourceQueueX::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+NativeImageSourceQueueX* NativeImageSourceQueueX::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
-  NativeImageSourceQueueX* image = new NativeImageSourceQueueX(width, height, depth, nativeImageSourceQueue);
+  NativeImageSourceQueueX* image = new NativeImageSourceQueueX(width, height, colorFormat, nativeImageSourceQueue);
   return image;
 }
 
-NativeImageSourceQueueX::NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+NativeImageSourceQueueX::NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 : mWidth(width),
   mHeight(height)
 {
index db5f8e2..cde85e2 100644 (file)
@@ -43,11 +43,11 @@ public:
    * Depending on hardware the width and height may have to be a power of two.
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
-   * @param[in] depth color depth of the image.
+   * @param[in] colorFormat The color format of the image.
    * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
    * @return A smart-pointer to a newly allocated image.
    */
-  static NativeImageSourceQueueX* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  static NativeImageSourceQueueX* New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
   /**
    * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
@@ -171,10 +171,10 @@ private:
    * Private constructor; @see NativeImageSourceQueue::New()
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
-   * @param[in] colour depth of the image.
+   * @param[in] colorFormat The color format of the image.
    * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
    */
-  NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue);
+  NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
 
 private:
   uint32_t mWidth;  ///< image width
index 88511e3..75746d1 100644 (file)
@@ -33,7 +33,7 @@ std::unique_ptr<NativeImageSource> NativeImageSourceFactoryWin::CreateNativeImag
   return std::unique_ptr<NativeImageSource>(NativeImageSourceWin::New(width, height, depth, nativeImageSource));
 }
 
-std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
+std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
 {
   return std::unique_ptr<NativeImageSourceQueue>(nullptr);
 }
index e8b00b8..05c882f 100644 (file)
@@ -32,7 +32,7 @@ class NativeImageSourceFactoryWin : public NativeImageSourceFactory
 public:
   std::unique_ptr<NativeImageSource> CreateNativeImageSource(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override;
 
-  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override;
+  std::unique_ptr<NativeImageSourceQueue> CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override;
 };
 
 } // namespace Adaptor