/*
- * 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.
#ifdef THORVG_SUPPORT
if(!mNativeImageQueue)
{
- mNativeImageQueue = Dali::NativeImageSourceQueue::New(size.width, size.height, Dali::NativeImageSourceQueue::ColorFormat::RGBA8888);
+ mNativeImageQueue = Dali::NativeImageSourceQueue::New(size.width, size.height, Dali::NativeImageSourceQueue::ColorFormat::BGRA8888);
}
else
{
NativeImageSourceQueueTizen* NativeImageSourceQueueTizen::New(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
{
- NativeImageSourceQueueTizen* image = new NativeImageSourceQueueTizen(queueCount, width, height, colorFormat, nativeImageSourceQueue);
+ NativeImageSourceQueueTizen* image = new NativeImageSourceQueueTizen(queueCount, width, height, nativeImageSourceQueue);
DALI_ASSERT_DEBUG(image && "NativeImageSourceQueueTizen allocation failed.");
if(image)
return image;
}
-NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
+NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t queueCount, uint32_t width, uint32_t height, Any nativeImageSourceQueue)
: mMutex(),
mQueueCount(queueCount),
mWidth(width),
switch(colorFormat)
{
- 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: // TODO : Implement me after other codes fixed.
case Dali::NativeImageSourceQueue::ColorFormat::BGRX8888:
{
tbmFormat = TBM_FORMAT_XRGB8888;
mBlendingRequired = false;
break;
}
- case Dali::NativeImageSourceQueue::ColorFormat::RGB888: // TODO : Implement me after other codes fixed.
case Dali::NativeImageSourceQueue::ColorFormat::BGR888:
{
tbmFormat = TBM_FORMAT_RGB888;
mBlendingRequired = false;
break;
}
+ case Dali::NativeImageSourceQueue::ColorFormat::RGBA8888:
+ {
+ tbmFormat = TBM_FORMAT_ABGR8888;
+ mBlendingRequired = true;
+ break;
+ }
+ case Dali::NativeImageSourceQueue::ColorFormat::RGBX8888:
+ {
+ tbmFormat = TBM_FORMAT_XBGR8888;
+ mBlendingRequired = false;
+ break;
+ }
+ case Dali::NativeImageSourceQueue::ColorFormat::RGB888:
+ {
+ tbmFormat = TBM_FORMAT_BGR888;
+ mBlendingRequired = false;
+ break;
+ }
default:
{
DALI_LOG_WARNING("Wrong color format.\n");
* @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 format of the image.
* @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
*/
- NativeImageSourceQueueTizen(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
+ NativeImageSourceQueueTizen(uint32_t queueCount, uint32_t width, uint32_t height, Any nativeImageSourceQueue);
void Initialize(Dali::NativeImageSourceQueue::ColorFormat colorFormat);