Add ColorFormat::BGR~~ on NativeImageSourceQueue 81/277081/3
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 30 Jun 2022 08:18:13 +0000 (17:18 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 30 Jun 2022 08:29:53 +0000 (17:29 +0900)
Sync the enum name's order with pixel byte order.
TODO : After other codes (NUI, dali-extension-tv) fixed done,
We should make RGB~~ works well

Change-Id: Ie8409dbc6c7c5179173cd5547279defcbb6f645e
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/devel-api/adaptor-framework/native-image-source-queue.cpp
dali/devel-api/adaptor-framework/native-image-source-queue.h
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp

index d55e178..9655a5a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 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.
@@ -38,7 +38,7 @@ NativeImageSourceQueuePtr NativeImageSourceQueue::New(uint32_t width, uint32_t h
 NativeImageSourceQueuePtr NativeImageSourceQueue::New(Any nativeImageSourceQueue)
 {
   //ColorFormat will be ignored.
-  NativeImageSourceQueuePtr image = new NativeImageSourceQueue(0, 0, ColorFormat::RGBA8888, nativeImageSourceQueue);
+  NativeImageSourceQueuePtr image = new NativeImageSourceQueue(0, 0, ColorFormat::BGRA8888, nativeImageSourceQueue);
   if(image->mImpl)
   {
     return image;
index cb62fc1..01ca473 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_NATIVE_IMAGE_SOURCE_QUEUE_H
 
 /*
- * Copyright (c) 2021 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.
@@ -61,12 +61,16 @@ class DALI_ADAPTOR_API NativeImageSourceQueue : public NativeImageInterface
 public:
   /**
     * @brief Enumeration for the instance when creating a native image, the color depth has to be specified.
+    * @note This ColorFormat follows pixel byte order.
     */
   enum class ColorFormat
   {
     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
+    RGBX8888, /// 8 red bits, 8 green bits, 8 blue bits, and 8 ignored bits
+    BGR888,   /// 8 blue bits, 8 green bits, 8 red bits
+    BGRA8888, /// 8 blue bits, 8 green bits, 8 red bits, alpha 8 bits
+    BGRX8888, /// 8 blue bits, 8 green bits, 8 red bits, and 8 ignored bits
   };
 
   /**
index 107f4cd..9cd7681 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 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.
@@ -38,7 +38,7 @@ namespace
 {
 #define TBM_SURFACE_QUEUE_SIZE 3
 
-const char* SAMPLER_TYPE    = "samplerExternalOES";
+const char* SAMPLER_TYPE = "samplerExternalOES";
 
 // clang-format off
 int FORMATS_BLENDING_REQUIRED[] = {
@@ -124,19 +124,22 @@ void NativeImageSourceQueueTizen::Initialize(Dali::NativeImageSourceQueue::Color
 
     switch(colorFormat)
     {
-      case Dali::NativeImageSourceQueue::ColorFormat::RGBA8888:
+      case Dali::NativeImageSourceQueue::ColorFormat::RGBA8888: // TODO : Implement me after other codes fixed.
+      case Dali::NativeImageSourceQueue::ColorFormat::BGRA8888:
       {
         tbmFormat         = TBM_FORMAT_ARGB8888;
         mBlendingRequired = true;
         break;
       }
-      case Dali::NativeImageSourceQueue::ColorFormat::RGBX8888:
+      case Dali::NativeImageSourceQueue::ColorFormat::RGBX8888: // TODO : Implement me after other codes fixed.
+      case Dali::NativeImageSourceQueue::ColorFormat::BGRX8888:
       {
         tbmFormat         = TBM_FORMAT_XRGB8888;
         mBlendingRequired = false;
         break;
       }
-      case Dali::NativeImageSourceQueue::ColorFormat::RGB888:
+      case Dali::NativeImageSourceQueue::ColorFormat::RGB888: // TODO : Implement me after other codes fixed.
+      case Dali::NativeImageSourceQueue::ColorFormat::BGR888:
       {
         tbmFormat         = TBM_FORMAT_RGB888;
         mBlendingRequired = false;