From: David Steele Date: Fri, 5 Jan 2024 11:42:04 +0000 (+0000) Subject: Fixing non-ecore X11 build X-Git-Tag: dali_2.3.6~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56c1e96e6210a3530866d262139f574af21c33b7;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Fixing non-ecore X11 build Change-Id: Ie2eadcc1b6937a29d82d401c06b47a770ea31303 --- diff --git a/dali/internal/imaging/x11/native-image-source-factory-x.cpp b/dali/internal/imaging/x11/native-image-source-factory-x.cpp index c1c8446..83d09fa 100644 --- a/dali/internal/imaging/x11/native-image-source-factory-x.cpp +++ b/dali/internal/imaging/x11/native-image-source-factory-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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::ColorFormat colorFormat, Any nativeImageSourceQueue) +std::unique_ptr NativeImageSourceFactoryX::CreateNativeImageSourceQueue(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) { - return std::unique_ptr(NativeImageSourceQueueX::New(width, height, colorFormat, nativeImageSourceQueue)); + return std::unique_ptr(NativeImageSourceQueueX::New(queueCount, width, height, colorFormat, nativeImageSourceQueue)); } // this should be created from somewhere diff --git a/dali/internal/imaging/x11/native-image-source-factory-x.h b/dali/internal/imaging/x11/native-image-source-factory-x.h index ad92767..88edfa9 100644 --- a/dali/internal/imaging/x11/native-image-source-factory-x.h +++ b/dali/internal/imaging/x11/native-image-source-factory-x.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_FACTORY_X_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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::ColorFormat colorFormat, Any nativeImageSourceQueue) override; + std::unique_ptr CreateNativeImageSourceQueue(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) override; }; } // namespace Adaptor diff --git a/dali/internal/imaging/x11/native-image-source-queue-impl-x.cpp b/dali/internal/imaging/x11/native-image-source-queue-impl-x.cpp index 5dfbd1a..a77d7a9 100644 --- a/dali/internal/imaging/x11/native-image-source-queue-impl-x.cpp +++ b/dali/internal/imaging/x11/native-image-source-queue-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -28,14 +28,15 @@ namespace Internal { namespace Adaptor { -NativeImageSourceQueueX* NativeImageSourceQueueX::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) +NativeImageSourceQueueX* NativeImageSourceQueueX::New(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) { - NativeImageSourceQueueX* image = new NativeImageSourceQueueX(width, height, colorFormat, nativeImageSourceQueue); + NativeImageSourceQueueX* image = new NativeImageSourceQueueX(queueCount, width, height, colorFormat, nativeImageSourceQueue); return image; } -NativeImageSourceQueueX::NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) -: mWidth(width), +NativeImageSourceQueueX::NativeImageSourceQueueX(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue) +: mQueueCount(queueCount), + mWidth(width), mHeight(height) { DALI_LOG_ERROR("NativeImageSourceQueueX::NativeImageSourceQueueX: Not supported\n"); diff --git a/dali/internal/imaging/x11/native-image-source-queue-impl-x.h b/dali/internal/imaging/x11/native-image-source-queue-impl-x.h index 6fe065d..aaff06f 100644 --- a/dali/internal/imaging/x11/native-image-source-queue-impl-x.h +++ b/dali/internal/imaging/x11/native-image-source-queue-impl-x.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -41,13 +41,14 @@ public: /** * Create a new NativeImageSourceQueueX internally. * Depending on hardware the width and height may have to be a power of two. + * @param[in] queueCount The number of queue of the image. If it is 0, will use default. * @param[in] width The width of the image. * @param[in] height The height 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::ColorFormat colorFormat, Any nativeImageSourceQueue); + static NativeImageSourceQueueX* New(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue); /** * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue() @@ -110,6 +111,14 @@ public: void PrepareTexture() override; /** + * @copydoc Dali::NativeImageSourceQueue::GetQueueCount + */ + uint32_t GetQueueCount() const override + { + return mQueueCount; + } + + /** * @copydoc Dali::NativeImageInterface::GetWidth() */ uint32_t GetWidth() const override @@ -177,16 +186,18 @@ public: private: /** * Private constructor; @see NativeImageSourceQueue::New() + * @param[in] queueCount The number of queue of the image. If it is 0, will use default. * @param[in] width The width of the image. * @param[in] height The height 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::ColorFormat colorFormat, Any nativeImageSourceQueue); + NativeImageSourceQueueX(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue); private: - uint32_t mWidth; ///< image width - uint32_t mHeight; ///< image height + uint32_t mQueueCount; ///< queue count + uint32_t mWidth; ///< image width + uint32_t mHeight; ///< image height }; } // namespace Adaptor