From 1b2371aca72bc0c894227c927a383e795e5651d7 Mon Sep 17 00:00:00 2001 From: Daekwang Ryu Date: Mon, 2 Aug 2021 15:40:58 +0900 Subject: [PATCH] Change ColorDepth to ColorFormat in NativeImageSourceQueue To clarify, ColorDepth enum changed to ColorFormat. Change-Id: Id79463561ce8416e09a294ad501d53bbdb1d6fb5 --- .../native-image-source-queue.cpp | 13 +++++---- .../adaptor-framework/native-image-source-queue.h | 18 ++++++------ .../native-image-source-factory-android.cpp | 4 +-- .../android/native-image-source-factory-android.h | 2 +- .../native-image-source-queue-impl-android.cpp | 7 ++--- .../native-image-source-queue-impl-android.h | 8 +++--- .../imaging/common/native-image-source-factory.h | 2 +- .../common/native-image-source-queue-impl.h | 2 +- .../macos/native-image-source-factory-mac.cpp | 8 +++--- .../macos/native-image-source-factory-mac.h | 8 +++--- .../tizen/native-image-source-factory-tizen.cpp | 4 +-- .../tizen/native-image-source-factory-tizen.h | 2 +- .../tizen/native-image-source-queue-impl-tizen.cpp | 33 +++++++++++++--------- .../tizen/native-image-source-queue-impl-tizen.h | 32 ++++++++++----------- .../ubuntu-x11/native-image-source-factory-x.cpp | 4 +-- .../ubuntu-x11/native-image-source-factory-x.h | 2 +- .../native-image-source-queue-impl-x.cpp | 6 ++-- .../ubuntu-x11/native-image-source-queue-impl-x.h | 8 +++--- .../windows/native-image-source-factory-win.cpp | 2 +- .../windows/native-image-source-factory-win.h | 2 +- 20 files changed, 86 insertions(+), 81 deletions(-) diff --git a/dali/devel-api/adaptor-framework/native-image-source-queue.cpp b/dali/devel-api/adaptor-framework/native-image-source-queue.cpp index ca80056..b148c1b 100644 --- a/dali/devel-api/adaptor-framework/native-image-source-queue.cpp +++ b/dali/devel-api/adaptor-framework/native-image-source-queue.cpp @@ -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. @@ -24,10 +24,10 @@ 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() diff --git a/dali/devel-api/adaptor-framework/native-image-source-queue.h b/dali/devel-api/adaptor-framework/native-image-source-queue.h index 45f8a16..0666d0e 100644 --- a/dali/devel-api/adaptor-framework/native-image-source-queue.h +++ b/dali/devel-api/adaptor-framework/native-image-source-queue.h @@ -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(). diff --git a/dali/internal/imaging/android/native-image-source-factory-android.cpp b/dali/internal/imaging/android/native-image-source-factory-android.cpp index 6e3913d..f85ed87 100644 --- a/dali/internal/imaging/android/native-image-source-factory-android.cpp +++ b/dali/internal/imaging/android/native-image-source-factory-android.cpp @@ -33,9 +33,9 @@ std::unique_ptr NativeImageSourceFactoryAndroid::CreateNative return std::unique_ptr(NativeImageSourceAndroid::New(width, height, depth, nativeImageSource)); } -std::unique_ptr NativeImageSourceFactoryAndroid::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) +std::unique_ptr NativeImageSourceFactoryAndroid::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) { - return std::unique_ptr(NativeImageSourceQueueAndroid::New(width, height, depth, nativeImageSourceQueue)); + return std::unique_ptr(NativeImageSourceQueueAndroid::New(width, height, colorFormat, nativeImageSourceQueue)); } // this should be created from somewhere diff --git a/dali/internal/imaging/android/native-image-source-factory-android.h b/dali/internal/imaging/android/native-image-source-factory-android.h index a35d7ce..df404d6 100644 --- a/dali/internal/imaging/android/native-image-source-factory-android.h +++ b/dali/internal/imaging/android/native-image-source-factory-android.h @@ -32,7 +32,7 @@ class NativeImageSourceFactoryAndroid : public NativeImageSourceFactory public: std::unique_ptr CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override; - std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override; + std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override; }; } // namespace Adaptor diff --git a/dali/internal/imaging/android/native-image-source-queue-impl-android.cpp b/dali/internal/imaging/android/native-image-source-queue-impl-android.cpp index 15cc9f2..ac9b53a 100644 --- a/dali/internal/imaging/android/native-image-source-queue-impl-android.cpp +++ b/dali/internal/imaging/android/native-image-source-queue-impl-android.cpp @@ -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) { diff --git a/dali/internal/imaging/android/native-image-source-queue-impl-android.h b/dali/internal/imaging/android/native-image-source-queue-impl-android.h index aadde09..f827cde 100644 --- a/dali/internal/imaging/android/native-image-source-queue-impl-android.h +++ b/dali/internal/imaging/android/native-image-source-queue-impl-android.h @@ -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 diff --git a/dali/internal/imaging/common/native-image-source-factory.h b/dali/internal/imaging/common/native-image-source-factory.h index 93870c3..806c030 100644 --- a/dali/internal/imaging/common/native-image-source-factory.h +++ b/dali/internal/imaging/common/native-image-source-factory.h @@ -42,7 +42,7 @@ public: virtual std::unique_ptr CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) = 0; - virtual std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) = 0; + virtual std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) = 0; }; extern std::unique_ptr GetNativeImageSourceFactory(); diff --git a/dali/internal/imaging/common/native-image-source-queue-impl.h b/dali/internal/imaging/common/native-image-source-queue-impl.h index f393b82..d1b7ead 100644 --- a/dali/internal/imaging/common/native-image-source-queue-impl.h +++ b/dali/internal/imaging/common/native-image-source-queue-impl.h @@ -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() diff --git a/dali/internal/imaging/macos/native-image-source-factory-mac.cpp b/dali/internal/imaging/macos/native-image-source-factory-mac.cpp index 32022f2..04182e9 100644 --- a/dali/internal/imaging/macos/native-image-source-factory-mac.cpp +++ b/dali/internal/imaging/macos/native-image-source-factory-mac.cpp @@ -40,10 +40,10 @@ NativeImageSourceFactoryCocoa::CreateNativeImageSource( std::unique_ptr 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(nullptr); } diff --git a/dali/internal/imaging/macos/native-image-source-factory-mac.h b/dali/internal/imaging/macos/native-image-source-factory-mac.h index 0e2704e..afb0d89 100644 --- a/dali/internal/imaging/macos/native-image-source-factory-mac.h +++ b/dali/internal/imaging/macos/native-image-source-factory-mac.h @@ -32,10 +32,10 @@ public: Any nativeImageSource) override; std::unique_ptr 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 diff --git a/dali/internal/imaging/tizen/native-image-source-factory-tizen.cpp b/dali/internal/imaging/tizen/native-image-source-factory-tizen.cpp index de89485..adbb7d3 100644 --- a/dali/internal/imaging/tizen/native-image-source-factory-tizen.cpp +++ b/dali/internal/imaging/tizen/native-image-source-factory-tizen.cpp @@ -33,9 +33,9 @@ std::unique_ptr NativeImageSourceFactoryTizen::CreateNativeIm return std::unique_ptr(NativeImageSourceTizen::New(width, height, depth, nativeImageSource)); } -std::unique_ptr NativeImageSourceFactoryTizen::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) +std::unique_ptr NativeImageSourceFactoryTizen::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) { - return std::unique_ptr(NativeImageSourceQueueTizen::New(width, height, depth, nativeImageSourceQueue)); + return std::unique_ptr(NativeImageSourceQueueTizen::New(width, height, colorFormat, nativeImageSourceQueue)); } // this should be created from somewhere diff --git a/dali/internal/imaging/tizen/native-image-source-factory-tizen.h b/dali/internal/imaging/tizen/native-image-source-factory-tizen.h index 9bffead..4654f36 100644 --- a/dali/internal/imaging/tizen/native-image-source-factory-tizen.h +++ b/dali/internal/imaging/tizen/native-image-source-factory-tizen.h @@ -32,7 +32,7 @@ class NativeImageSourceFactoryTizen : public NativeImageSourceFactory public: std::unique_ptr CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override; - std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override; + std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override; }; } // namespace Adaptor diff --git a/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp b/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp index 35d4458..34673bc 100644 --- a/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp +++ b/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp @@ -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); diff --git a/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h b/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h index b837d96..3e20815 100644 --- a/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h +++ b/dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h @@ -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 EglImagePair; typedef std::pair 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 mEglImages; ///< EGL Image vector - std::vector 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 mEglImages; ///< EGL Image vector + std::vector 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 diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.cpp b/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.cpp index a614cf0..dee7b8a 100644 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.cpp +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.cpp @@ -33,9 +33,9 @@ std::unique_ptr NativeImageSourceFactoryX::CreateNativeImageS return std::unique_ptr(NativeImageSourceX::New(width, height, depth, nativeImageSource)); } -std::unique_ptr NativeImageSourceFactoryX::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) +std::unique_ptr NativeImageSourceFactoryX::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) { - return std::unique_ptr(NativeImageSourceQueueX::New(width, height, depth, nativeImageSourceQueue)); + return std::unique_ptr(NativeImageSourceQueueX::New(width, height, colorFormat, nativeImageSourceQueue)); } // this should be created from somewhere diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.h b/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.h index 640e4bd..dde5201 100644 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.h +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-factory-x.h @@ -32,7 +32,7 @@ class NativeImageSourceFactoryX : public NativeImageSourceFactory public: std::unique_ptr CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override; - std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override; + std::unique_ptr CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override; }; } // namespace Adaptor diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.cpp b/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.cpp index 25fbea7..8b4be71 100644 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.cpp +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.cpp @@ -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) { diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h b/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h index db5f8e2..cde85e2 100644 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h @@ -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 diff --git a/dali/internal/imaging/windows/native-image-source-factory-win.cpp b/dali/internal/imaging/windows/native-image-source-factory-win.cpp index 88511e3..75746d1 100644 --- a/dali/internal/imaging/windows/native-image-source-factory-win.cpp +++ b/dali/internal/imaging/windows/native-image-source-factory-win.cpp @@ -33,7 +33,7 @@ std::unique_ptr NativeImageSourceFactoryWin::CreateNativeImag return std::unique_ptr(NativeImageSourceWin::New(width, height, depth, nativeImageSource)); } -std::unique_ptr NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) +std::unique_ptr NativeImageSourceFactoryWin::CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) { return std::unique_ptr(nullptr); } diff --git a/dali/internal/imaging/windows/native-image-source-factory-win.h b/dali/internal/imaging/windows/native-image-source-factory-win.h index e8b00b8..05c882f 100644 --- a/dali/internal/imaging/windows/native-image-source-factory-win.h +++ b/dali/internal/imaging/windows/native-image-source-factory-win.h @@ -32,7 +32,7 @@ class NativeImageSourceFactoryWin : public NativeImageSourceFactory public: std::unique_ptr CreateNativeImageSource(unsigned int width, unsigned int height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource) override; - std::unique_ptr CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue) override; + std::unique_ptr CreateNativeImageSourceQueue(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override; }; } // namespace Adaptor -- 2.7.4