/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
END_TEST;
}
-int UtcDaliImageConvertPixelDataToUrl(void)
+int UtcDaliImageConvertPixelDataToUrl01(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliImageConvertPixelDataToUrl");
+ tet_infoline("UtcDaliImageConvertPixelDataToUrl01");
unsigned int width(64);
unsigned int height(64);
END_TEST;
}
-int UtcDaliImageConvertNativeImageSourceToUrl(void)
+int UtcDaliImageConvertPixelDataToUrl02(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliImageConvertNativeImageSourceToUrl");
+ tet_infoline("UtcDaliImageConvertPixelDataToUrl02");
+
+ unsigned int width(64);
+ unsigned int height(64);
+ unsigned int bufferSize = width * height * Pixel::GetBytesPerPixel(Pixel::RGBA8888);
+
+ unsigned char* buffer = reinterpret_cast<unsigned char*>(malloc(bufferSize));
+ PixelData pixelData = PixelData::New(buffer, bufferSize, width, height, Pixel::RGBA8888, PixelData::FREE);
+
+ DALI_TEST_CHECK(Dali::Toolkit::Image::GenerateUrl(pixelData, true).GetUrl().size() > 0u);
+
+ END_TEST;
+}
+
+int UtcDaliImageConvertNativeImageSourceToUrl01(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("UtcDaliImageConvertNativeImageSourceToUrl01");
unsigned int width(64);
unsigned int height(64);
END_TEST;
}
+int UtcDaliImageConvertNativeImageSourceToUrl02(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("UtcDaliImageConvertNativeImageSourceToUrl02");
+
+ unsigned int width(64);
+ unsigned int height(64);
+ try
+ {
+ NativeImageSourcePtr nativeImageSource = NativeImageSource::New(width, height, NativeImageSource::COLOR_DEPTH_DEFAULT);
+
+ DALI_TEST_CHECK(Dali::Toolkit::Image::GenerateUrl(nativeImageSource, true).GetUrl().size() > 0u);
+ }
+ catch(Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT(e);
+ DALI_TEST_ASSERT(e, "Adaptor::IsAvailable()", TEST_LOCATION);
+ }
+ catch(...)
+ {
+ tet_printf("Assertion test failed - wrong Exception\n");
+ tet_result(TET_FAIL);
+ }
+
+ END_TEST;
+}
+
int UtcDaliImageConvertEncodedImageBufferToUrl(void)
{
ToolkitTestApplication application;
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
using namespace Dali;
using namespace Dali::Toolkit;
-int UtcImageUrlConstructor(void)
+int UtcImageUrlConstructor01(void)
{
ToolkitTestApplication application;
DALI_TEST_CHECK(downcastUrl);
END_TEST;
}
+
+int UtcImageUrlConstructor02(void)
+{
+ ToolkitTestApplication application;
+
+ tet_infoline(" UtcImageUrlValid ");
+
+ // Test default constructor.
+ ImageUrl imageUrl;
+ DALI_TEST_CHECK(!imageUrl);
+
+ // Test object creation
+ Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 4u, 4u); // test texture
+ imageUrl = ImageUrl::New(image, true);
+ DALI_TEST_CHECK(imageUrl);
+
+ // Test copy constructor
+ ImageUrl ImageUrlCopy(imageUrl);
+ DALI_TEST_CHECK(ImageUrlCopy);
+
+ // Test down cast
+ BaseHandle baseUrl;
+ baseUrl = imageUrl;
+ ImageUrl downcastUrl = ImageUrl::DownCast(baseUrl);
+ DALI_TEST_CHECK(downcastUrl);
+ END_TEST;
+}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
END_TEST;
}
+int UtcDaliImageVisualWithFrameBufferPreMultipliedAlpha01(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("Use FrameBuffer as url");
+
+ uint32_t width(64);
+ uint32_t height(64);
+ FrameBuffer frameBuffer = Dali::FrameBuffer::New(width, height, FrameBuffer::Attachment::NONE);
+
+ DALI_TEST_CHECK(frameBuffer);
+ ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(frameBuffer, Pixel::Format::RGBA8888, width, height);
+ std::string url = imageUrl.GetUrl();
+
+ VisualFactory factory = VisualFactory::Get();
+ DALI_TEST_CHECK(factory);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Toolkit::Visual::Property::TYPE, Visual::IMAGE);
+ propertyMap.Insert(ImageVisual::Property::URL, url);
+
+ Visual::Base visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK(visual);
+
+ DummyControl actor = DummyControl::New();
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ dummyImpl.RegisterVisual(Control::CONTROL_PROPERTY_END_INDEX + 1, visual);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 0u, TEST_LOCATION);
+
+ application.GetScene().Add(actor);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(16);
+
+ Renderer renderer = actor.GetRendererAt(0);
+
+ // Check whether preMultipliedAlpha is true.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, true, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliImageVisualWithFrameBufferPreMultipliedAlpha02(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("Use FrameBuffer as url");
+
+ uint32_t width(64);
+ uint32_t height(64);
+ FrameBuffer frameBuffer = Dali::FrameBuffer::New(width, height, FrameBuffer::Attachment::NONE);
+
+ DALI_TEST_CHECK(frameBuffer);
+
+ Texture texture = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height);
+ frameBuffer.AttachColorTexture(texture);
+
+ ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(frameBuffer, 0u);
+ std::string url = imageUrl.GetUrl();
+
+ VisualFactory factory = VisualFactory::Get();
+ DALI_TEST_CHECK(factory);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Toolkit::Visual::Property::TYPE, Visual::IMAGE);
+ propertyMap.Insert(ImageVisual::Property::URL, url);
+
+ Visual::Base visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK(visual);
+
+ DummyControl actor = DummyControl::New();
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ dummyImpl.RegisterVisual(Control::CONTROL_PROPERTY_END_INDEX + 1, visual);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 0u, TEST_LOCATION);
+
+ application.GetScene().Add(actor);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(16);
+
+ Renderer renderer = actor.GetRendererAt(0);
+
+ // Check whether preMultipliedAlpha is true.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, true, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliImageVisualWithPixelData(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("Use PixelData as url");
+
+ uint32_t width(64);
+ uint32_t height(64);
+ uint32_t bufferSize = width * height * Pixel::GetBytesPerPixel(Pixel::RGBA8888);
+
+ uint8_t* buffer = reinterpret_cast<uint8_t*>(malloc(bufferSize));
+ PixelData pixelData = PixelData::New(buffer, bufferSize, width, height, Pixel::RGBA8888, PixelData::FREE);
+
+ DALI_TEST_CHECK(pixelData);
+
+ ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(pixelData);
+ std::string url = imageUrl.GetUrl();
+
+ VisualFactory factory = VisualFactory::Get();
+ DALI_TEST_CHECK(factory);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Toolkit::Visual::Property::TYPE, Visual::IMAGE);
+ propertyMap.Insert(ImageVisual::Property::URL, url);
+
+ Visual::Base visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK(visual);
+
+ DummyControl actor = DummyControl::New();
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ dummyImpl.RegisterVisual(Control::CONTROL_PROPERTY_END_INDEX + 1, visual);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 0u, TEST_LOCATION);
+
+ application.GetScene().Add(actor);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(16);
+
+ Renderer renderer = actor.GetRendererAt(0);
+
+ // Check whether preMultipliedAlpha is false.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, false, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliImageVisualWithPixelDataPreMultipliedAlpha(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("Use PixelData as url");
+
+ uint32_t width(64);
+ uint32_t height(64);
+ uint32_t bufferSize = width * height * Pixel::GetBytesPerPixel(Pixel::RGBA8888);
+
+ uint8_t* buffer = reinterpret_cast<uint8_t*>(malloc(bufferSize));
+ PixelData pixelData = PixelData::New(buffer, bufferSize, width, height, Pixel::RGBA8888, PixelData::FREE);
+
+ DALI_TEST_CHECK(pixelData);
+
+ ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(pixelData, true);
+ std::string url = imageUrl.GetUrl();
+
+ VisualFactory factory = VisualFactory::Get();
+ DALI_TEST_CHECK(factory);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Toolkit::Visual::Property::TYPE, Visual::IMAGE);
+ propertyMap.Insert(ImageVisual::Property::URL, url);
+
+ Visual::Base visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK(visual);
+
+ DummyControl actor = DummyControl::New();
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ dummyImpl.RegisterVisual(Control::CONTROL_PROPERTY_END_INDEX + 1, visual);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 0u, TEST_LOCATION);
+
+ application.GetScene().Add(actor);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(16);
+
+ Renderer renderer = actor.GetRendererAt(0);
+
+ // Check whether preMultipliedAlpha is true.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, true, TEST_LOCATION);
+
+ END_TEST;
+}
+
int UtcDaliImageVisualWithNativeImage(void)
{
ToolkitTestApplication application;
DALI_TEST_EQUALS(actor.GetRendererCount(), 1u, TEST_LOCATION);
+ application.SendNotification();
+ application.Render(16);
+
Renderer renderer = actor.GetRendererAt(0);
Shader shader = renderer.GetShader();
DALI_TEST_EQUALS(pos != std::string::npos, true, TEST_LOCATION);
+ // Check whether preMultipliedAlpha is false.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, false, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliImageVisualWithNativeImagePreMultipliedAlpha(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("Use Native Image as url");
+
+ NativeImageSourcePtr nativeImageSource = NativeImageSource::New(500, 500, NativeImageSource::COLOR_DEPTH_DEFAULT);
+ ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(nativeImageSource, true);
+ std::string url = imageUrl.GetUrl();
+
+ VisualFactory factory = VisualFactory::Get();
+ DALI_TEST_CHECK(factory);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Toolkit::Visual::Property::TYPE, Visual::IMAGE);
+ propertyMap.Insert(ImageVisual::Property::URL, url);
+
+ Visual::Base visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK(visual);
+
+ DummyControl actor = DummyControl::New();
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ dummyImpl.RegisterVisual(Control::CONTROL_PROPERTY_END_INDEX + 1, visual);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 0u, TEST_LOCATION);
+
+ application.GetScene().Add(actor);
+
+ DALI_TEST_EQUALS(actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(16);
+
+ Renderer renderer = actor.GetRendererAt(0);
+ Shader shader = renderer.GetShader();
+
+ Property::Value value = shader.GetProperty(Shader::Property::PROGRAM);
+ DALI_TEST_CHECK(value.GetType() == Property::MAP);
+ const Property::Map* outMap = value.GetMap();
+ std::string fragmentShader = (*outMap)["fragment"].Get<std::string>();
+
+ const char* fragmentPrefix = Dali::NativeImageSourceTest::GetCustomFragmentPrefix();
+ size_t pos = fragmentShader.find(fragmentPrefix);
+
+ DALI_TEST_EQUALS(pos != std::string::npos, true, TEST_LOCATION);
+
+ // Check whether preMultipliedAlpha is true.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, true, TEST_LOCATION);
+
END_TEST;
}
tet_infoline("Use Native Image as url and Use custom shader");
NativeImageSourcePtr nativeImageSource = NativeImageSource::New(500, 500, NativeImageSource::COLOR_DEPTH_DEFAULT);
- ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(nativeImageSource);
+ ImageUrl imageUrl = Dali::Toolkit::Image::GenerateUrl(nativeImageSource, true);
std::string url = imageUrl.GetUrl();
VisualFactory factory = VisualFactory::Get();
DALI_TEST_EQUALS(std::string(fragmentPrefix) + customFragmentShaderSource, fragmentShaderSource, TEST_LOCATION);
+ // Check whether preMultipliedAlpha is false.
+ // Note : We dont use preMultiplied alpha when app developer using custom shader.
+ auto preMultipliedAlpha = renderer.GetProperty<bool>(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA);
+ DALI_TEST_EQUALS(preMultipliedAlpha, false, TEST_LOCATION);
+
END_TEST;
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
std::string url2;
std::string url3;
std::string url4;
+ std::string url5;
+ std::string url6;
// scope to ensure texturesets are kept alive by texture manager
{
auto texture = Texture::New(Dali::TextureType::TEXTURE_2D, Pixel::RGBA8888, 88, 99);
DALI_TEST_CHECK(url4 != url);
DALI_TEST_CHECK(url4 != url2);
DALI_TEST_CHECK(url4 != url3);
+
+ // add same texture again with preMultiplied, should give new Url
+ url5 = TextureManager::AddTexture(texture, true);
+ DALI_TEST_CHECK(url5.size() > 0u);
+ DALI_TEST_CHECK(url5 != url);
+ DALI_TEST_CHECK(url5 != url2);
+ DALI_TEST_CHECK(url5 != url3);
+ DALI_TEST_CHECK(url5 != url4);
+
+ textureSet = TextureSet::New();
+ url6 = TextureManager::AddTexture(textureSet, true);
+ DALI_TEST_CHECK(url6.size() > 0u);
+ DALI_TEST_CHECK(url6 != url);
+ DALI_TEST_CHECK(url6 != url2);
+ DALI_TEST_CHECK(url6 != url3);
+ DALI_TEST_CHECK(url6 != url4);
+ DALI_TEST_CHECK(url6 != url5);
}
auto textureSet = TextureManager::RemoveTexture(url);
textureSet = TextureManager::RemoveTexture(url4);
DALI_TEST_CHECK(!textureSet && "Texture needs to be removed from texture manager");
+ textureSet = TextureManager::RemoveTexture(url5);
+ DALI_TEST_CHECK(textureSet && "Texture needs to be non empty handle");
+ textureSet = TextureManager::RemoveTexture(url5);
+ DALI_TEST_CHECK(!textureSet && "Texture needs to be removed from texture manager");
+
+ textureSet = TextureManager::RemoveTexture(url6);
+ DALI_TEST_CHECK(textureSet && "Texture needs to be non empty handle");
+ textureSet = TextureManager::RemoveTexture(url6);
+ DALI_TEST_CHECK(!textureSet && "Texture needs to be removed from texture manager");
+
END_TEST;
}
Property::Map imagePropertyMap;
imagePropertyMap.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE);
imagePropertyMap.Insert(Toolkit::ImageVisual::Property::URL, imageUrl.GetUrl());
- // To make sure this visual call LoadTexture API immediate.
- imagePropertyMap.Insert(Toolkit::ImageVisual::Property::LOAD_POLICY, Toolkit::ImageVisual::LoadPolicy::IMMEDIATE);
- imagePropertyMap.Insert(Toolkit::ImageVisual::Property::RELEASE_POLICY, Toolkit::ImageVisual::ReleasePolicy::DESTROYED);
// To flip rendered scene without CameraActor::SetInvertYAxis() to avoid backface culling.
imagePropertyMap.Insert(Toolkit::ImageVisual::Property::PIXEL_AREA, Vector4(0.0f, 1.0f, 1.0f, -1.0f));
mVisual = Toolkit::VisualFactory::Get().CreateVisual(imagePropertyMap);
- // Use premultiplied alpha when we use FBO
- if(mVisual)
- {
- Toolkit::GetImplementation(mVisual).EnablePreMultipliedAlpha(true);
- }
-
Toolkit::DevelControl::RegisterVisual(*this, RENDERING_BUFFER, mVisual);
mRenderTask.SetFrameBuffer(mFrameBuffer);
mediump vec3 v = normalize(vPositionToCamera); // Vector from surface point to camera
mediump float NdotV = clamp(abs(dot(n, v)), 0.001, 1.0);
mediump vec3 reflection = -normalize(reflect(v, n));
- lowp vec3 brdf = linear(texture(sbrdfLUT, vec2(NdotV, 1.0 - perceptualRoughness)).rgb);
+ lowp vec3 brdf = texture(sbrdfLUT, vec2(NdotV, 1.0 - perceptualRoughness)).rgb;
vec3 Fr = max(vec3(1.0 - perceptualRoughness), f0) - f0;
vec3 k_S = f0 + Fr * pow(1.0 - NdotV, 5.0);
vec3 FssEss = specularWeight * (k_S * brdf.x + brdf.y);
}
}
+ if(auto proc = params.input->mAnimationPropertyProcessor) // optional processing
+ {
+ Property::Map map;
+ ParseProperties(tnAnim, map);
+ proc(animDef, std::move(map), mOnError);
+ }
+
if(overwrite)
{
*iFind = std::move(animDef);
{
iFind = definitions.insert(iFind, std::move(animDef));
}
-
- if(auto proc = params.input->mAnimationPropertyProcessor) // optional processing
- {
- Property::Map map;
- ParseProperties(tnAnim, map);
- proc(animDef, std::move(map), mOnError);
- }
}
}
const json::Reader<gltf2::Buffer>& GetBufferReader()
{
static const auto BUFFER_READER = std::move(json::Reader<gltf2::Buffer>()
- .Register(*json::MakeProperty("byteLength", json::Read::Number<uint32_t>, &gltf2::Buffer::mByteLength))
- .Register(*json::MakeProperty("uri", json::Read::StringView, &gltf2::Buffer::mUri)));
+ .Register(*json::MakeProperty("byteLength", json::Read::Number<uint32_t>, &gltf2::Buffer::mByteLength))
+ .Register(*json::MakeProperty("uri", json::Read::StringView, &gltf2::Buffer::mUri)));
return BUFFER_READER;
}
const json::Reader<gltf2::BufferView>& GetBufferViewReader()
{
static const auto BUFFER_VIEW_READER = std::move(json::Reader<gltf2::BufferView>()
- .Register(*json::MakeProperty("buffer", gltf2::RefReader<gltf2::Document>::Read<gltf2::Buffer, &gltf2::Document::mBuffers>, &gltf2::BufferView::mBuffer))
- .Register(*json::MakeProperty("byteOffset", json::Read::Number<uint32_t>, &gltf2::BufferView::mByteOffset))
- .Register(*json::MakeProperty("byteLength", json::Read::Number<uint32_t>, &gltf2::BufferView::mByteLength))
- .Register(*json::MakeProperty("byteStride", json::Read::Number<uint32_t>, &gltf2::BufferView::mByteStride))
- .Register(*json::MakeProperty("target", json::Read::Number<uint32_t>, &gltf2::BufferView::mTarget)));
+ .Register(*json::MakeProperty("buffer", gltf2::RefReader<gltf2::Document>::Read<gltf2::Buffer, &gltf2::Document::mBuffers>, &gltf2::BufferView::mBuffer))
+ .Register(*json::MakeProperty("byteOffset", json::Read::Number<uint32_t>, &gltf2::BufferView::mByteOffset))
+ .Register(*json::MakeProperty("byteLength", json::Read::Number<uint32_t>, &gltf2::BufferView::mByteLength))
+ .Register(*json::MakeProperty("byteStride", json::Read::Number<uint32_t>, &gltf2::BufferView::mByteStride))
+ .Register(*json::MakeProperty("target", json::Read::Number<uint32_t>, &gltf2::BufferView::mTarget)));
return BUFFER_VIEW_READER;
}
const json::Reader<gltf2::BufferViewClient>& GetBufferViewClientReader()
{
static const auto BUFFER_VIEW_CLIENT_READER = std::move(json::Reader<gltf2::BufferViewClient>()
- .Register(*json::MakeProperty("bufferView", gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>, &gltf2::BufferViewClient::mBufferView))
- .Register(*json::MakeProperty("byteOffset", json::Read::Number<uint32_t>, &gltf2::BufferViewClient::mByteOffset)));
+ .Register(*json::MakeProperty("bufferView", gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>, &gltf2::BufferViewClient::mBufferView))
+ .Register(*json::MakeProperty("byteOffset", json::Read::Number<uint32_t>, &gltf2::BufferViewClient::mByteOffset)));
return BUFFER_VIEW_CLIENT_READER;
}
const json::Reader<gltf2::ComponentTypedBufferViewClient>& GetComponentTypedBufferViewClientReader()
{
static const auto COMPONENT_TYPED_BUFFER_VIEW_CLIENT_READER = std::move(json::Reader<gltf2::ComponentTypedBufferViewClient>()
- .Register(*new json::Property<gltf2::ComponentTypedBufferViewClient, gltf2::Ref<gltf2::BufferView>>("bufferView", gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>, &gltf2::ComponentTypedBufferViewClient::mBufferView))
- .Register(*new json::Property<gltf2::ComponentTypedBufferViewClient, uint32_t>("byteOffset", json::Read::Number<uint32_t>, &gltf2::ComponentTypedBufferViewClient::mByteOffset))
- .Register(*json::MakeProperty("componentType", json::Read::Enum<gltf2::Component::Type>, &gltf2::ComponentTypedBufferViewClient::mComponentType)));
+ .Register(*new json::Property<gltf2::ComponentTypedBufferViewClient, gltf2::Ref<gltf2::BufferView>>("bufferView", gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>, &gltf2::ComponentTypedBufferViewClient::mBufferView))
+ .Register(*new json::Property<gltf2::ComponentTypedBufferViewClient, uint32_t>("byteOffset", json::Read::Number<uint32_t>, &gltf2::ComponentTypedBufferViewClient::mByteOffset))
+ .Register(*json::MakeProperty("componentType", json::Read::Enum<gltf2::Component::Type>, &gltf2::ComponentTypedBufferViewClient::mComponentType)));
return COMPONENT_TYPED_BUFFER_VIEW_CLIENT_READER;
}
const json::Reader<gltf2::Accessor::Sparse>& GetAccessorSparseReader()
{
static const auto ACCESSOR_SPARSE_READER = std::move(json::Reader<gltf2::Accessor::Sparse>()
- .Register(*json::MakeProperty("count", json::Read::Number<uint32_t>, &gltf2::Accessor::Sparse::mCount))
- .Register(*json::MakeProperty("indices", json::ObjectReader<gltf2::ComponentTypedBufferViewClient>::Read, &gltf2::Accessor::Sparse::mIndices))
- .Register(*json::MakeProperty("values", json::ObjectReader<gltf2::BufferViewClient>::Read, &gltf2::Accessor::Sparse::mValues)));
+ .Register(*json::MakeProperty("count", json::Read::Number<uint32_t>, &gltf2::Accessor::Sparse::mCount))
+ .Register(*json::MakeProperty("indices", json::ObjectReader<gltf2::ComponentTypedBufferViewClient>::Read, &gltf2::Accessor::Sparse::mIndices))
+ .Register(*json::MakeProperty("values", json::ObjectReader<gltf2::BufferViewClient>::Read, &gltf2::Accessor::Sparse::mValues)));
return ACCESSOR_SPARSE_READER;
}
const json::Reader<gltf2::Accessor>& GetAccessorReader()
{
static const auto ACCESSOR_READER = std::move(json::Reader<gltf2::Accessor>()
- .Register(*new json::Property<gltf2::Accessor, gltf2::Ref<gltf2::BufferView>>("bufferView",
- gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>,
- &gltf2::Accessor::mBufferView))
- .Register(*new json::Property<gltf2::Accessor, uint32_t>("byteOffset",
- json::Read::Number<uint32_t>,
- &gltf2::Accessor::mByteOffset))
- .Register(*new json::Property<gltf2::Accessor, gltf2::Component::Type>("componentType",
- json::Read::Enum<gltf2::Component::Type>,
- &gltf2::Accessor::mComponentType))
- .Register(*new json::Property<gltf2::Accessor, std::string_view>("name", json::Read::StringView, &gltf2::Accessor::mName))
- .Register(*json::MakeProperty("count", json::Read::Number<uint32_t>, &gltf2::Accessor::mCount))
- .Register(*json::MakeProperty("normalized", json::Read::Boolean, &gltf2::Accessor::mNormalized))
- .Register(*json::MakeProperty("type", gltf2::ReadStringEnum<gltf2::AccessorType>, &gltf2::Accessor::mType))
- .Register(*json::MakeProperty("min", json::Read::Array<float, json::Read::Number>, &gltf2::Accessor::mMin))
- .Register(*json::MakeProperty("max", json::Read::Array<float, json::Read::Number>, &gltf2::Accessor::mMax))
- .Register(*new json::Property<gltf2::Accessor, gltf2::Accessor::Sparse>("sparse", json::ObjectReader<gltf2::Accessor::Sparse>::Read, &gltf2::Accessor::SetSparse)));
+ .Register(*new json::Property<gltf2::Accessor, gltf2::Ref<gltf2::BufferView>>("bufferView",
+ gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>,
+ &gltf2::Accessor::mBufferView))
+ .Register(*new json::Property<gltf2::Accessor, uint32_t>("byteOffset",
+ json::Read::Number<uint32_t>,
+ &gltf2::Accessor::mByteOffset))
+ .Register(*new json::Property<gltf2::Accessor, gltf2::Component::Type>("componentType",
+ json::Read::Enum<gltf2::Component::Type>,
+ &gltf2::Accessor::mComponentType))
+ .Register(*new json::Property<gltf2::Accessor, std::string_view>("name", json::Read::StringView, &gltf2::Accessor::mName))
+ .Register(*json::MakeProperty("count", json::Read::Number<uint32_t>, &gltf2::Accessor::mCount))
+ .Register(*json::MakeProperty("normalized", json::Read::Boolean, &gltf2::Accessor::mNormalized))
+ .Register(*json::MakeProperty("type", gltf2::ReadStringEnum<gltf2::AccessorType>, &gltf2::Accessor::mType))
+ .Register(*json::MakeProperty("min", json::Read::Array<float, json::Read::Number>, &gltf2::Accessor::mMin))
+ .Register(*json::MakeProperty("max", json::Read::Array<float, json::Read::Number>, &gltf2::Accessor::mMax))
+ .Register(*new json::Property<gltf2::Accessor, gltf2::Accessor::Sparse>("sparse", json::ObjectReader<gltf2::Accessor::Sparse>::Read, &gltf2::Accessor::SetSparse)));
return ACCESSOR_READER;
}
const json::Reader<gltf2::Image>& GetImageReader()
{
static const auto IMAGE_READER = std::move(json::Reader<gltf2::Image>()
- .Register(*new json::Property<gltf2::Image, std::string_view>("name", json::Read::StringView, &gltf2::Material::mName))
- .Register(*json::MakeProperty("uri", json::Read::StringView, &gltf2::Image::mUri))
- .Register(*json::MakeProperty("mimeType", json::Read::StringView, &gltf2::Image::mMimeType))
- .Register(*json::MakeProperty("bufferView", gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>, &gltf2::Image::mBufferView)));
+ .Register(*new json::Property<gltf2::Image, std::string_view>("name", json::Read::StringView, &gltf2::Material::mName))
+ .Register(*json::MakeProperty("uri", json::Read::StringView, &gltf2::Image::mUri))
+ .Register(*json::MakeProperty("mimeType", json::Read::StringView, &gltf2::Image::mMimeType))
+ .Register(*json::MakeProperty("bufferView", gltf2::RefReader<gltf2::Document>::Read<gltf2::BufferView, &gltf2::Document::mBufferViews>, &gltf2::Image::mBufferView)));
return IMAGE_READER;
}
const json::Reader<gltf2::Sampler>& GetSamplerReader()
{
static const auto SAMPLER_READER = std::move(json::Reader<gltf2::Sampler>()
- .Register(*json::MakeProperty("minFilter", json::Read::Enum<gltf2::Filter::Type>, &gltf2::Sampler::mMinFilter))
- .Register(*json::MakeProperty("magFilter", json::Read::Enum<gltf2::Filter::Type>, &gltf2::Sampler::mMagFilter))
- .Register(*json::MakeProperty("wrapS", json::Read::Enum<gltf2::Wrap::Type>, &gltf2::Sampler::mWrapS))
- .Register(*json::MakeProperty("wrapT", json::Read::Enum<gltf2::Wrap::Type>, &gltf2::Sampler::mWrapT)));
+ .Register(*json::MakeProperty("minFilter", json::Read::Enum<gltf2::Filter::Type>, &gltf2::Sampler::mMinFilter))
+ .Register(*json::MakeProperty("magFilter", json::Read::Enum<gltf2::Filter::Type>, &gltf2::Sampler::mMagFilter))
+ .Register(*json::MakeProperty("wrapS", json::Read::Enum<gltf2::Wrap::Type>, &gltf2::Sampler::mWrapS))
+ .Register(*json::MakeProperty("wrapT", json::Read::Enum<gltf2::Wrap::Type>, &gltf2::Sampler::mWrapT)));
return SAMPLER_READER;
}
const json::Reader<gltf2::Texture>& GetTextureReader()
{
static const auto TEXURE_READER = std::move(json::Reader<gltf2::Texture>()
- .Register(*json::MakeProperty("source", gltf2::RefReader<gltf2::Document>::Read<gltf2::Image, &gltf2::Document::mImages>, &gltf2::Texture::mSource))
- .Register(*json::MakeProperty("sampler", gltf2::RefReader<gltf2::Document>::Read<gltf2::Sampler, &gltf2::Document::mSamplers>, &gltf2::Texture::mSampler)));
+ .Register(*json::MakeProperty("source", gltf2::RefReader<gltf2::Document>::Read<gltf2::Image, &gltf2::Document::mImages>, &gltf2::Texture::mSource))
+ .Register(*json::MakeProperty("sampler", gltf2::RefReader<gltf2::Document>::Read<gltf2::Sampler, &gltf2::Document::mSamplers>, &gltf2::Texture::mSampler)));
return TEXURE_READER;
}
const json::Reader<gltf2::TextureInfo>& GetTextureInfoReader()
{
static const auto TEXURE_INFO_READER = std::move(json::Reader<gltf2::TextureInfo>()
- .Register(*json::MakeProperty("index", gltf2::RefReader<gltf2::Document>::Read<gltf2::Texture, &gltf2::Document::mTextures>, &gltf2::TextureInfo::mTexture))
- .Register(*json::MakeProperty("texCoord", json::Read::Number<uint32_t>, &gltf2::TextureInfo::mTexCoord))
- .Register(*json::MakeProperty("scale", json::Read::Number<float>, &gltf2::TextureInfo::mScale))
- .Register(*json::MakeProperty("strength", json::Read::Number<float>, &gltf2::TextureInfo::mStrength)));
+ .Register(*json::MakeProperty("index", gltf2::RefReader<gltf2::Document>::Read<gltf2::Texture, &gltf2::Document::mTextures>, &gltf2::TextureInfo::mTexture))
+ .Register(*json::MakeProperty("texCoord", json::Read::Number<uint32_t>, &gltf2::TextureInfo::mTexCoord))
+ .Register(*json::MakeProperty("scale", json::Read::Number<float>, &gltf2::TextureInfo::mScale))
+ .Register(*json::MakeProperty("strength", json::Read::Number<float>, &gltf2::TextureInfo::mStrength)));
return TEXURE_INFO_READER;
}
const json::Reader<gltf2::Material::Pbr>& GetMaterialPbrReader()
{
static const auto MATERIAL_PBR_READER = std::move(json::Reader<gltf2::Material::Pbr>()
- .Register(*json::MakeProperty("baseColorFactor", gltf2::ReadDaliVector<Vector4>, &gltf2::Material::Pbr::mBaseColorFactor))
- .Register(*json::MakeProperty("baseColorTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::Pbr::mBaseColorTexture))
- .Register(*json::MakeProperty("metallicFactor", json::Read::Number<float>, &gltf2::Material::Pbr::mMetallicFactor))
- .Register(*json::MakeProperty("roughnessFactor", json::Read::Number<float>, &gltf2::Material::Pbr::mRoughnessFactor))
- .Register(*json::MakeProperty("metallicRoughnessTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::Pbr::mMetallicRoughnessTexture)));
+ .Register(*json::MakeProperty("baseColorFactor", gltf2::ReadDaliVector<Vector4>, &gltf2::Material::Pbr::mBaseColorFactor))
+ .Register(*json::MakeProperty("baseColorTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::Pbr::mBaseColorTexture))
+ .Register(*json::MakeProperty("metallicFactor", json::Read::Number<float>, &gltf2::Material::Pbr::mMetallicFactor))
+ .Register(*json::MakeProperty("roughnessFactor", json::Read::Number<float>, &gltf2::Material::Pbr::mRoughnessFactor))
+ .Register(*json::MakeProperty("metallicRoughnessTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::Pbr::mMetallicRoughnessTexture)));
return MATERIAL_PBR_READER;
}
const json::Reader<gltf2::MaterialSpecular>& GetMaterialSpecularReader()
{
static const auto MATERIAL_SPECULAR_READER = std::move(json::Reader<gltf2::MaterialSpecular>()
- .Register(*json::MakeProperty("specularFactor", json::Read::Number<float>, &gltf2::MaterialSpecular::mSpecularFactor))
- .Register(*json::MakeProperty("specularTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::MaterialSpecular::mSpecularTexture))
- .Register(*json::MakeProperty("specularColorFactor", gltf2::ReadDaliVector<Vector3>, &gltf2::MaterialSpecular::mSpecularColorFactor))
- .Register(*json::MakeProperty("specularColorTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::MaterialSpecular::mSpecularColorTexture)));
+ .Register(*json::MakeProperty("specularFactor", json::Read::Number<float>, &gltf2::MaterialSpecular::mSpecularFactor))
+ .Register(*json::MakeProperty("specularTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::MaterialSpecular::mSpecularTexture))
+ .Register(*json::MakeProperty("specularColorFactor", gltf2::ReadDaliVector<Vector3>, &gltf2::MaterialSpecular::mSpecularColorFactor))
+ .Register(*json::MakeProperty("specularColorTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::MaterialSpecular::mSpecularColorTexture)));
return MATERIAL_SPECULAR_READER;
}
const json::Reader<gltf2::MaterialIor>& GetMaterialIorReader()
{
static const auto MATERIAL_IOR_READER = std::move(json::Reader<gltf2::MaterialIor>()
- .Register(*json::MakeProperty("ior", json::Read::Number<float>, &gltf2::MaterialIor::mIor)));
+ .Register(*json::MakeProperty("ior", json::Read::Number<float>, &gltf2::MaterialIor::mIor)));
return MATERIAL_IOR_READER;
}
const json::Reader<gltf2::MaterialExtensions>& GetMaterialExtensionsReader()
{
static const auto MATERIAL_EXTENSION_READER = std::move(json::Reader<gltf2::MaterialExtensions>()
- .Register(*json::MakeProperty("KHR_materials_ior", json::ObjectReader<gltf2::MaterialIor>::Read, &gltf2::MaterialExtensions::mMaterialIor))
- .Register(*json::MakeProperty("KHR_materials_specular", json::ObjectReader<gltf2::MaterialSpecular>::Read, &gltf2::MaterialExtensions::mMaterialSpecular)));
+ .Register(*json::MakeProperty("KHR_materials_ior", json::ObjectReader<gltf2::MaterialIor>::Read, &gltf2::MaterialExtensions::mMaterialIor))
+ .Register(*json::MakeProperty("KHR_materials_specular", json::ObjectReader<gltf2::MaterialSpecular>::Read, &gltf2::MaterialExtensions::mMaterialSpecular)));
return MATERIAL_EXTENSION_READER;
}
const json::Reader<gltf2::Material>& GetMaterialReader()
{
static const auto MATERIAL_READER = std::move(json::Reader<gltf2::Material>()
- .Register(*new json::Property<gltf2::Material, std::string_view>("name", json::Read::StringView, &gltf2::Material::mName))
- .Register(*json::MakeProperty("pbrMetallicRoughness", json::ObjectReader<gltf2::Material::Pbr>::Read, &gltf2::Material::mPbrMetallicRoughness))
- .Register(*json::MakeProperty("normalTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::mNormalTexture))
- .Register(*json::MakeProperty("occlusionTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::mOcclusionTexture))
- .Register(*json::MakeProperty("emissiveTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::mEmissiveTexture))
- .Register(*json::MakeProperty("emissiveFactor", gltf2::ReadDaliVector<Vector3>, &gltf2::Material::mEmissiveFactor))
- .Register(*json::MakeProperty("alphaMode", gltf2::ReadStringEnum<gltf2::AlphaMode>, &gltf2::Material::mAlphaMode))
- .Register(*json::MakeProperty("alphaCutoff", json::Read::Number<float>, &gltf2::Material::mAlphaCutoff))
- .Register(*json::MakeProperty("doubleSided", json::Read::Boolean, &gltf2::Material::mDoubleSided))
- .Register(*json::MakeProperty("extensions", json::ObjectReader<gltf2::MaterialExtensions>::Read, &gltf2::Material::mMaterialExtensions)));
+ .Register(*new json::Property<gltf2::Material, std::string_view>("name", json::Read::StringView, &gltf2::Material::mName))
+ .Register(*json::MakeProperty("pbrMetallicRoughness", json::ObjectReader<gltf2::Material::Pbr>::Read, &gltf2::Material::mPbrMetallicRoughness))
+ .Register(*json::MakeProperty("normalTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::mNormalTexture))
+ .Register(*json::MakeProperty("occlusionTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::mOcclusionTexture))
+ .Register(*json::MakeProperty("emissiveTexture", json::ObjectReader<gltf2::TextureInfo>::Read, &gltf2::Material::mEmissiveTexture))
+ .Register(*json::MakeProperty("emissiveFactor", gltf2::ReadDaliVector<Vector3>, &gltf2::Material::mEmissiveFactor))
+ .Register(*json::MakeProperty("alphaMode", gltf2::ReadStringEnum<gltf2::AlphaMode>, &gltf2::Material::mAlphaMode))
+ .Register(*json::MakeProperty("alphaCutoff", json::Read::Number<float>, &gltf2::Material::mAlphaCutoff))
+ .Register(*json::MakeProperty("doubleSided", json::Read::Boolean, &gltf2::Material::mDoubleSided))
+ .Register(*json::MakeProperty("extensions", json::ObjectReader<gltf2::MaterialExtensions>::Read, &gltf2::Material::mMaterialExtensions)));
return MATERIAL_READER;
}
const json::Reader<gltf2::Mesh::Primitive>& GetMeshPrimitiveReader()
{
static const auto MESH_PRIMITIVE_READER = std::move(json::Reader<gltf2::Mesh::Primitive>()
- .Register(*json::MakeProperty("attributes", ReadMeshPrimitiveAttributes, &gltf2::Mesh::Primitive::mAttributes))
- .Register(*json::MakeProperty("indices", gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>, &gltf2::Mesh::Primitive::mIndices))
- .Register(*json::MakeProperty("material", gltf2::RefReader<gltf2::Document>::Read<gltf2::Material, &gltf2::Document::mMaterials>, &gltf2::Mesh::Primitive::mMaterial))
- .Register(*json::MakeProperty("mode", json::Read::Enum<gltf2::Mesh::Primitive::Mode>, &gltf2::Mesh::Primitive::mMode))
- .Register(*json::MakeProperty("targets", ReadMeshPrimitiveTargets, &gltf2::Mesh::Primitive::mTargets)));
+ .Register(*json::MakeProperty("attributes", ReadMeshPrimitiveAttributes, &gltf2::Mesh::Primitive::mAttributes))
+ .Register(*json::MakeProperty("indices", gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>, &gltf2::Mesh::Primitive::mIndices))
+ .Register(*json::MakeProperty("material", gltf2::RefReader<gltf2::Document>::Read<gltf2::Material, &gltf2::Document::mMaterials>, &gltf2::Mesh::Primitive::mMaterial))
+ .Register(*json::MakeProperty("mode", json::Read::Enum<gltf2::Mesh::Primitive::Mode>, &gltf2::Mesh::Primitive::mMode))
+ .Register(*json::MakeProperty("targets", ReadMeshPrimitiveTargets, &gltf2::Mesh::Primitive::mTargets)));
return MESH_PRIMITIVE_READER;
}
const json::Reader<gltf2::Mesh>& GetMeshReader()
{
static const auto MESH_READER = std::move(json::Reader<gltf2::Mesh>()
- .Register(*new json::Property<gltf2::Mesh, std::string_view>("name", json::Read::StringView, &gltf2::Mesh::mName))
- .Register(*json::MakeProperty("primitives",
- json::Read::Array<gltf2::Mesh::Primitive, json::ObjectReader<gltf2::Mesh::Primitive>::Read>,
- &gltf2::Mesh::mPrimitives))
- .Register(*json::MakeProperty("weights", json::Read::Array<float, json::Read::Number>, &gltf2::Mesh::mWeights)));
+ .Register(*new json::Property<gltf2::Mesh, std::string_view>("name", json::Read::StringView, &gltf2::Mesh::mName))
+ .Register(*json::MakeProperty("primitives",
+ json::Read::Array<gltf2::Mesh::Primitive, json::ObjectReader<gltf2::Mesh::Primitive>::Read>,
+ &gltf2::Mesh::mPrimitives))
+ .Register(*json::MakeProperty("weights", json::Read::Array<float, json::Read::Number>, &gltf2::Mesh::mWeights)));
return MESH_READER;
}
const json::Reader<gltf2::Skin>& GetSkinReader()
{
static const auto SKIN_READER = std::move(json::Reader<gltf2::Skin>()
- .Register(*new json::Property<gltf2::Skin, std::string_view>("name", json::Read::StringView, &gltf2::Skin::mName))
- .Register(*json::MakeProperty("inverseBindMatrices",
- gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>,
- &gltf2::Skin::mInverseBindMatrices))
- .Register(*json::MakeProperty("skeleton",
- gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>,
- &gltf2::Skin::mSkeleton))
- .Register(*json::MakeProperty("joints",
- json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
- &gltf2::Skin::mJoints)));
+ .Register(*new json::Property<gltf2::Skin, std::string_view>("name", json::Read::StringView, &gltf2::Skin::mName))
+ .Register(*json::MakeProperty("inverseBindMatrices",
+ gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>,
+ &gltf2::Skin::mInverseBindMatrices))
+ .Register(*json::MakeProperty("skeleton",
+ gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>,
+ &gltf2::Skin::mSkeleton))
+ .Register(*json::MakeProperty("joints",
+ json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
+ &gltf2::Skin::mJoints)));
return SKIN_READER;
}
const json::Reader<gltf2::Camera::Perspective>& GetCameraPerspectiveReader()
{
static const auto CAMERA_PERSPECTIVE_READER = std::move(json::Reader<gltf2::Camera::Perspective>()
- .Register(*json::MakeProperty("aspectRatio", json::Read::Number<float>, &gltf2::Camera::Perspective::mAspectRatio))
- .Register(*json::MakeProperty("yfov", json::Read::Number<float>, &gltf2::Camera::Perspective::mYFov))
- .Register(*json::MakeProperty("zfar", json::Read::Number<float>, &gltf2::Camera::Perspective::mZFar))
- .Register(*json::MakeProperty("znear", json::Read::Number<float>, &gltf2::Camera::Perspective::mZNear))); // TODO: infinite perspective projection, where znear is omitted
+ .Register(*json::MakeProperty("aspectRatio", json::Read::Number<float>, &gltf2::Camera::Perspective::mAspectRatio))
+ .Register(*json::MakeProperty("yfov", json::Read::Number<float>, &gltf2::Camera::Perspective::mYFov))
+ .Register(*json::MakeProperty("zfar", json::Read::Number<float>, &gltf2::Camera::Perspective::mZFar))
+ .Register(*json::MakeProperty("znear", json::Read::Number<float>, &gltf2::Camera::Perspective::mZNear))); // TODO: infinite perspective projection, where znear is omitted
return CAMERA_PERSPECTIVE_READER;
}
const json::Reader<gltf2::Camera::Orthographic>& GetCameraOrthographicReader()
{
static const auto CAMERA_ORTHOGRAPHIC_READER = std::move(json::Reader<gltf2::Camera::Orthographic>()
- .Register(*json::MakeProperty("xmag", json::Read::Number<float>, &gltf2::Camera::Orthographic::mXMag))
- .Register(*json::MakeProperty("ymag", json::Read::Number<float>, &gltf2::Camera::Orthographic::mYMag))
- .Register(*json::MakeProperty("zfar", json::Read::Number<float>, &gltf2::Camera::Orthographic::mZFar))
- .Register(*json::MakeProperty("znear", json::Read::Number<float>, &gltf2::Camera::Orthographic::mZNear)));
+ .Register(*json::MakeProperty("xmag", json::Read::Number<float>, &gltf2::Camera::Orthographic::mXMag))
+ .Register(*json::MakeProperty("ymag", json::Read::Number<float>, &gltf2::Camera::Orthographic::mYMag))
+ .Register(*json::MakeProperty("zfar", json::Read::Number<float>, &gltf2::Camera::Orthographic::mZFar))
+ .Register(*json::MakeProperty("znear", json::Read::Number<float>, &gltf2::Camera::Orthographic::mZNear)));
return CAMERA_ORTHOGRAPHIC_READER;
}
const json::Reader<gltf2::Camera>& GetCameraReader()
{
static const auto CAMERA_READER = std::move(json::Reader<gltf2::Camera>()
- .Register(*new json::Property<gltf2::Camera, std::string_view>("name", json::Read::StringView, &gltf2::Camera::mName))
- .Register(*json::MakeProperty("type", json::Read::StringView, &gltf2::Camera::mType))
- .Register(*json::MakeProperty("perspective", json::ObjectReader<gltf2::Camera::Perspective>::Read, &gltf2::Camera::mPerspective))
- .Register(*json::MakeProperty("orthographic", json::ObjectReader<gltf2::Camera::Orthographic>::Read, &gltf2::Camera::mOrthographic)));
+ .Register(*new json::Property<gltf2::Camera, std::string_view>("name", json::Read::StringView, &gltf2::Camera::mName))
+ .Register(*json::MakeProperty("type", json::Read::StringView, &gltf2::Camera::mType))
+ .Register(*json::MakeProperty("perspective", json::ObjectReader<gltf2::Camera::Perspective>::Read, &gltf2::Camera::mPerspective))
+ .Register(*json::MakeProperty("orthographic", json::ObjectReader<gltf2::Camera::Orthographic>::Read, &gltf2::Camera::mOrthographic)));
return CAMERA_READER;
}
const json::Reader<gltf2::Node>& GetNodeReader()
{
static const auto NODE_READER = std::move(json::Reader<gltf2::Node>()
- .Register(*new json::Property<gltf2::Node, std::string_view>("name", json::Read::StringView, &gltf2::Node::mName))
- .Register(*json::MakeProperty("translation", gltf2::ReadDaliVector<Vector3>, &gltf2::Node::mTranslation))
- .Register(*json::MakeProperty("rotation", gltf2::ReadQuaternion, &gltf2::Node::mRotation))
- .Register(*json::MakeProperty("scale", gltf2::ReadDaliVector<Vector3>, &gltf2::Node::mScale))
- .Register(*new json::Property<gltf2::Node, Matrix>("matrix", gltf2::ReadDaliVector<Matrix>, &gltf2::Node::SetMatrix))
- .Register(*json::MakeProperty("camera", gltf2::RefReader<gltf2::Document>::Read<gltf2::Camera, &gltf2::Document::mCameras>, &gltf2::Node::mCamera))
- .Register(*json::MakeProperty("children", json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>, &gltf2::Node::mChildren))
- .Register(*json::MakeProperty("mesh", gltf2::RefReader<gltf2::Document>::Read<gltf2::Mesh, &gltf2::Document::mMeshes>, &gltf2::Node::mMesh))
- .Register(*json::MakeProperty("skin", gltf2::RefReader<gltf2::Document>::Read<gltf2::Skin, &gltf2::Document::mSkins>, &gltf2::Node::mSkin)));
+ .Register(*new json::Property<gltf2::Node, std::string_view>("name", json::Read::StringView, &gltf2::Node::mName))
+ .Register(*json::MakeProperty("translation", gltf2::ReadDaliVector<Vector3>, &gltf2::Node::mTranslation))
+ .Register(*json::MakeProperty("rotation", gltf2::ReadQuaternion, &gltf2::Node::mRotation))
+ .Register(*json::MakeProperty("scale", gltf2::ReadDaliVector<Vector3>, &gltf2::Node::mScale))
+ .Register(*new json::Property<gltf2::Node, Matrix>("matrix", gltf2::ReadDaliVector<Matrix>, &gltf2::Node::SetMatrix))
+ .Register(*json::MakeProperty("camera", gltf2::RefReader<gltf2::Document>::Read<gltf2::Camera, &gltf2::Document::mCameras>, &gltf2::Node::mCamera))
+ .Register(*json::MakeProperty("children", json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>, &gltf2::Node::mChildren))
+ .Register(*json::MakeProperty("mesh", gltf2::RefReader<gltf2::Document>::Read<gltf2::Mesh, &gltf2::Document::mMeshes>, &gltf2::Node::mMesh))
+ .Register(*json::MakeProperty("skin", gltf2::RefReader<gltf2::Document>::Read<gltf2::Skin, &gltf2::Document::mSkins>, &gltf2::Node::mSkin)));
return NODE_READER;
}
const json::Reader<gltf2::Animation::Sampler>& GetAnimationSamplerReader()
{
static const auto ANIMATION_SAMPLER_READER = std::move(json::Reader<gltf2::Animation::Sampler>()
- .Register(*json::MakeProperty("input", gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>, &gltf2::Animation::Sampler::mInput))
- .Register(*json::MakeProperty("output", gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>, &gltf2::Animation::Sampler::mOutput))
- .Register(*json::MakeProperty("interpolation", gltf2::ReadStringEnum<gltf2::Animation::Sampler::Interpolation>, &gltf2::Animation::Sampler::mInterpolation)));
+ .Register(*json::MakeProperty("input", gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>, &gltf2::Animation::Sampler::mInput))
+ .Register(*json::MakeProperty("output", gltf2::RefReader<gltf2::Document>::Read<gltf2::Accessor, &gltf2::Document::mAccessors>, &gltf2::Animation::Sampler::mOutput))
+ .Register(*json::MakeProperty("interpolation", gltf2::ReadStringEnum<gltf2::Animation::Sampler::Interpolation>, &gltf2::Animation::Sampler::mInterpolation)));
return ANIMATION_SAMPLER_READER;
}
const json::Reader<gltf2::Animation::Channel::Target>& GetAnimationChannelTargetReader()
{
static const auto ANIMATION_TARGET_READER = std::move(json::Reader<gltf2::Animation::Channel::Target>()
- .Register(*json::MakeProperty("node", gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>, &gltf2::Animation::Channel::Target::mNode))
- .Register(*json::MakeProperty("path", gltf2::ReadStringEnum<gltf2::Animation::Channel::Target>, &gltf2::Animation::Channel::Target::mPath)));
+ .Register(*json::MakeProperty("node", gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>, &gltf2::Animation::Channel::Target::mNode))
+ .Register(*json::MakeProperty("path", gltf2::ReadStringEnum<gltf2::Animation::Channel::Target>, &gltf2::Animation::Channel::Target::mPath)));
return ANIMATION_TARGET_READER;
}
const json::Reader<gltf2::Animation::Channel>& GetAnimationChannelReader()
{
static const auto ANIMATION_CHANNEL_READER = std::move(json::Reader<gltf2::Animation::Channel>()
- .Register(*json::MakeProperty("target", json::ObjectReader<gltf2::Animation::Channel::Target>::Read, &gltf2::Animation::Channel::mTarget))
- .Register(*json::MakeProperty("sampler", gltf2::RefReader<gltf2::Animation>::Read<gltf2::Animation::Sampler, &gltf2::Animation::mSamplers>, &gltf2::Animation::Channel::mSampler)));
+ .Register(*json::MakeProperty("target", json::ObjectReader<gltf2::Animation::Channel::Target>::Read, &gltf2::Animation::Channel::mTarget))
+ .Register(*json::MakeProperty("sampler", gltf2::RefReader<gltf2::Animation>::Read<gltf2::Animation::Sampler, &gltf2::Animation::mSamplers>, &gltf2::Animation::Channel::mSampler)));
return ANIMATION_CHANNEL_READER;
}
const json::Reader<gltf2::Animation>& GetAnimationReader()
{
static const auto ANIMATION_READER = std::move(json::Reader<gltf2::Animation>()
- .Register(*new json::Property<gltf2::Animation, std::string_view>("name", json::Read::StringView, &gltf2::Animation::mName))
- .Register(*json::MakeProperty("samplers",
- json::Read::Array<gltf2::Animation::Sampler, json::ObjectReader<gltf2::Animation::Sampler>::Read>,
- &gltf2::Animation::mSamplers))
- .Register(*json::MakeProperty("channels",
- json::Read::Array<gltf2::Animation::Channel, json::ObjectReader<gltf2::Animation::Channel>::Read>,
- &gltf2::Animation::mChannels)));
+ .Register(*new json::Property<gltf2::Animation, std::string_view>("name", json::Read::StringView, &gltf2::Animation::mName))
+ .Register(*json::MakeProperty("samplers",
+ json::Read::Array<gltf2::Animation::Sampler, json::ObjectReader<gltf2::Animation::Sampler>::Read>,
+ &gltf2::Animation::mSamplers))
+ .Register(*json::MakeProperty("channels",
+ json::Read::Array<gltf2::Animation::Channel, json::ObjectReader<gltf2::Animation::Channel>::Read>,
+ &gltf2::Animation::mChannels)));
return ANIMATION_READER;
}
const json::Reader<gltf2::Scene>& GetSceneReader()
{
static const auto SCENE_READER = std::move(json::Reader<gltf2::Scene>()
- .Register(*new json::Property<gltf2::Scene, std::string_view>("name", json::Read::StringView, &gltf2::Scene::mName))
- .Register(*json::MakeProperty("nodes",
- json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
- &gltf2::Scene::mNodes)));
+ .Register(*new json::Property<gltf2::Scene, std::string_view>("name", json::Read::StringView, &gltf2::Scene::mName))
+ .Register(*json::MakeProperty("nodes",
+ json::Read::Array<gltf2::Ref<gltf2::Node>, gltf2::RefReader<gltf2::Document>::Read<gltf2::Node, &gltf2::Document::mNodes>>,
+ &gltf2::Scene::mNodes)));
return SCENE_READER;
}
const json::Reader<gltf2::Document>& GetDocumentReader()
{
static const auto DOCUMENT_READER = std::move(json::Reader<gltf2::Document>()
- .Register(*json::MakeProperty("buffers",
- json::Read::Array<gltf2::Buffer, json::ObjectReader<gltf2::Buffer>::Read>,
- &gltf2::Document::mBuffers))
- .Register(*json::MakeProperty("bufferViews",
- json::Read::Array<gltf2::BufferView, json::ObjectReader<gltf2::BufferView>::Read>,
- &gltf2::Document::mBufferViews))
- .Register(*json::MakeProperty("accessors",
- json::Read::Array<gltf2::Accessor, json::ObjectReader<gltf2::Accessor>::Read>,
- &gltf2::Document::mAccessors))
- .Register(*json::MakeProperty("images",
- json::Read::Array<gltf2::Image, json::ObjectReader<gltf2::Image>::Read>,
- &gltf2::Document::mImages))
- .Register(*json::MakeProperty("samplers",
- json::Read::Array<gltf2::Sampler, json::ObjectReader<gltf2::Sampler>::Read>,
- &gltf2::Document::mSamplers))
- .Register(*json::MakeProperty("textures",
- json::Read::Array<gltf2::Texture, json::ObjectReader<gltf2::Texture>::Read>,
- &gltf2::Document::mTextures))
- .Register(*json::MakeProperty("materials",
- json::Read::Array<gltf2::Material, json::ObjectReader<gltf2::Material>::Read>,
- &gltf2::Document::mMaterials))
- .Register(*json::MakeProperty("meshes",
- json::Read::Array<gltf2::Mesh, json::ObjectReader<gltf2::Mesh>::Read>,
- &gltf2::Document::mMeshes))
- .Register(*json::MakeProperty("skins",
- json::Read::Array<gltf2::Skin, json::ObjectReader<gltf2::Skin>::Read>,
- &gltf2::Document::mSkins))
- .Register(*json::MakeProperty("cameras",
- json::Read::Array<gltf2::Camera, json::ObjectReader<gltf2::Camera>::Read>,
- &gltf2::Document::mCameras))
- .Register(*json::MakeProperty("nodes",
- json::Read::Array<gltf2::Node, json::ObjectReader<gltf2::Node>::Read>,
- &gltf2::Document::mNodes))
- .Register(*json::MakeProperty("animations",
- ReadAnimationArray,
- &gltf2::Document::mAnimations))
- .Register(*json::MakeProperty("scenes",
- json::Read::Array<gltf2::Scene, json::ObjectReader<gltf2::Scene>::Read>,
- &gltf2::Document::mScenes))
- .Register(*json::MakeProperty("scene", gltf2::RefReader<gltf2::Document>::Read<gltf2::Scene, &gltf2::Document::mScenes>, &gltf2::Document::mScene)));
+ .Register(*json::MakeProperty("buffers",
+ json::Read::Array<gltf2::Buffer, json::ObjectReader<gltf2::Buffer>::Read>,
+ &gltf2::Document::mBuffers))
+ .Register(*json::MakeProperty("bufferViews",
+ json::Read::Array<gltf2::BufferView, json::ObjectReader<gltf2::BufferView>::Read>,
+ &gltf2::Document::mBufferViews))
+ .Register(*json::MakeProperty("accessors",
+ json::Read::Array<gltf2::Accessor, json::ObjectReader<gltf2::Accessor>::Read>,
+ &gltf2::Document::mAccessors))
+ .Register(*json::MakeProperty("images",
+ json::Read::Array<gltf2::Image, json::ObjectReader<gltf2::Image>::Read>,
+ &gltf2::Document::mImages))
+ .Register(*json::MakeProperty("samplers",
+ json::Read::Array<gltf2::Sampler, json::ObjectReader<gltf2::Sampler>::Read>,
+ &gltf2::Document::mSamplers))
+ .Register(*json::MakeProperty("textures",
+ json::Read::Array<gltf2::Texture, json::ObjectReader<gltf2::Texture>::Read>,
+ &gltf2::Document::mTextures))
+ .Register(*json::MakeProperty("materials",
+ json::Read::Array<gltf2::Material, json::ObjectReader<gltf2::Material>::Read>,
+ &gltf2::Document::mMaterials))
+ .Register(*json::MakeProperty("meshes",
+ json::Read::Array<gltf2::Mesh, json::ObjectReader<gltf2::Mesh>::Read>,
+ &gltf2::Document::mMeshes))
+ .Register(*json::MakeProperty("skins",
+ json::Read::Array<gltf2::Skin, json::ObjectReader<gltf2::Skin>::Read>,
+ &gltf2::Document::mSkins))
+ .Register(*json::MakeProperty("cameras",
+ json::Read::Array<gltf2::Camera, json::ObjectReader<gltf2::Camera>::Read>,
+ &gltf2::Document::mCameras))
+ .Register(*json::MakeProperty("nodes",
+ json::Read::Array<gltf2::Node, json::ObjectReader<gltf2::Node>::Read>,
+ &gltf2::Document::mNodes))
+ .Register(*json::MakeProperty("animations",
+ ReadAnimationArray,
+ &gltf2::Document::mAnimations))
+ .Register(*json::MakeProperty("scenes",
+ json::Read::Array<gltf2::Scene, json::ObjectReader<gltf2::Scene>::Read>,
+ &gltf2::Document::mScenes))
+ .Register(*json::MakeProperty("scene", gltf2::RefReader<gltf2::Document>::Read<gltf2::Scene, &gltf2::Document::mScenes>, &gltf2::Document::mScene)));
return DOCUMENT_READER;
}
auto& attribs = primitive.mAttributes;
meshDefinition.mPrimitiveType = GLTF2_TO_DALI_PRIMITIVES[primitive.mMode];
- auto& accPositions = *attribs.find(gltf2::Attribute::POSITION)->second;
+ auto positionIter = attribs.find(gltf2::Attribute::POSITION);
+
+ if(positionIter == attribs.end())
+ {
+ DALI_LOG_ERROR("Primitive mesh dosn't have POSITION atrributes!");
+ continue;
+ }
+
+ auto& accPositions = *positionIter->second;
meshDefinition.mPositions = ConvertMeshPrimitiveAccessor(accPositions);
// glTF2 support vector4 tangent for mesh.
// https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#meshes-overview
mEnvironmentMapTexture.Upload(side[iMipLevel], CubeMapLayer::POSITIVE_X + iSide, iMipLevel, 0u, 0u, side[iMipLevel].GetWidth(), side[iMipLevel].GetHeight());
}
}
-
- // If mipmap is not defined explicitly, use GenerateMipmaps.
- // TODO: Maybe we can use better way to know it already has mipmap or not.
- if(mPixelData.size() > 0u && mPixelData[0].size() == 1u)
- {
- mEnvironmentMapTexture.GenerateMipmaps();
- }
}
else
{
mEnvironmentMapTexture = Texture::New(TextureType::TEXTURE_2D, mPixelData[0][0].GetPixelFormat(), mPixelData[0][0].GetWidth(), mPixelData[0][0].GetHeight());
mEnvironmentMapTexture.Upload(mPixelData[0][0], 0, 0, 0, 0, mPixelData[0][0].GetWidth(), mPixelData[0][0].GetHeight());
}
+
+ // If mipmap is not defined explicitly, use GenerateMipmaps.
+ // TODO: Maybe we can use better way to know it already has mipmap or not.
+ if(mPixelData.size() > 0u && mPixelData[0].size() == 1u)
+ {
+ mEnvironmentMapTexture.GenerateMipmaps();
+ }
}
return mEnvironmentMapTexture;
}
{
environmentMapData.mPixelData[i][0] = GetCubeFace(pixelBuffer, i, cubeType, faceWidth, faceHeight);
}
- uint32_t mipmap = static_cast<uint32_t>(1 + std::floor(std::log2(std::max(environmentMapData.mPixelData[0][0].GetWidth(), environmentMapData.mPixelData[0][0].GetHeight()))));
- environmentMapData.SetMipmapLevels(mipmap);
environmentMapData.SetEnvironmentMapType(Scene3D::EnvironmentMapType::CUBEMAP);
}
else
environmentMapData.mPixelData[0][0] = Devel::PixelBuffer::Convert(pixelBuffer);
environmentMapData.SetEnvironmentMapType(Scene3D::EnvironmentMapType::EQUIRECTANGULAR);
}
+
+ if(!environmentMapData.mPixelData.empty() && !environmentMapData.mPixelData[0].empty() && environmentMapData.mPixelData[0][0])
+ {
+ const uint32_t pixelDataWidth = environmentMapData.mPixelData[0][0].GetWidth();
+ const uint32_t pixelDataHeight = environmentMapData.mPixelData[0][0].GetHeight();
+
+ if(pixelDataWidth > 0u && pixelDataHeight > 0u)
+ {
+ uint32_t mipmap = static_cast<uint32_t>(1 + std::floor(std::log2(std::min(pixelDataWidth, pixelDataHeight))));
+ environmentMapData.SetMipmapLevels(mipmap);
+ }
+ }
return true;
}
return false;
std::vector<uint8_t> buffer;
Dali::FileStream fileStream(filename, Dali::FileStream::READ | Dali::FileStream::BINARY);
- auto fin = fileStream.GetFile();
+ auto fin = fileStream.GetFile();
- if(!fin)
+ if(DALI_UNLIKELY(!fin))
{
- DALI_LOG_ERROR("NavigationMesh: Can't open %s for reading: %s", filename.c_str(), strerror(errno));
+ const int bufferLength = 128;
+ char buffer[bufferLength];
+
+ // Return type of stderror_r is different between system type. We should not use return value.
+ [[maybe_unused]] auto ret = strerror_r(errno, buffer, bufferLength - 1);
+
+ DALI_LOG_ERROR("NavigationMesh: Can't open %s for reading: %s", filename.c_str(), buffer);
return nullptr;
}
- else
+
+ if(DALI_UNLIKELY(fseek(fin, 0, SEEK_END)))
{
- if(fseek(fin, 0, SEEK_END))
- {
- return {};
- }
+ DALI_LOG_ERROR("NavigationMesh: Error reading file: %s\n", filename.c_str());
+ return nullptr;
+ }
- auto size = ftell(fin);
- if(size < 0)
- {
- return {};
- }
+ auto size = ftell(fin);
+ if(DALI_UNLIKELY(size < 0))
+ {
+ DALI_LOG_ERROR("NavigationMesh: Error reading file: %s\n", filename.c_str());
+ return nullptr;
+ }
- auto fileSize = size_t(size);
- if(fseek(fin, 0, SEEK_SET))
- {
- return {};
- }
+ auto fileSize = size_t(size);
+ if(DALI_UNLIKELY(fseek(fin, 0, SEEK_SET)))
+ {
+ DALI_LOG_ERROR("NavigationMesh: Error reading file: %s\n", filename.c_str());
+ return nullptr;
+ }
- buffer.resize(size);
- auto count = fread(buffer.data(), 1, fileSize, fin);
- if(count != fileSize)
- {
- DALI_LOG_ERROR("NavigationMesh: Error reading file: %s\n", filename.c_str());
- return nullptr;
- }
- return CreateFromBuffer(buffer);
+ buffer.resize(size);
+ auto count = fread(buffer.data(), 1, fileSize, fin);
+ if(DALI_UNLIKELY(count != fileSize))
+ {
+ DALI_LOG_ERROR("NavigationMesh: Error reading file: %s\n", filename.c_str());
+ return nullptr;
}
+ return CreateFromBuffer(buffer);
}
std::unique_ptr<Algorithm::NavigationMesh> NavigationMeshFactory::CreateFromBuffer(const std::vector<uint8_t>& buffer)
#define DALI_TOOLKIT_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
#include <dali-toolkit/public-api/controls/video-view/video-view.h>
+#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
+
#include <dali-toolkit/public-api/image-loader/async-image-loader.h>
+#include <dali-toolkit/public-api/image-loader/image-url.h>
+#include <dali-toolkit/public-api/image-loader/image.h>
#include <dali-toolkit/public-api/image-loader/sync-image-loader.h>
-#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
-
#include <dali-toolkit/public-api/styling/style-manager.h>
#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/public-api/transition/fade-transition.h>
-#include <dali-toolkit/public-api/transition/slide-transition.h>
#include <dali-toolkit/public-api/transition/scale-transition.h>
-#include <dali-toolkit/public-api/transition/transition.h>
+#include <dali-toolkit/public-api/transition/slide-transition.h>
#include <dali-toolkit/public-api/transition/transition-set.h>
+#include <dali-toolkit/public-api/transition/transition.h>
#include <dali-toolkit/public-api/visuals/border-visual-properties.h>
#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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 TextureManager
{
-std::string AddTexture(Texture& texture)
+std::string AddTexture(Texture& texture, bool preMultiplied)
{
TextureSet set = TextureSet::New();
set.SetTexture(0u, texture);
- return AddTexture(set);
+ return AddTexture(set, preMultiplied);
}
-std::string AddTexture(TextureSet& textureSet)
+std::string AddTexture(TextureSet& textureSet, bool preMultiplied)
{
auto visualFactory = Toolkit::VisualFactory::Get();
auto& textureMgr = GetImplementation(visualFactory).GetTextureManager();
- return textureMgr.AddExternalTexture(textureSet);
+ return textureMgr.AddExternalTexture(textureSet, preMultiplied);
}
TextureSet RemoveTexture(const std::string& textureUrl)
#define DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
* @note this method does not check for duplicates,
* if same Texture is added multiple times, a different URL is returned each time
* @param[in] texture the Texture to add
+ * @param[in] preMultiplied Whether this external texture preMultiplied or not. Default as false.
* @return the Url string representing this texture
*/
-DALI_TOOLKIT_API std::string AddTexture(Texture& texture);
+DALI_TOOLKIT_API std::string AddTexture(Texture& texture, bool preMultiplied = false);
/**
* @brief Add a TextureSet to texture manager
* @note this method does not check for duplicates,
* if same TextureSet is added multiple times, a different URL is returned each time
* @param[in] textureSet the TextureSet to add
+ * @param[in] preMultiplied Whether this external texture preMultiplied or not. Default as false.
* @return the Url string representing this texture
*/
-DALI_TOOLKIT_API std::string AddTexture(TextureSet& textureSet);
+DALI_TOOLKIT_API std::string AddTexture(TextureSet& textureSet, bool preMultiplied = false);
/**
* @brief Removes a TextureSet from toolkit
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
}
}
+ mRasterizingTask.Reset(); // We don't need it anymore
+
//If there are accumulated changes to CanvasRenderer during Rasterize, Rasterize once again.
if(mCanvasRenderer && mCanvasRenderer.IsCanvasChanged())
{
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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 Internal
{
-ImageUrl::ImageUrl(Texture& texture)
+ImageUrl::ImageUrl(Texture& texture, bool preMultiplied)
{
- mUrl = Dali::Toolkit::TextureManager::AddTexture(texture);
+ mUrl = Dali::Toolkit::TextureManager::AddTexture(texture, preMultiplied);
}
ImageUrl::ImageUrl(const EncodedImageBuffer& encodedImageBuffer)
}
}
-ImageUrlPtr ImageUrl::New(Texture& texture)
+ImageUrlPtr ImageUrl::New(Texture& texture, bool preMultiplied)
{
- ImageUrlPtr imageUrlPtr = new ImageUrl(texture);
+ ImageUrlPtr imageUrlPtr = new ImageUrl(texture, preMultiplied);
return imageUrlPtr;
}
#define DALI_TOOLKIT_INTERNAL_IMAGE_URL_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
/**
* @brief Constructor.
*/
- ImageUrl(Texture& texture);
+ ImageUrl(Texture& texture, bool preMultiplied);
/**
* @brief Constructor.
/**
* @copydoc Dali::Toolkit::ImageUrl::New
*/
- static ImageUrlPtr New(Texture& texture);
+ static ImageUrlPtr New(Texture& texture, bool preMultiplied);
/**
* @copydoc Dali::Toolkit::ImageUrl::New
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
*/
// CLASS HEADER
-#include "texture-cache-manager.h"
+#include <dali-toolkit/internal/texture-manager/texture-cache-manager.h>
// EXTERNAL HEADERS
#include <dali/devel-api/common/hash.h>
return texture;
}
-TextureSet TextureCacheManager::GetExternalTextureSet(const TextureCacheManager::TextureId& textureId)
+TextureCacheManager::ExternalTextureInfo& TextureCacheManager::GetExternalTextureInfo(const TextureCacheManager::TextureId& textureId)
{
- TextureSet textureSet; // empty handle
TextureCacheIndex cacheIndex = GetCacheIndexFromExternalTextureId(textureId);
- if(cacheIndex != INVALID_CACHE_INDEX)
- {
- textureSet = mExternalTextures[cacheIndex.GetIndex()].textureSet;
- }
- return textureSet;
+ DALI_ASSERT_ALWAYS(cacheIndex != INVALID_CACHE_INDEX);
+
+ return mExternalTextures[cacheIndex.GetIndex()];
}
EncodedImageBuffer TextureCacheManager::GetEncodedImageBuffer(const TextureCacheManager::TextureId& bufferId)
return encodedImageBuffer;
}
-std::string TextureCacheManager::AddExternalTexture(const TextureSet& textureSet)
+std::string TextureCacheManager::AddExternalTexture(const TextureSet& textureSet, bool preMultiplied)
{
TextureId textureId = GenerateTextureId(TextureCacheIndex(TextureCacheIndexType::TEXTURE_CACHE_INDEX_TYPE_TEXTURE, mExternalTextures.size()));
- TextureCacheManager::ExternalTextureInfo textureInfo(textureId, textureSet);
+ TextureCacheManager::ExternalTextureInfo textureInfo(textureId, textureSet, preMultiplied);
mExternalTextures.emplace_back(textureInfo);
- DALI_LOG_INFO(gTextureManagerLogFilter, Debug::Concise, "TextureCacheManager::AddExternalTexture() : New texture registered. textureId:%d\n", textureInfo.textureId);
+ DALI_LOG_INFO(gTextureManagerLogFilter, Debug::Concise, "TextureCacheManager::AddExternalTexture() : New texture registered. textureId:%d, preMultiplied:%d\n", textureInfo.textureId, preMultiplied);
return VisualUrl::CreateTextureUrl(std::to_string(textureInfo.textureId));
}
#define DALI_TOOLKIT_TEXTURE_CACHE_MANAGER_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
static constexpr TextureId INVALID_TEXTURE_ID = TextureManagerType::INVALID_TEXTURE_ID;
static constexpr TextureCacheIndex INVALID_CACHE_INDEX = TextureManagerType::INVALID_CACHE_INDEX;
- using UseAtlas = TextureManagerType::UseAtlas;
- using StorageType = TextureManagerType::StorageType;
- using LoadType = TextureManagerType::LoadType;
- using LoadState = TextureManagerType::LoadState;
- using ReloadPolicy = TextureManagerType::ReloadPolicy;
- using MultiplyOnLoad = TextureManagerType::MultiplyOnLoad;
- using TextureInfo = TextureManagerType::TextureInfo;
+ using UseAtlas = TextureManagerType::UseAtlas;
+ using StorageType = TextureManagerType::StorageType;
+ using LoadType = TextureManagerType::LoadType;
+ using LoadState = TextureManagerType::LoadState;
+ using ReloadPolicy = TextureManagerType::ReloadPolicy;
+ using MultiplyOnLoad = TextureManagerType::MultiplyOnLoad;
+ using TextureInfo = TextureManagerType::TextureInfo;
+ using ExternalTextureInfo = TextureManagerType::ExternalTextureInfo;
public:
/**
Texture GetTexture(const TextureCacheManager::TextureId& textureId, uint32_t textureIndex = 0);
/**
- * @brief Get the external texture set if the texture id is valid
+ * @brief Get the external texture set information if the texture id is valid
* @param[in] textureId The texture Id to look up
- * @return the external texture set, or an empty handle if textureId is not valid
+ * @return the external texture information. Assert if textureId is not valid
*/
- TextureSet GetExternalTextureSet(const TextureCacheManager::TextureId& textureId);
+ TextureCacheManager::ExternalTextureInfo& GetExternalTextureInfo(const TextureCacheManager::TextureId& textureId);
/**
* @brief Get the encoded image buffer
/**
* Adds an external texture to the texture manager
* @param[in] texture The texture to add
+ * @param[in] preMultiplied Whether this external texture preMultiplied or not. Default as false.
* @return string containing the URL for the texture
*/
- std::string AddExternalTexture(const TextureSet& texture);
+ std::string AddExternalTexture(const TextureSet& texture, bool preMultiplied);
/**
* Adds an encoded image buffer to the texture manager
// Private defined structs.
/**
- * @brief This struct is used to manage the life-cycle of ExternalTexture url.
- */
- struct ExternalTextureInfo
- {
- ExternalTextureInfo(const TextureCacheManager::TextureId& textureId,
- const TextureSet& textureSet)
- : textureId(textureId),
- textureSet(textureSet),
- referenceCount(1u)
- {
- }
- TextureCacheManager::TextureId textureId;
- TextureSet textureSet;
- std::int16_t referenceCount;
- };
-
- /**
* @brief This struct is used to manage the life-cycle of EncodedImageBuffer url.
*/
struct EncodedImageBufferInfo
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
*/
// CLASS HEADER
-#include "texture-manager-impl.h"
+#include <dali-toolkit/internal/texture-manager/texture-manager-impl.h>
// EXTERNAL HEADERS
#include <dali/devel-api/adaptor-framework/environment-variable.h>
if(location.size() > 0u)
{
TextureId id = std::stoi(location);
- textureSet = mTextureCacheManager.GetExternalTextureSet(id);
- if(textureSet)
+ auto externalTextureInfo = mTextureCacheManager.GetExternalTextureInfo(id);
+ if(externalTextureInfo.textureSet)
{
- preMultiplyOnLoad = TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
- textureId = id;
- return textureSet;
+ textureId = id;
+
+ if(preMultiplyOnLoad == TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD)
+ {
+ // Change preMultiplyOnLoad value so make caller determine to preMultiplyAlpha or not.
+ // TODO : Should we seperate input and output value?
+ preMultiplyOnLoad = externalTextureInfo.preMultiplied ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+ }
+ return externalTextureInfo.textureSet;
}
}
}
#define DALI_TOOLKIT_TEXTURE_MANAGER_IMPL_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
/**
* @copydoc TextureCacheManager::AddExternalTexture
*/
- inline std::string AddExternalTexture(const TextureSet& texture)
+ inline std::string AddExternalTexture(const TextureSet& texture, bool preMultiplied = false)
{
- return mTextureCacheManager.AddExternalTexture(texture);
+ return mTextureCacheManager.AddExternalTexture(texture, preMultiplied);
}
/**
#define DALI_TOOLKIT_TEXTURE_MANAGER_TYPE_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
const TextureId& maskTextureId,
const VisualUrl& url,
const Dali::ImageDimensions& desiredSize,
- const float& scaleFactor,
+ float scaleFactor,
const Dali::FittingMode::Type& fittingMode,
const Dali::SamplingMode::Type& samplingMode,
- const bool& loadSynchronously,
- const bool& cropToMask,
+ bool loadSynchronously,
+ bool cropToMask,
const UseAtlas& useAtlas,
const TextureHash& hash,
- const bool& orientationCorrection,
- const bool& preMultiplyOnLoad,
+ bool orientationCorrection,
+ bool preMultiplyOnLoad,
const Dali::AnimatedImageLoading& animatedImageLoading,
- const std::uint32_t& frameIndex,
- const bool& loadYuvPlanes)
+ std::uint32_t frameIndex,
+ bool loadYuvPlanes)
: url(url),
desiredSize(desiredSize),
useSize(desiredSize),
bool loadYuvPlanes : 1; ///< true if the image should be loaded as yuv planes
};
+/**
+ * @brief This struct is used to manage the life-cycle of ExternalTexture url.
+ */
+struct ExternalTextureInfo
+{
+ ExternalTextureInfo(const TextureId& textureId,
+ const TextureSet& textureSet,
+ bool preMultiplied)
+ : textureId(textureId),
+ textureSet(textureSet),
+ referenceCount(1u),
+ preMultiplied(preMultiplied)
+ {
+ }
+
+ TextureId textureId; ///< The TextureId associated with this ExternalTexture
+ TextureSet textureSet; ///< The external texture
+ std::int16_t referenceCount; ///< The reference count of clients using this ExternalTexture
+ bool preMultiplied : 1; ///< True if the image's color was multiplied by it's alpha
+};
+
} // namespace TextureManagerType
} // namespace Internal
if(IsSynchronousLoadingRequired() && mImageUrl.IsLocalResource())
{
mLoadingTask->Process();
- mLoadingTask.Reset(); // We don't need it now
+ if(!mLoadingTask->HasSucceeded())
+ {
+ mLoadFailed = true;
+ }
+ mLoadingTask.Reset(); // We don't need it anymore.
}
else
{
{
mRasterizingTask->Process();
ApplyRasterizedImage(mRasterizingTask);
- mRasterizingTask.Reset(); // We don't need it now
+ mRasterizingTask.Reset(); // We don't need it anymore.
}
else
{
ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
}
+
+ // We don't need to keep tasks anymore. reset now.
+ if(task == mLoadingTask)
+ {
+ mLoadingTask.Reset();
+ }
+ if(task == mRasterizingTask)
+ {
+ mRasterizingTask.Reset();
+ }
}
void SvgVisual::OnSetTransform()
Button::Button(const Button& button) = default;
-Button::Button(Button&& rhs) = default;
+Button::Button(Button&& rhs) noexcept = default;
Button& Button::operator=(const Button& button) = default;
-Button& Button::operator=(Button&& rhs) = default;
+Button& Button::operator=(Button&& rhs) noexcept = default;
Button::~Button()
{
*
* @param[in] rhs A reference to the moved handle
*/
- Button(Button&& rhs);
+ Button(Button&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- Button& operator=(Button&& rhs);
+ Button& operator=(Button&& rhs) noexcept;
/**
* @brief Downcasts a handle to Button handle.
CheckBoxButton::CheckBoxButton(const CheckBoxButton& checkBox) = default;
-CheckBoxButton::CheckBoxButton(CheckBoxButton&& rhs) = default;
+CheckBoxButton::CheckBoxButton(CheckBoxButton&& rhs) noexcept = default;
CheckBoxButton& CheckBoxButton::operator=(const CheckBoxButton& checkBox) = default;
-CheckBoxButton& CheckBoxButton::operator=(CheckBoxButton&& rhs) = default;
+CheckBoxButton& CheckBoxButton::operator=(CheckBoxButton&& rhs) noexcept = default;
CheckBoxButton::~CheckBoxButton()
{
*
* @param[in] rhs A reference to the moved handle
*/
- CheckBoxButton(CheckBoxButton&& rhs);
+ CheckBoxButton(CheckBoxButton&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- CheckBoxButton& operator=(CheckBoxButton&& rhs);
+ CheckBoxButton& operator=(CheckBoxButton&& rhs) noexcept;
/**
* @brief Destructor.
PushButton::PushButton(const PushButton& pushButton) = default;
-PushButton::PushButton(PushButton&& rhs) = default;
+PushButton::PushButton(PushButton&& rhs) noexcept = default;
PushButton& PushButton::operator=(const PushButton& pushButton) = default;
-PushButton& PushButton::operator=(PushButton&& rhs) = default;
+PushButton& PushButton::operator=(PushButton&& rhs) noexcept = default;
PushButton::PushButton(Dali::Internal::CustomActor* internal)
: Button(internal)
*
* @param[in] rhs A reference to the moved handle
*/
- PushButton(PushButton&& rhs);
+ PushButton(PushButton&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- PushButton& operator=(PushButton&& rhs);
+ PushButton& operator=(PushButton&& rhs) noexcept;
/**
* @brief Destructor.
RadioButton::RadioButton(const RadioButton& radioButton) = default;
-RadioButton::RadioButton(RadioButton&& rhs) = default;
+RadioButton::RadioButton(RadioButton&& rhs) noexcept = default;
RadioButton& RadioButton::operator=(const RadioButton& radioButton) = default;
-RadioButton& RadioButton::operator=(RadioButton&& rhs) = default;
+RadioButton& RadioButton::operator=(RadioButton&& rhs) noexcept = default;
RadioButton::RadioButton(Dali::Internal::CustomActor* internal)
: Button(internal)
*
* @param[in] rhs A reference to the moved handle
*/
- RadioButton(RadioButton&& rhs);
+ RadioButton(RadioButton&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- RadioButton& operator=(RadioButton&& rhs);
+ RadioButton& operator=(RadioButton&& rhs) noexcept;
/**
* @brief Destructor.
CameraView::CameraView(const CameraView& cameraView) = default;
-CameraView::CameraView(CameraView&& rhs) = default;
+CameraView::CameraView(CameraView&& rhs) noexcept = default;
CameraView& CameraView::operator=(const CameraView& cameraView) = default;
-CameraView& CameraView::operator=(CameraView&& rhs) = default;
+CameraView& CameraView::operator=(CameraView&& rhs) noexcept = default;
CameraView::~CameraView()
{
*
* @param[in] rhs A reference to the moved handle
*/
- CameraView(CameraView&& rhs);
+ CameraView(CameraView&& rhs) noexcept;
/**
* @brief Update camera view
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- CameraView& operator=(CameraView&& rhs);
+ CameraView& operator=(CameraView&& rhs) noexcept;
/**
* @brief Downcasts a handle to CameraView handle.
Control::Control(const Control& uiControl) = default;
-Control::Control(Control&& rhs) = default;
+Control::Control(Control&& rhs) noexcept = default;
Control::~Control()
{
Control& Control::operator=(const Control& handle) = default;
-Control& Control::operator=(Control&& rhs) = default;
+Control& Control::operator=(Control&& rhs) noexcept = default;
Control Control::DownCast(BaseHandle handle)
{
* @SINCE_1_9.23
* @param[in] rhs Handle to move
*/
- Control(Control&& rhs);
+ Control(Control&& rhs) noexcept;
/**
* @brief Dali::Control is intended as a base class.
* @param[in] rhs Object to assign this to
* @return Reference to this
*/
- Control& operator=(Control&& rhs);
+ Control& operator=(Control&& rhs) noexcept;
public:
/**
FlexContainer::FlexContainer(const FlexContainer& handle) = default;
-FlexContainer::FlexContainer(FlexContainer&& rhs) = default;
+FlexContainer::FlexContainer(FlexContainer&& rhs) noexcept = default;
FlexContainer& FlexContainer::operator=(const FlexContainer& handle) = default;
-FlexContainer& FlexContainer::operator=(FlexContainer&& rhs) = default;
+FlexContainer& FlexContainer::operator=(FlexContainer&& rhs) noexcept = default;
FlexContainer::~FlexContainer()
{
*
* @param[in] rhs A reference to the moved handle
*/
- FlexContainer(FlexContainer&& rhs);
+ FlexContainer(FlexContainer&& rhs) noexcept;
/**
* @brief Assignment operator. Changes this handle to point to another real object.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- FlexContainer& operator=(FlexContainer&& rhs);
+ FlexContainer& operator=(FlexContainer&& rhs) noexcept;
/**
* @brief Destructor.
GlView::GlView(const GlView& GlView) = default;
-GlView::GlView(GlView&& rhs) = default;
+GlView::GlView(GlView&& rhs) noexcept = default;
GlView& GlView::operator=(const GlView& GlView) = default;
-GlView& GlView::operator=(GlView&& rhs) = default;
+GlView& GlView::operator=(GlView&& rhs) noexcept = default;
GlView::~GlView() = default;
*
* @SINCE_2_0.45
*/
- GlView(GlView&& rhs);
+ GlView(GlView&& rhs) noexcept;
/**
* @brief Assignment operator.
*
* @SINCE_2_0.45
*/
- GlView& operator=(GlView&& rhs);
+ GlView& operator=(GlView&& rhs) noexcept;
/**
* @brief Downcasts a handle to GlView handle.
ImageView::ImageView(const ImageView& imageView) = default;
-ImageView::ImageView(ImageView&& rhs) = default;
+ImageView::ImageView(ImageView&& rhs) noexcept = default;
ImageView& ImageView::operator=(const ImageView& imageView) = default;
-ImageView& ImageView::operator=(ImageView&& rhs) = default;
+ImageView& ImageView::operator=(ImageView&& rhs) noexcept = default;
ImageView::~ImageView()
{
*
* @param[in] rhs A reference to the moved handle
*/
- ImageView(ImageView&& rhs);
+ ImageView(ImageView&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- ImageView& operator=(ImageView&& rhs);
+ ImageView& operator=(ImageView&& rhs) noexcept;
/**
* @brief Downcasts a handle to ImageView handle.
Model3dView::Model3dView(const Model3dView& model3dView) = default;
-Model3dView::Model3dView(Model3dView&& rhs) = default;
+Model3dView::Model3dView(Model3dView&& rhs) noexcept = default;
Model3dView& Model3dView::operator=(const Model3dView& model3dView) = default;
-Model3dView& Model3dView::operator=(Model3dView&& rhs) = default;
+Model3dView& Model3dView::operator=(Model3dView&& rhs) noexcept = default;
Model3dView::~Model3dView()
{
*
* @param[in] rhs A reference to the moved handle
*/
- Model3dView(Model3dView&& rhs);
+ Model3dView(Model3dView&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- Model3dView& operator=(Model3dView&& rhs);
+ Model3dView& operator=(Model3dView&& rhs) noexcept;
/**
* @brief Downcasts an Object handle to Model3dView.
ProgressBar::ProgressBar(const ProgressBar& handle) = default;
-ProgressBar::ProgressBar(ProgressBar&& rhs) = default;
+ProgressBar::ProgressBar(ProgressBar&& rhs) noexcept = default;
ProgressBar& ProgressBar::operator=(const ProgressBar& handle) = default;
-ProgressBar& ProgressBar::operator=(ProgressBar&& rhs) = default;
+ProgressBar& ProgressBar::operator=(ProgressBar&& rhs) noexcept = default;
ProgressBar::ProgressBar(Internal::ProgressBar& implementation)
: Control(implementation)
*
* @param[in] rhs A reference to the moved handle
*/
- ProgressBar(ProgressBar&& rhs);
+ ProgressBar(ProgressBar&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- ProgressBar& operator=(ProgressBar&& rhs);
+ ProgressBar& operator=(ProgressBar&& rhs) noexcept;
/**
* @brief Destructor.
ItemView::ItemView(const ItemView& itemView) = default;
-ItemView::ItemView(ItemView&& rhs) = default;
+ItemView::ItemView(ItemView&& rhs) noexcept = default;
ItemView& ItemView::operator=(const ItemView& itemView) = default;
-ItemView& ItemView::operator=(ItemView&& rhs) = default;
+ItemView& ItemView::operator=(ItemView&& rhs) noexcept = default;
ItemView ItemView::New(ItemFactory& factory)
{
*
* @param[in] rhs A reference to the moved handle
*/
- ItemView(ItemView&& rhs);
+ ItemView(ItemView&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- ItemView& operator=(ItemView&& rhs);
+ ItemView& operator=(ItemView&& rhs) noexcept;
/**
* @brief Destructor.
ScrollView::ScrollView(const ScrollView& handle) = default;
-ScrollView::ScrollView(ScrollView&& rhs) = default;
+ScrollView::ScrollView(ScrollView&& rhs) noexcept = default;
ScrollView& ScrollView::operator=(const ScrollView& handle) = default;
-ScrollView& ScrollView::operator=(ScrollView&& rhs) = default;
+ScrollView& ScrollView::operator=(ScrollView&& rhs) noexcept = default;
ScrollView ScrollView::New()
{
*
* @param[in] rhs A reference to the moved handle
*/
- ScrollView(ScrollView&& rhs);
+ ScrollView(ScrollView&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- ScrollView& operator=(ScrollView&& rhs);
+ ScrollView& operator=(ScrollView&& rhs) noexcept;
/**
* @brief Destructor.
Scrollable::Scrollable(const Scrollable& handle) = default;
-Scrollable::Scrollable(Scrollable&& rhs) = default;
+Scrollable::Scrollable(Scrollable&& rhs) noexcept = default;
Scrollable& Scrollable::operator=(const Scrollable& handle) = default;
-Scrollable& Scrollable::operator=(Scrollable&& rhs) = default;
+Scrollable& Scrollable::operator=(Scrollable&& rhs) noexcept = default;
Scrollable::~Scrollable()
{
*
* @param[in] rhs A reference to the moved handle
*/
- Scrollable(Scrollable&& rhs);
+ Scrollable(Scrollable&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- Scrollable& operator=(Scrollable&& rhs);
+ Scrollable& operator=(Scrollable&& rhs) noexcept;
/**
* @brief Destructor.
Slider::Slider(const Slider& handle) = default;
-Slider::Slider(Slider&& rhs) = default;
+Slider::Slider(Slider&& rhs) noexcept = default;
Slider& Slider::operator=(const Slider& handle) = default;
-Slider& Slider::operator=(Slider&& rhs) = default;
+Slider& Slider::operator=(Slider&& rhs) noexcept = default;
Slider::Slider(Internal::Slider& implementation)
: Control(implementation)
*
* @param[in] rhs A reference to the moved handle
*/
- Slider(Slider&& rhs);
+ Slider(Slider&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- Slider& operator=(Slider&& rhs);
+ Slider& operator=(Slider&& rhs) noexcept;
/**
* @brief Destructor.
TextEditor::TextEditor(const TextEditor& handle) = default;
-TextEditor::TextEditor(TextEditor&& rhs) = default;
+TextEditor::TextEditor(TextEditor&& rhs) noexcept = default;
TextEditor& TextEditor::operator=(const TextEditor& handle) = default;
-TextEditor& TextEditor::operator=(TextEditor&& rhs) = default;
+TextEditor& TextEditor::operator=(TextEditor&& rhs) noexcept = default;
TextEditor::~TextEditor()
{
*
* @param[in] rhs A reference to the moved handle
*/
- TextEditor(TextEditor&& rhs);
+ TextEditor(TextEditor&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- TextEditor& operator=(TextEditor&& rhs);
+ TextEditor& operator=(TextEditor&& rhs) noexcept;
/**
* @brief Destructor.
TextField::TextField(const TextField& handle) = default;
-TextField::TextField(TextField&& rhs) = default;
+TextField::TextField(TextField&& rhs) noexcept = default;
TextField& TextField::operator=(const TextField& handle) = default;
-TextField& TextField::operator=(TextField&& rhs) = default;
+TextField& TextField::operator=(TextField&& rhs) noexcept = default;
TextField::~TextField()
{
*
* @param[in] rhs A reference to the moved handle
*/
- TextField(TextField&& rhs);
+ TextField(TextField&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- TextField& operator=(TextField&& rhs);
+ TextField& operator=(TextField&& rhs) noexcept;
/**
* @brief Destructor.
TextLabel::TextLabel(const TextLabel& handle) = default;
-TextLabel::TextLabel(TextLabel&& rhs) = default;
+TextLabel::TextLabel(TextLabel&& rhs) noexcept = default;
TextLabel& TextLabel::operator=(const TextLabel& handle) = default;
-TextLabel& TextLabel::operator=(TextLabel&& rhs) = default;
+TextLabel& TextLabel::operator=(TextLabel&& rhs) noexcept = default;
TextLabel::~TextLabel()
{
*
* @param[in] rhs A reference to the moved handle
*/
- TextLabel(TextLabel&& rhs);
+ TextLabel(TextLabel&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- TextLabel& operator=(TextLabel&& rhs);
+ TextLabel& operator=(TextLabel&& rhs) noexcept;
/**
* @brief Destructor.
VideoView::VideoView(const VideoView& videoView) = default;
-VideoView::VideoView(VideoView&& rhs) = default;
+VideoView::VideoView(VideoView&& rhs) noexcept = default;
VideoView& VideoView::operator=(const VideoView& videoView) = default;
-VideoView& VideoView::operator=(VideoView&& rhs) = default;
+VideoView& VideoView::operator=(VideoView&& rhs) noexcept = default;
VideoView::~VideoView()
{
*
* @param[in] rhs A reference to the moved handle
*/
- VideoView(VideoView&& rhs);
+ VideoView(VideoView&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- VideoView& operator=(VideoView&& rhs);
+ VideoView& operator=(VideoView&& rhs) noexcept;
/**
* @brief Downcasts a handle to VideoView handle.
{
const unsigned int TOOLKIT_MAJOR_VERSION = 2;
const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 19;
+const unsigned int TOOLKIT_MICRO_VERSION = 20;
const char* const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
AsyncImageLoader::AsyncImageLoader(const AsyncImageLoader& handle) = default;
-AsyncImageLoader::AsyncImageLoader(AsyncImageLoader&& rhs) = default;
+AsyncImageLoader::AsyncImageLoader(AsyncImageLoader&& rhs) noexcept = default;
AsyncImageLoader& AsyncImageLoader::operator=(const AsyncImageLoader& handle) = default;
-AsyncImageLoader& AsyncImageLoader::operator=(AsyncImageLoader&& rhs) = default;
+AsyncImageLoader& AsyncImageLoader::operator=(AsyncImageLoader&& rhs) noexcept = default;
AsyncImageLoader AsyncImageLoader::DownCast(BaseHandle handle)
{
*
* @param[in] rhs A reference to the moved handle
*/
- AsyncImageLoader(AsyncImageLoader&& rhs);
+ AsyncImageLoader(AsyncImageLoader&& rhs) noexcept;
/**
* @brief This assignment operator is required for (smart) pointer semantics.
*
* @param[in] rhs A reference to the moved handle
*/
- AsyncImageLoader& operator=(AsyncImageLoader&& rhs);
+ AsyncImageLoader& operator=(AsyncImageLoader&& rhs) noexcept;
/**
* @brief Creates a new loader to load the image asynchronously in a worker thread.
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
{
}
-ImageUrl ImageUrl::New(Texture& texture)
+ImageUrl ImageUrl::New(Texture& texture, bool preMultiplied)
{
- Toolkit::Internal::ImageUrlPtr internal = Toolkit::Internal::ImageUrl::New(texture);
+ Toolkit::Internal::ImageUrlPtr internal = Toolkit::Internal::ImageUrl::New(texture, preMultiplied);
return ImageUrl(internal.Get());
}
ImageUrl& ImageUrl::operator=(const ImageUrl& url) = default;
-ImageUrl::ImageUrl(ImageUrl&& rhs) = default;
+ImageUrl::ImageUrl(ImageUrl&& rhs) noexcept = default;
-ImageUrl& ImageUrl::operator=(ImageUrl&& rhs) = default;
+ImageUrl& ImageUrl::operator=(ImageUrl&& rhs) noexcept = default;
const std::string& ImageUrl::GetUrl() const
{
#define DALI_TOOLKIT_IMAGE_URL_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
* @brief Create an initialized ImageUrl.
*
* @param[in] texture The texture url is got from external buffer.
+ * @param[in] preMultiplied Whether this external texture preMultiplied or not. Default as false.
* @return A handle to a newly allocated Dali resource.
*/
- static ImageUrl New(Texture& texture);
+ static ImageUrl New(Texture& texture, bool preMultiplied = false);
/**
* @brief Create an initialized ImageUrl.
* @brief Move constructor.
* @param[in] rhs A reference to the moved handle
*/
- ImageUrl(ImageUrl&& rhs);
+ ImageUrl(ImageUrl&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- ImageUrl& operator=(ImageUrl&& rhs);
+ ImageUrl& operator=(ImageUrl&& rhs) noexcept;
/**
* Get the url
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
*/
// CLASS HEADER
-#include "image.h"
+#include <dali-toolkit/public-api/image-loader/image.h>
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
{
Texture texture = Texture::New(Dali::TextureType::TEXTURE_2D, pixelFormat, width, height);
frameBuffer.AttachColorTexture(texture, 0u, 0u);
- Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture);
+ // TODO : Need to check frameBuffer result use preMultiplied color or not. By default, we use premultiplied
+ Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture, true);
return imageUrl;
}
Dali::Toolkit::ImageUrl GenerateUrl(const Dali::FrameBuffer frameBuffer, uint8_t index)
{
Texture texture = Dali::DevelFrameBuffer::GetColorTexture(frameBuffer, index);
- Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture);
+ // TODO : Need to check frameBuffer result use preMultiplied color or not. By default, we use premultiplied
+ Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture, true);
return imageUrl;
}
-Dali::Toolkit::ImageUrl GenerateUrl(const Dali::PixelData pixelData)
+Dali::Toolkit::ImageUrl GenerateUrl(const Dali::PixelData pixelData, bool preMultiplied)
{
Texture texture = Texture::New(TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight());
texture.Upload(pixelData);
- Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture);
+ Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture, preMultiplied);
return imageUrl;
}
-Dali::Toolkit::ImageUrl GenerateUrl(const Dali::NativeImageSourcePtr nativeImageSource)
+Dali::Toolkit::ImageUrl GenerateUrl(const Dali::NativeImageSourcePtr nativeImageSource, bool preMultiplied)
{
Texture texture = Dali::Texture::New(*nativeImageSource);
- Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture);
+ Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(texture, preMultiplied);
return imageUrl;
}
#define DALI_TOOLKIT_IMAGE_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
* This Url can be used in visuals to render the pixel data.
* @note This method does not check for duplicates, If same pixel data is entered multiple times, a different URL is returned each time.
* @param[in] pixelData the pixel data to converted to Url
+ * @param[in] preMultiplied Whether this pixel data preMultiplied or not. Default as false.
* @return the ImageUrl representing this pixel data
*/
-DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::PixelData pixelData);
+DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::PixelData pixelData, bool preMultiplied = false);
/**
* @brief Generate a Url from native image source.
* This Url can be used in visuals to render the native image source.
* @note This method does not check for duplicates, If same native image source is entered multiple times, a different URL is returned each time.
* @param[in] nativeImageSource the native image source to converted to Url
+ * @param[in] preMultiplied Whether this native image source preMultiplied or not. Default as false.
* @return the ImageUrl representing this native image source
*/
-DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::NativeImageSourcePtr nativeImageSource);
+DALI_TOOLKIT_API Dali::Toolkit::ImageUrl GenerateUrl(const Dali::NativeImageSourcePtr nativeImageSource, bool preMultiplied = false);
/**
* @brief Generate a Url from encoded image buffer.
FadeTransition& FadeTransition::operator=(const FadeTransition& rhs) = default;
-FadeTransition::FadeTransition(FadeTransition&& rhs) = default;
+FadeTransition::FadeTransition(FadeTransition&& rhs) noexcept = default;
-FadeTransition& FadeTransition::operator=(FadeTransition&& rhs) = default;
+FadeTransition& FadeTransition::operator=(FadeTransition&& rhs) noexcept = default;
} // namespace Toolkit
*
* @param[in] rhs A reference to the moved handle
*/
- FadeTransition(FadeTransition&& rhs);
+ FadeTransition(FadeTransition&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- FadeTransition& operator=(FadeTransition&& rhs);
+ FadeTransition& operator=(FadeTransition&& rhs) noexcept;
public: // Not intended for use by Application developers
/// @cond internal
ScaleTransition& ScaleTransition::operator=(const ScaleTransition& rhs) = default;
-ScaleTransition::ScaleTransition(ScaleTransition&& rhs) = default;
+ScaleTransition::ScaleTransition(ScaleTransition&& rhs) noexcept = default;
-ScaleTransition& ScaleTransition::operator=(ScaleTransition&& rhs) = default;
+ScaleTransition& ScaleTransition::operator=(ScaleTransition&& rhs) noexcept = default;
void ScaleTransition::SetScaleFactor(const Vector2& scaleFactor)
{
*
* @param[in] rhs A reference to the moved handle
*/
- ScaleTransition(ScaleTransition&& rhs);
+ ScaleTransition(ScaleTransition&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- ScaleTransition& operator=(ScaleTransition&& rhs);
+ ScaleTransition& operator=(ScaleTransition&& rhs) noexcept;
/**
* @brief Sets scaleFactor to be used to scale target Control
SlideTransition& SlideTransition::operator=(const SlideTransition& rhs) = default;
-SlideTransition::SlideTransition(SlideTransition&& rhs) = default;
+SlideTransition::SlideTransition(SlideTransition&& rhs) noexcept = default;
-SlideTransition& SlideTransition::operator=(SlideTransition&& rhs) = default;
+SlideTransition& SlideTransition::operator=(SlideTransition&& rhs) noexcept = default;
void SlideTransition::SetDirection(const Vector2& direction)
{
*
* @param[in] rhs A reference to the moved handle
*/
- SlideTransition(SlideTransition&& rhs);
+ SlideTransition(SlideTransition&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- SlideTransition& operator=(SlideTransition&& rhs);
+ SlideTransition& operator=(SlideTransition&& rhs) noexcept;
/**
* @brief Sets direction to be used to move target Control
TransitionBase& TransitionBase::operator=(const TransitionBase& rhs) = default;
-TransitionBase::TransitionBase(TransitionBase&& rhs) = default;
+TransitionBase::TransitionBase(TransitionBase&& rhs) noexcept = default;
-TransitionBase& TransitionBase::operator=(TransitionBase&& rhs) = default;
+TransitionBase& TransitionBase::operator=(TransitionBase&& rhs) noexcept = default;
void TransitionBase::SetTimePeriod(TimePeriod timePeriod)
{
*
* @param[in] rhs A reference to the moved handle
*/
- TransitionBase(TransitionBase&& rhs);
+ TransitionBase(TransitionBase&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- TransitionBase& operator=(TransitionBase&& rhs);
+ TransitionBase& operator=(TransitionBase&& rhs) noexcept;
/**
* Set time period that contains delay and duration
TransitionSet& TransitionSet::operator=(const TransitionSet& rhs) = default;
-TransitionSet::TransitionSet(TransitionSet&& rhs) = default;
+TransitionSet::TransitionSet(TransitionSet&& rhs) noexcept = default;
-TransitionSet& TransitionSet::operator=(TransitionSet&& rhs) = default;
+TransitionSet& TransitionSet::operator=(TransitionSet&& rhs) noexcept = default;
void TransitionSet::AddTransition(TransitionBase transition)
{
*
* @param[in] rhs A reference to the moved handle
*/
- TransitionSet(TransitionSet&& rhs);
+ TransitionSet(TransitionSet&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- TransitionSet& operator=(TransitionSet&& rhs);
+ TransitionSet& operator=(TransitionSet&& rhs) noexcept;
/**
* @brief Add a TransitionBase on this TransitionSet.
Transition& Transition::operator=(const Transition& rhs) = default;
-Transition::Transition(Transition&& rhs) = default;
+Transition::Transition(Transition&& rhs) noexcept = default;
-Transition& Transition::operator=(Transition&& rhs) = default;
+Transition& Transition::operator=(Transition&& rhs) noexcept = default;
} // namespace Toolkit
*
* @param[in] rhs A reference to the moved handle
*/
- Transition(Transition&& rhs);
+ Transition(Transition&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Transition& operator=(Transition&& rhs);
+ Transition& operator=(Transition&& rhs) noexcept;
public: // Not intended for use by Application developers
/// @cond internal
Name: dali2-toolkit
Summary: Dali 3D engine Toolkit
-Version: 2.2.19
+Version: 2.2.20
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT