/*
- * 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.
using namespace Dali;
-
-
template<class Object, class... Args>
-void InvokeNext(Object *obj, Args... args)
+void InvokeNext(Object* obj, Args... args)
{
- auto addr = __builtin_return_address(0);
+ auto addr = __builtin_return_address(0);
Dl_info info;
dladdr(addr, &info);
auto func = dlsym(RTLD_NEXT, info.dli_sname);
- typedef void(*FuncPtr)(void*, Args...);
+ typedef void (*FuncPtr)(void*, Args...);
auto memb = FuncPtr(func);
memb(obj, args...);
}
template<class Ret, class Object, class... Args>
-Ret InvokeReturnNext(Object *obj, Args... args)
+Ret InvokeReturnNext(Object* obj, Args... args)
{
- auto addr = __builtin_return_address(0);
+ auto addr = __builtin_return_address(0);
Dl_info info;
dladdr(addr, &info);
auto func = dlsym(RTLD_NEXT, info.dli_sname);
- typedef Ret(*FuncPtr)(void*, Args...);
+ typedef Ret (*FuncPtr)(void*, Args...);
auto memb = FuncPtr(func);
return memb(obj, args...);
}
{
namespace Render
{
-
// Store internal PipelineCache as singleton
PipelineCache::PipelineCache(Dali::Graphics::Controller& controller)
{
gPipelineCache = this;
- InvokeNext( this, &controller );
+ InvokeNext(this, &controller);
}
-}
-}
-}
+} // namespace Render
+} // namespace Internal
+} // namespace Dali
int UtcDaliCorePipelineCacheTest(void)
{
// PipelineCache* cache = PipelineCache::GetPipelineCacheWithController( &application.GetGraphicsController() );
// Pipeline cache must be initialized
- DALI_TEST_EQUALS( gPipelineCache != 0, true, TEST_LOCATION);
+ DALI_TEST_EQUALS(gPipelineCache != 0, true, TEST_LOCATION);
// Test size of level0 nodes (should be 0, nothing added yet)
- DALI_TEST_EQUALS( (gPipelineCache->level0nodes.size() == 0), true, TEST_LOCATION);
+ DALI_TEST_EQUALS((gPipelineCache->level0nodes.size() == 0), true, TEST_LOCATION);
// Create something to render
Geometry geometry = CreateQuadGeometry();
application.Render();
// 1 pipeline should be added
- DALI_TEST_EQUALS( (gPipelineCache->level0nodes.size() == 1), true, TEST_LOCATION);
+ DALI_TEST_EQUALS((gPipelineCache->level0nodes.size() == 1), true, TEST_LOCATION);
// Add another actor, new pipeline will be created
- Shader shader1 = Shader::New("newVertexSrc", "newFragmentSrc");
- Actor actor1 = Actor::New();
+ Shader shader1 = Shader::New("newVertexSrc", "newFragmentSrc");
+ Actor actor1 = Actor::New();
Renderer renderer1 = Renderer::New(geometry, shader1);
renderer1.SetProperty(Dali::Renderer::Property::BLEND_MODE, Dali::BlendMode::ON);
actor1.AddRenderer(renderer1);
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( (gPipelineCache->level0nodes.size() == 2), true, TEST_LOCATION);
+ DALI_TEST_EQUALS((gPipelineCache->level0nodes.size() == 2), true, TEST_LOCATION);
// Now add 3rd actor reusing first pipeline
{
- Actor actor2 = Actor::New();
+ Actor actor2 = Actor::New();
Renderer renderer2 = Renderer::New(geometry, shader);
renderer2.SetProperty(Dali::Renderer::Property::BLEND_MODE, Dali::BlendMode::ON);
actor2.AddRenderer(renderer);
application.Render();
// Number of pipelines shouldn't change
- DALI_TEST_EQUALS( (gPipelineCache->level0nodes.size() == 2), true, TEST_LOCATION);
+ DALI_TEST_EQUALS((gPipelineCache->level0nodes.size() == 2), true, TEST_LOCATION);
// Test final 'noBlend' path on first pipeline
{
- Actor actor3 = Actor::New();
+ Actor actor3 = Actor::New();
Renderer renderer3 = Renderer::New(geometry, shader);
renderer3.SetProperty(Dali::Renderer::Property::BLEND_MODE, Dali::BlendMode::OFF);
actor3.AddRenderer(renderer3);
application.Render();
// Test whether noBlend pipeline is set in cache
- DALI_TEST_EQUALS( gPipelineCache->level0nodes[0].level1nodes[0].noBlend.pipeline != nullptr, true, TEST_LOCATION);
+ uint32_t noBlendFoundCount = 0u;
+ for(auto& iterLevel0 : gPipelineCache->level0nodes)
+ {
+ for(auto& iterLevel1 : iterLevel0.level1nodes)
+ {
+ if(iterLevel1.noBlend.pipeline != nullptr)
+ {
+ noBlendFoundCount++;
+ }
+ }
+ }
+ DALI_TEST_EQUALS(noBlendFoundCount, 1u, TEST_LOCATION);
END_TEST;
}
\ No newline at end of file
END_TEST;
}
+int utcDaliActorGetSizeAfterAnimation2(void)
+{
+ TestApplication application;
+ tet_infoline("Check the actor size before / after an animation is finished if before size is equal to animation target size");
+
+ Vector3 actorSize(100.0f, 100.0f, 0.0f);
+
+ Actor actor = Actor::New();
+ actor.SetProperty(Actor::Property::SIZE, actorSize);
+ actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+ application.GetScene().Add(actor);
+
+ // Size should be updated without rendering.
+ Vector3 size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+
+ // Size and current size should be updated.
+ size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+ DALI_TEST_EQUALS(actorSize.width, actor.GetProperty<float>(Actor::Property::SIZE_WIDTH), TEST_LOCATION);
+ DALI_TEST_EQUALS(actorSize.height, actor.GetProperty<float>(Actor::Property::SIZE_HEIGHT), TEST_LOCATION);
+ DALI_TEST_EQUALS(actorSize.depth, actor.GetProperty<float>(Actor::Property::SIZE_DEPTH), TEST_LOCATION);
+
+ Vector3 currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(currentSize, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+ DALI_TEST_EQUALS(actorSize.width, actor.GetCurrentProperty<float>(Actor::Property::SIZE_WIDTH), TEST_LOCATION);
+ DALI_TEST_EQUALS(actorSize.height, actor.GetCurrentProperty<float>(Actor::Property::SIZE_HEIGHT), TEST_LOCATION);
+ DALI_TEST_EQUALS(actorSize.depth, actor.GetCurrentProperty<float>(Actor::Property::SIZE_DEPTH), TEST_LOCATION);
+
+ // Set size again
+ actorSize = Vector3(200.0f, 200.0f, 0.0f);
+ actor.SetProperty(Actor::Property::SIZE, actorSize);
+
+ size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+ Vector3 targetValue(actorSize);
+
+ Animation animation = Animation::New(1.0f);
+ animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetValue);
+ animation.Play();
+
+ // Size should be updated without rendering.
+ size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(100); // During the animation
+
+ size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+ DALI_TEST_EQUALS(targetValue.width, actor.GetProperty<float>(Actor::Property::SIZE_WIDTH), TEST_LOCATION);
+ DALI_TEST_EQUALS(targetValue.height, actor.GetProperty<float>(Actor::Property::SIZE_HEIGHT), TEST_LOCATION);
+ DALI_TEST_EQUALS(targetValue.depth, actor.GetProperty<float>(Actor::Property::SIZE_DEPTH), TEST_LOCATION);
+
+ // We should get target value because targetValue is equal to current actor size.
+ currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(currentSize, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+ DALI_TEST_EQUALS(targetValue.width, actor.GetCurrentProperty<float>(Actor::Property::SIZE_WIDTH), TEST_LOCATION);
+ DALI_TEST_EQUALS(targetValue.height, actor.GetCurrentProperty<float>(Actor::Property::SIZE_HEIGHT), TEST_LOCATION);
+ DALI_TEST_EQUALS(targetValue.depth, actor.GetCurrentProperty<float>(Actor::Property::SIZE_DEPTH), TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(1000); // After animation finished
+
+ size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+ currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+ DALI_TEST_EQUALS(currentSize, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+ END_TEST;
+}
+
int utcDaliActorRelayoutAndAnimation(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliExtentsMoveConstructor(void)
+{
+ TestApplication application;
+
+ Extents extent(10u, 20u, 400u, 200u);
+
+ Extents extent2(std::move(extent));
+
+ DALI_TEST_EQUALS(extent2.start, 10u, TEST_LOCATION);
+ DALI_TEST_EQUALS(extent2.end, 20u, TEST_LOCATION);
+ DALI_TEST_EQUALS(extent2.top, 400u, TEST_LOCATION);
+ DALI_TEST_EQUALS(extent2.bottom, 200u, TEST_LOCATION);
+ END_TEST;
+}
+
+int UtcDaliExtentsMoveAssignment(void)
+{
+ TestApplication application;
+
+ Extents extent;
+
+ Extents extent2(10u, 20u, 400u, 200u);
+ extent = std::move(extent2);
+
+ DALI_TEST_EQUALS(extent.start, 10u, TEST_LOCATION);
+ DALI_TEST_EQUALS(extent.end, 20u, TEST_LOCATION);
+ DALI_TEST_EQUALS(extent.top, 400u, TEST_LOCATION);
+ DALI_TEST_EQUALS(extent.bottom, 200u, TEST_LOCATION);
+ END_TEST;
+}
+
int UtcDaliExtentsAssignP(void)
{
Extents extent;
/*
- * 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 UtcDaliMatrixGetScale(void)
+{
+ // Create an arbitrary vector
+ for(float x = 0.0f; x <= 2.0f; x += 0.1f)
+ {
+ for(float y = 0.0f; y < 2.0f; y += 0.1f)
+ {
+ for(float z = 0.0f; z < 2.0f; z += 0.1f)
+ {
+ Vector3 vScale(x, y, z);
+
+ for(float angle = 5.0f; angle <= 360.0f; angle += 15.0f)
+ {
+ Vector3 forward(1.0f, 1.3f, 2.0f);
+ forward.Normalize();
+
+ Quaternion rotation1(Radian(Degree(angle)), forward);
+ Vector3 position1(1.0f, 2.0f, 3.0f);
+
+ Matrix m1(false);
+ m1.SetTransformComponents(vScale, rotation1, position1);
+
+ Vector3 scale2 = m1.GetScale();
+
+ DALI_TEST_EQUALS(vScale, scale2, 0.001, TEST_LOCATION);
+ }
+ }
+ }
+ }
+ END_TEST;
+}
+
int UtcDaliMatrixSetTranslationP(void)
{
Matrix m;
/*
- * 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.
Scene& Scene::operator=(const Scene& rhs) = default;
-Scene::Scene(Scene&& handle) = default;
+Scene::Scene(Scene&& handle) noexcept = default;
-Scene& Scene::operator=(Scene&& rhs) = default;
+Scene& Scene::operator=(Scene&& rhs) noexcept = default;
Scene::Scene(Internal::Scene* internal)
: BaseHandle(internal)
*
* @param [in] handle A reference to the moved handle
*/
- Scene(Scene&& handle);
+ Scene(Scene&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param [in] rhs A reference to the moved handle
* @return A reference to this
*/
- Scene& operator=(Scene&& rhs);
+ Scene& operator=(Scene&& rhs) noexcept;
/**
* @brief Adds a child Actor to the Scene.
/**
* @brief Move construct
*/
- OrderedSet(OrderedSet&& rhs)
+ OrderedSet(OrderedSet&& rhs) noexcept
: mMap(std::move(rhs.mMap)),
mList(std::move(rhs.mList))
{
/**
* @brief Move assign
*/
- OrderedSet& operator=(OrderedSet&& rhs)
+ OrderedSet& operator=(OrderedSet&& rhs) noexcept
{
Clear();
mMap = std::move(rhs.mMap);
void ActorSizer::OnAnimateSize(Animation& animation, Vector3 targetSize, bool relative)
{
+ Vector3 originalTargetSize = mTargetSize;
mTargetSize = targetSize + mTargetSize * float(relative);
+ if(originalTargetSize != mTargetSize)
+ {
+ mTargetSizeDirtyFlag = true;
+ }
+
mAnimatedSize = mTargetSize;
mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH;
void ActorSizer::OnAnimateWidth(Animation& animation, float width, bool relative)
{
+ const float originalWidth = mTargetSize.width;
mTargetSize.width = width + float(relative) * mTargetSize.width;
+ if(!Equals(originalWidth,mTargetSize.width))
+ {
+ mTargetSizeDirtyFlag = true;
+ }
mAnimatedSize.width = mTargetSize.width;
mUseAnimatedSize |= AnimatedSizeFlag::WIDTH;
void ActorSizer::OnAnimateHeight(Animation& animation, float height, bool relative)
{
+ const float originalHeight = mTargetSize.height;
mTargetSize.height = height + float(relative) * mTargetSize.height;
+ if(!Equals(originalHeight, mTargetSize.height))
+ {
+ mTargetSizeDirtyFlag = true;
+ }
mAnimatedSize.height = mTargetSize.height;
mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT;
void ActorSizer::OnAnimateDepth(Animation& animation, float depth, bool relative)
{
+ const float originalDepth = mTargetSize.depth;
mTargetSize.depth = depth + float(relative) * mTargetSize.depth;
+ if(!Equals(originalDepth, mTargetSize.depth))
+ {
+ mTargetSizeDirtyFlag = true;
+ }
mAnimatedSize.depth = mTargetSize.depth;
mUseAnimatedSize |= AnimatedSizeFlag::DEPTH;
*/
// CLASS HEADER
-#include "relayout-controller-impl.h"
+#include <dali/internal/event/size-negotiation/relayout-controller-impl.h>
// EXTERNAL INCLUDES
#if defined(DEBUG_ENABLED)
{
// Make space for 32 controls to avoid having to copy construct a lot in the beginning
mRelayoutStack->Reserve(32);
+ mPotentialRedundantSubRoots.reserve(32);
+ mTopOfSubTreeStack.reserve(32);
}
RelayoutController::~RelayoutController() = default;
return;
}
- std::vector<Dali::Actor> potentialRedundantSubRoots;
- std::vector<Dali::Actor> topOfSubTreeStack;
+ std::vector<Dali::Actor>& potentialRedundantSubRoots = mPotentialRedundantSubRoots;
+ std::vector<Dali::Actor>& topOfSubTreeStack = mTopOfSubTreeStack;
+
+ DALI_ASSERT_ALWAYS(potentialRedundantSubRoots.empty() && "potentialRedundantSubRoots must be empty before RequestRelayout!");
+ DALI_ASSERT_ALWAYS(topOfSubTreeStack.empty() && "topOfSubTreeStack must be empty before RequestRelayout!");
topOfSubTreeStack.push_back(actor);
RemoveRequest(subRoot);
}
+ potentialRedundantSubRoots.clear();
+
if(!mProcessingCoreEvents)
{
mRenderController.RequestProcessEventsOnIdle(false);
std::unique_ptr<MemoryPoolRelayoutContainer> mRelayoutStack; ///< Stack for relayouting
+ std::vector<Dali::Actor> mPotentialRedundantSubRoots; ///< Stack of Actor when RequestLayout comes. Keep it as member to avoid vector size reserving.
+ std::vector<Dali::Actor> mTopOfSubTreeStack;
+
bool mRelayoutConnection : 1; ///< Whether EventProcessingFinishedSignal signal is connected.
bool mRelayoutFlag : 1; ///< Relayout flag to avoid unnecessary calls
bool mEnabled : 1; ///< Initially disabled. Must be enabled at some point.
mHasLayerScissor = true;
}
+ // Prepare Render::Renderer Render for this secondary command buffer.
+ Renderer::PrepareCommandBuffer();
+
// Loop through all RenderItems in the RenderList, set up any prerequisites to render them, then perform the render.
for(uint32_t index = 0u; index < count; ++index)
{
}
}
+ // Clean latest used pipeline
+ mImpl->pipelineCache->CleanLatestUsedCache();
+
mImpl->commandBufferSubmitted = false;
}
/*
- * 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
-PipelineCacheL0* PipelineCache::GetPipelineCacheL0(Program* program, Render::Geometry* geometry)
+PipelineCacheL0* PipelineCache::GetPipelineCacheL0(std::size_t hash, Program* program, Render::Geometry* geometry)
{
- auto it = std::find_if(level0nodes.begin(), level0nodes.end(), [program, geometry](PipelineCacheL0& item) {
- return ((item.program == program && item.geometry == geometry));
+ auto it = std::find_if(level0nodes.begin(), level0nodes.end(), [hash, program, geometry](PipelineCacheL0& item) {
+ return ((item.hash == hash && item.program == program && item.geometry == geometry));
});
// Add new node to cache
++bindingIndex;
}
PipelineCacheL0 level0;
+ level0.hash = hash;
level0.program = program;
level0.geometry = geometry;
level0.inputState = vertexInputState;
return retval;
}
+void PipelineCacheQueryInfo::GenerateHash()
+{
+ // Lightweight hash value generation.
+ hash = (reinterpret_cast<std::size_t>(program) >> Dali::Log<sizeof(decltype(*program))>::value) ^
+ (reinterpret_cast<std::size_t>(geometry) >> Dali::Log<sizeof(decltype(*geometry))>::value) ^
+ ((blendingEnabled ? 1u : 0u) << 0u) ^
+ ((alphaPremultiplied ? 1u : 0u) << 1u) ^
+ (static_cast<std::size_t>(geometry->GetTopology()) << 2u) ^
+ (static_cast<std::size_t>(renderer->GetFaceCullMode()) << 5u) ^
+ ((cameraUsingReflection ? 1u : 0u) << 8u) ^
+ (blendingEnabled ? static_cast<std::size_t>(blendingOptions->GetBitmask()) : 0xDA11u);
+}
+
+bool PipelineCacheQueryInfo::Equal(const PipelineCacheQueryInfo& lhs, const PipelineCacheQueryInfo& rhs) noexcept
+{
+ // Naive equal check.
+ const bool ret = (lhs.hash == rhs.hash) && // Check hash value first
+ (lhs.program == rhs.program) &&
+ (lhs.geometry == rhs.geometry) &&
+ (lhs.blendingEnabled == rhs.blendingEnabled) &&
+ (lhs.alphaPremultiplied == rhs.alphaPremultiplied) &&
+ (lhs.geometry->GetTopology() == rhs.geometry->GetTopology()) &&
+ (lhs.renderer->GetFaceCullMode() == rhs.renderer->GetFaceCullMode()) &&
+ (lhs.cameraUsingReflection == rhs.cameraUsingReflection) &&
+ (!lhs.blendingEnabled ||
+ (lhs.blendingOptions->GetBitmask() == rhs.blendingOptions->GetBitmask() &&
+ ((lhs.blendingOptions->GetBlendColor() == nullptr && rhs.blendingOptions->GetBlendColor() == nullptr) ||
+ (lhs.blendingOptions->GetBlendColor() &&
+ rhs.blendingOptions->GetBlendColor() &&
+ (*lhs.blendingOptions->GetBlendColor() == *rhs.blendingOptions->GetBlendColor())))));
+
+ return ret;
+}
+
PipelineCache::PipelineCache(Graphics::Controller& controller)
: graphicsController(&controller)
{
+ // Clean up cache first
+ CleanLatestUsedCache();
}
PipelineResult PipelineCache::GetPipeline(const PipelineCacheQueryInfo& queryInfo, bool createNewIfNotFound)
{
- auto* level0 = GetPipelineCacheL0(queryInfo.program, queryInfo.geometry);
+ // Seperate branch whether query use blending or not.
+ const int latestUsedCacheIndex = queryInfo.blendingEnabled ? 0 : 1;
+
+ // If we can reuse latest bound pipeline, Fast return.
+ if(ReuseLatestBoundPipeline(latestUsedCacheIndex, queryInfo))
+ {
+ return mLatestResult[latestUsedCacheIndex];
+ }
+
+ auto* level0 = GetPipelineCacheL0(queryInfo.hash, queryInfo.program, queryInfo.geometry);
auto* level1 = level0->GetPipelineCacheL1(queryInfo.renderer, queryInfo.cameraUsingReflection);
auto* level2 = level1->GetPipelineCacheL2(queryInfo.blendingEnabled, queryInfo.alphaPremultiplied, *queryInfo.blendingOptions);
result.level1 = level1;
result.level2 = level2;
+ // Copy query and result
+ mLatestQuery[latestUsedCacheIndex] = queryInfo;
+ mLatestResult[latestUsedCacheIndex] = result;
+
return result;
}
+bool PipelineCache::ReuseLatestBoundPipeline(const int latestUsedCacheIndex, const PipelineCacheQueryInfo& queryInfo) const
+{
+ return mLatestResult[latestUsedCacheIndex].pipeline != nullptr && PipelineCacheQueryInfo::Equal(queryInfo, mLatestQuery[latestUsedCacheIndex]);
+}
+
} // namespace Dali::Internal::Render
#define DALI_INTERNAL_RENDER_PIPELINE_CACHE_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.
*/
// INTERNAL INCLUDES
-#include <dali/internal/common/blending-options.h>
-#include <dali/graphics-api/graphics-types.h>
#include <dali/graphics-api/graphics-controller.h>
#include <dali/graphics-api/graphics-pipeline.h>
+#include <dali/graphics-api/graphics-types.h>
+#include <dali/internal/common/blending-options.h>
// EXTERNAL INCLUDES
#include <vector>
*/
struct PipelineCacheL1
{
-
- PipelineCacheL2 *GetPipelineCacheL2(bool blend, bool premul, BlendingOptions &blendingOptions);
+ PipelineCacheL2* GetPipelineCacheL2(bool blend, bool premul, BlendingOptions& blendingOptions);
uint32_t hashCode{}; // 1byte cull, 1byte poly, 1byte frontface
Graphics::RasterizationState rs{};
};
/**
- * Cache Level 0 : Stores geometry, program amd vertex input state
+ * Cache Level 0 : Stores hash, geometry, program amd vertex input state
*/
struct PipelineCacheL0 // L0 cache
{
- PipelineCacheL1 *GetPipelineCacheL1(Render::Renderer *renderer, bool usingReflection);
+ PipelineCacheL1* GetPipelineCacheL1(Render::Renderer* renderer, bool usingReflection);
- Geometry *geometry{};
- Program *program{};
+ std::size_t hash{};
+ Geometry* geometry{};
+ Program* program{};
Graphics::VertexInputState inputState;
std::vector<PipelineCacheL1> level1nodes;
struct PipelineCacheQueryInfo
{
// Program/Geometry
- Renderer *renderer;
- Program *program;
- Geometry *geometry;
+ Renderer* renderer;
+ Program* program;
+ Geometry* geometry;
bool cameraUsingReflection;
// Blending
- bool blendingEnabled;
- bool alphaPremultiplied;
- BlendingOptions *blendingOptions;
+ bool blendingEnabled;
+ bool alphaPremultiplied;
+ BlendingOptions* blendingOptions;
+
+ // Lightweight hash value before compare each query.
+ std::size_t hash{0u};
+ // Generate hash value for this query.
+ void GenerateHash();
+
+ // Value comparision between two query info.
+ static bool Equal(const PipelineCacheQueryInfo& lhs, const PipelineCacheQueryInfo& rhs) noexcept;
};
/**
/**
* Retrieves next cache level
*/
- PipelineCacheL0* GetPipelineCacheL0( Program *program, Render::Geometry *geometry);
+ PipelineCacheL0* GetPipelineCacheL0(std::size_t hash, Program* program, Render::Geometry* geometry);
/**
* Retrieves pipeline matching queryInfo struct
*
* May retrieve existing pipeline or create one or return nullptr.
*/
- PipelineResult GetPipeline( const PipelineCacheQueryInfo& queryInfo, bool createNewIfNotFound );
+ PipelineResult GetPipeline(const PipelineCacheQueryInfo& queryInfo, bool createNewIfNotFound);
-private:
+ /**
+ * @brief Check whether we can reuse latest found PipelineResult.
+ * We can reuse latest pipeline only if query info is equal with latest query
+ * and we don't call CleanLatestUsedCache() before.
+ *
+ * @param[in] latestUsedCacheIndex Index of cache we want to compare.
+ * @param[in] queryInfo Query for current pipeline.
+ * @return True if we can reuse latest pipeline result. False otherwise
+ */
+ bool ReuseLatestBoundPipeline(const int latestUsedCacheIndex, const PipelineCacheQueryInfo& queryInfo) const;
+
+ /**
+ * @brief Clear latest bound result.
+ */
+ void CleanLatestUsedCache()
+ {
+ // Set pipeline as nullptr is enough.
+ mLatestResult[0].pipeline = nullptr;
+ mLatestResult[1].pipeline = nullptr;
+ }
- Graphics::Controller* graphicsController{nullptr};
+private:
+ Graphics::Controller* graphicsController{nullptr};
std::vector<PipelineCacheL0> level0nodes;
+
+ // Cache latest queries whether blend enabled or not.
+ // (Since most UI case (like Text and Image) enable blend, and most 3D case disable blend.)
+ PipelineCacheQueryInfo mLatestQuery[2]; ///< Latest requested query info. It will be invalidate after query's renderer / geometry / blendingOptions value changed.
+ PipelineResult mLatestResult[2]; ///< Latest used result. It will be invalidate when we call CleanLatestUsedCache() or some cache changed.
};
-}
-}
+} // namespace Render
+} // namespace Dali::Internal
#endif // DALI_INTERNAL_RENDER_PIPELINE_CACHE_H
}
}
-bool Geometry::Draw(
- Graphics::Controller& graphicsController,
- Graphics::CommandBuffer& commandBuffer,
- uint32_t elementBufferOffset,
- uint32_t elementBufferCount)
+bool Geometry::BindVertexAttributes(Graphics::CommandBuffer& commandBuffer)
{
//Bind buffers to attribute locations
const auto vertexBufferCount = static_cast<uint32_t>(mVertexBuffers.Count());
commandBuffer.BindVertexBuffers(0, buffers, offsets);
+ return true;
+}
+
+bool Geometry::Draw(
+ Graphics::Controller& graphicsController,
+ Graphics::CommandBuffer& commandBuffer,
+ uint32_t elementBufferOffset,
+ uint32_t elementBufferCount)
+{
uint32_t numIndices(0u);
intptr_t firstIndexOffset(0u);
if(mIndexBuffer)
{
// Un-indexed draw call
uint32_t numVertices(0u);
- if(vertexBufferCount > 0)
+
+ if(mVertexBuffers.Count() > 0)
{
// truncated, no value loss happening in practice
numVertices = static_cast<uint32_t>(mVertexBuffers[0]->GetElementCount());
* Set up the attributes and perform the Draw call corresponding to the geometry type.
*
* @param[in] graphicsController The graphics controller
- * @param[in] bufferIndex The current buffer index
+ * @param[in,out] commandBuffer The current command buffer queue
* @param[in] elementBufferOffset The index of first element to draw if index buffer bound
* @param[in] elementBufferCount Number of elements to draw if index buffer bound, uses whole buffer when 0
* @return true if the draw command was issued, false otherwise
uint32_t elementBufferOffset,
uint32_t elementBufferCount);
+ /**
+ * @brief Set up the attributes bind commaneds
+ *
+ * @param[in,out] commandBuffer The current command buffer queue
+ * @return true if the bind command was issued, false otherwise
+ */
+ bool BindVertexAttributes(Graphics::CommandBuffer& commandBuffer);
+
private:
// VertexBuffers
Vector<Render::VertexBuffer*> mVertexBuffers;
return ((dataSize / 256u) + ((dataSize % 256u) ? 1u : 0u)) * 256u;
}
+/**
+ * @brief Store latest bound RenderGeometry, and help that we can skip duplicated vertex attributes bind.
+ *
+ * @param[in] geometry Current geometry to be used, or nullptr if render finished
+ * @return True if we can reuse latest bound vertex attributes. False otherwise.
+ */
+inline bool ReuseLatestBoundVertexAttributes(const Render::Geometry* geometry)
+{
+ static const Render::Geometry* gLatestVertexBoundGeometry = nullptr;
+ if(gLatestVertexBoundGeometry == geometry)
+ {
+ return true;
+ }
+ gLatestVertexBoundGeometry = geometry;
+ return false;
+}
+
} // namespace
namespace Render
MemoryPoolObjectAllocator<Renderer> gRenderRendererMemoryPool;
}
+void Renderer::PrepareCommandBuffer()
+{
+ // Reset latest geometry informations, So we can bind the first of geometry.
+ ReuseLatestBoundVertexAttributes(nullptr);
+
+ // todo : Fill here as many caches as we can store for reduce the number of command buffers
+}
+
RendererKey Renderer::NewKey(SceneGraph::RenderDataProvider* dataProvider,
Render::Geometry* geometry,
uint32_t blendingBitmask,
bool drawn = false; // Draw can fail if there are no vertex buffers or they haven't been uploaded yet
// @todo We should detect this case much earlier to prevent unnecessary work
- if(mDrawCommands.empty())
+ // Reuse latest bound vertex attributes location, or Bind buffers to attribute locations.
+ if(ReuseLatestBoundVertexAttributes(mGeometry) || mGeometry->BindVertexAttributes(commandBuffer))
{
- drawn = mGeometry->Draw(*mGraphicsController, commandBuffer, mIndexedDrawFirstElement, mIndexedDrawElementsCount);
+ if(mDrawCommands.empty())
+ {
+ drawn = mGeometry->Draw(*mGraphicsController, commandBuffer, mIndexedDrawFirstElement, mIndexedDrawElementsCount);
+ }
+ else
+ {
+ for(auto& cmd : commands)
+ {
+ drawn |= mGeometry->Draw(*mGraphicsController, commandBuffer, cmd->firstIndex, cmd->elementCount);
+ }
+ }
}
else
{
- for(auto& cmd : commands)
- {
- mGeometry->Draw(*mGraphicsController, commandBuffer, cmd->firstIndex, cmd->elementCount);
- }
+ // BindVertexAttributes failed. Reset cached geometry.
+ ReuseLatestBoundVertexAttributes(nullptr);
}
return drawn;
queryInfo.alphaPremultiplied = mPremultipliedAlphaEnabled;
queryInfo.cameraUsingReflection = instruction.GetCamera()->GetReflectionUsed();
+ queryInfo.GenerateHash();
+
+ // Find or generate new pipeline.
auto pipelineResult = mPipelineCache->GetPipeline(queryInfo, true);
// should be never null?
};
/**
+ * @brief Global static initialize for Render::Renderer before new CommandBuffer's Render fill start.
+ */
+ static void PrepareCommandBuffer();
+
+ /**
* Create a new renderer instance
* @param[in] dataProviders The data providers for the renderer
* @param[in] geometry The geometry for the renderer
#define DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_BASE_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.
bool mFirstApply : 1;
bool mDisconnected : 1;
+ PropertyOwnerContainer mObservedOwners; ///< A set of pointers to each observed object. Not owned.
+
private:
- PropertyOwnerContainer mObservedOwners; ///< A set of pointers to each observed object. Not owned.
- LifecycleObserver* mLifecycleObserver; ///< Resetter observers this object
+ LifecycleObserver* mLifecycleObserver; ///< Resetter observers this object
#ifdef DEBUG_ENABLED
static uint32_t mCurrentInstanceCount; ///< The current number of Constraint instances in existence.
#define DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_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.
if(mFunc->InputsInitialized())
{
PropertyType current = mTargetProperty.Get(updateBufferIndex);
+ PropertyType old = mTargetProperty.Get(!updateBufferIndex);
+
mFunc->Apply(updateBufferIndex, current);
+ // Compare with value of the previous frame
+ if constexpr(std::is_same_v<PropertyType, float>)
+ {
+ if(!Equals(old, current))
+ {
+ if(!mObservedOwners.Empty())
+ {
+ // The first observer is the target of the constraint
+ mObservedOwners[0]->SetUpdated(true);
+ }
+ }
+ }
+ else
+ {
+ if(old != current)
+ {
+ if(!mObservedOwners.Empty())
+ {
+ // The first observer is the target of the constraint
+ mObservedOwners[0]->SetUpdated(true);
+ }
+ }
+ }
+
// Optionally bake the final value
if(Dali::Constraint::BAKE == mRemoveAction)
{
/**
* Flag that the property has been Set during the current frame.
*/
- void OnSet()
+ virtual void OnSet()
{
mDirtyFlags = SET_FLAG;
}
/**
* Flag that the property has been Baked during the current frame.
*/
- void OnBake()
+ virtual void OnBake()
{
mDirtyFlags = BAKED_FLAG;
}
void Initialize()
{
mPropertyOwner->AddObserver(*this);
+ mPropertyOwner->SetUpdated(true);
}
/**
Lifetime lifetime)
: PropertyResetterBase(propertyOwner, baseProperty)
{
- mRunning = lifetime == Lifetime::BAKE ? ACTIVE : AGING;
+ mRunning = lifetime == Lifetime::BAKE ? AGING : ACTIVE;
}
/**
mRunning--;
mBaseProperty->ResetToBaseValue(updateBufferIndex);
- // @todo Consider adding mPropertyOwner->SetUpdated(true) here.
+ if(mRunning > 0)
+ {
+ mPropertyOwner->SetUpdated(true);
+ }
}
}
};
SetNodeUpdateArea(node, isLayer3d, nodeWorldMatrix, nodeSize, nodeUpdateArea);
nodeUpdateAreaSet = true;
- const Vector3& scale = node->GetWorldScale(updateBufferIndex);
+ const Vector3& scale = nodeWorldMatrix.GetScale();
const Vector3& size = Vector3(nodeUpdateArea.z, nodeUpdateArea.w, 1.0f) * scale;
if(size.LengthSquared() > Math::MACHINE_EPSILON_1000)
}
else if(mProperty == TRANSFORM_PROPERTY_WORLD_SCALE)
{
- Vector3 position;
- Quaternion orientation;
- worldMatrix.GetTransformComponents(position, orientation, mValue);
+ mValue = worldMatrix.GetScale();
}
}
}
/*
- * 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.
UpdateNodeOpacity(node, nodeDirtyFlags, updateBufferIndex);
- node.UpdateUniformHash(updateBufferIndex);
-
// For partial update, mark all children of an animating node as updated.
if(updated) // Only set to updated if parent was updated.
{
renderer->ResetDirtyFlag();
}
+ for(auto&& shader : mImpl->shaders)
+ {
+ shader->SetUpdated(false);
+ }
+
for(auto&& scene : mImpl->scenes)
{
scene->root->SetUpdatedTree(false);
#define DALI_INTERNAL_SCENEGRAPH_NODE_HELPER_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.
* It is assumed that successive elements are aligned, and that no padding
* is inserted by the compiler.
*/
-#define PROPERTY_WRAPPER(_BASE_ELEMENT, _TEMPLATE, _PROPERTY, _ELEMENT) \
- using _TEMPLATE##_PROPERTY = _TEMPLATE<_PROPERTY, OFFSET_##_BASE_ELEMENT>; \
- _TEMPLATE##_PROPERTY _ELEMENT; \
- enum \
- { \
- OFFSET_##_ELEMENT = sizeof(_TEMPLATE##_PROPERTY) + OFFSET_##_BASE_ELEMENT \
+#define PROPERTY_WRAPPER(_BASE_ELEMENT, _TEMPLATE, _PROPERTY, _ELEMENT) \
+ using _TEMPLATE##_ELEMENT = _TEMPLATE<_PROPERTY, OFFSET_##_BASE_ELEMENT>; \
+ _TEMPLATE##_ELEMENT _ELEMENT; \
+ enum \
+ { \
+ OFFSET_##_ELEMENT = sizeof(_TEMPLATE##_ELEMENT) + OFFSET_##_BASE_ELEMENT \
};
/*
mUpdateAreaChanged = false;
}
-void Node::UpdateUniformHash(BufferIndex bufferIndex)
-{
- uint64_t hash = 0xc70f6907UL;
- for(uint32_t i = 0u, count = mUniformMaps.Count(); i < count; ++i)
- {
- hash = mUniformMaps[i].propertyPtr->Hash(bufferIndex, hash);
- }
- if(mUniformsHash != hash)
- {
- mUniformsHash = hash;
- SetUpdated(true);
- }
-}
-
void Node::SetParent(Node& parentNode)
{
DALI_ASSERT_ALWAYS(this != &parentNode);
*/
void ResetDirtyFlags(BufferIndex updateBufferIndex);
- /**
- * Update uniform hash
- * @param[in] bufferIndex The buffer to read from.
- */
- void UpdateUniformHash(BufferIndex bufferIndex);
-
protected:
/**
* Set the parent of a Node.
InheritedColor mWorldColor; ///< Full inherited color
Vector4 mUpdateAreaHint; ///< Update area hint is provided for damaged area calculation. (x, y, width, height)
- uint64_t mUniformsHash{0u}; ///< Hash of uniform map property values
uint32_t mClippingSortModifier; ///< Contains bit-packed clipping information for quick access when sorting
const uint32_t mId; ///< The Unique ID of the node.
mRegenerateUniformMap = false;
SetUpdated(true);
}
-
- uint64_t hash = 0xc70f6907UL;
- const SceneGraph::UniformMapDataProvider& uniformMapDataProvider = GetUniformMapDataProvider();
- const SceneGraph::CollectedUniformMap& collectedUniformMap = uniformMapDataProvider.GetCollectedUniformMap();
- for(uint32_t i = 0u, count = collectedUniformMap.Count(); i < count; ++i)
- {
- hash = collectedUniformMap.mUniformMap[i].propertyPtr->Hash(updateBufferIndex, hash);
- }
- if(mUniformsHash != hash)
- {
- mUniformsHash = hash;
- SetUpdated(true);
- }
}
void Renderer::SetDrawCommands(Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size)
return mCollectedUniformMap;
}
+bool Renderer::IsUpdated() const
+{
+ if(Updated() || (mShader && mShader->Updated()))
+ {
+ return true;
+ }
+ return false;
+}
+
Vector4 Renderer::GetVisualTransformedUpdateArea(BufferIndex updateBufferIndex, const Vector4& originalUpdateArea) noexcept
{
if(mVisualProperties)
{
auto& coefficient = mVisualProperties->mCoefficient;
- // TODO : We may need to get some method that visual properties changed, without hash.
- // Or, need to call this API in PreRender side.
-
- uint64_t hash = 0xc70f6907UL;
-
- hash = mVisualProperties->mTransformOffset.Hash(updateBufferIndex, hash);
- hash = mVisualProperties->mTransformOffsetSizeMode.Hash(updateBufferIndex, hash);
- hash = mVisualProperties->mTransformSize.Hash(updateBufferIndex, hash);
- hash = mVisualProperties->mTransformOrigin.Hash(updateBufferIndex, hash);
- hash = mVisualProperties->mTransformAnchorPoint.Hash(updateBufferIndex, hash);
- hash = mVisualProperties->mExtraSize.Hash(updateBufferIndex, hash);
-
- if(coefficient.hash != hash)
+ // Recalculate only if coefficient need to be updated.
+ if(coefficient.IsUpdated())
{
- coefficient.hash = hash;
-
// VisualProperty
const Vector2 transformOffset = mVisualProperties->mTransformOffset.Get(updateBufferIndex);
const Vector4 transformOffsetSizeMode = mVisualProperties->mTransformOffsetSizeMode.Get(updateBufferIndex);
coefficient.coefCA = transformSize * Vector2(transformOffsetSizeMode.z, transformOffsetSizeMode.w) + extraSize;
coefficient.coefCB = coefficient.coefCA * transformAnchorPoint + transformOffset * Vector2(transformOffsetSizeMode.x, transformOffsetSizeMode.y);
}
+
+ float coefD = 0.0f; ///< Default as 0.0f when we don't use decorated renderer.
+
if(mVisualProperties->mExtendedProperties)
{
const auto decoratedVisualProperties = static_cast<VisualRenderer::AnimatableDecoratedVisualProperties*>(mVisualProperties->mExtendedProperties);
- uint64_t decoratedHash = 0xc70f6907UL;
-
- decoratedHash = decoratedVisualProperties->mBorderlineWidth.Hash(updateBufferIndex, decoratedHash);
- decoratedHash = decoratedVisualProperties->mBorderlineOffset.Hash(updateBufferIndex, decoratedHash);
- decoratedHash = decoratedVisualProperties->mBlurRadius.Hash(updateBufferIndex, decoratedHash);
+ auto& decoratedCoefficient = decoratedVisualProperties->mCoefficient;
- if(coefficient.decoratedHash != decoratedHash)
+ // Recalculate only if coefficient need to be updated.
+ if(decoratedCoefficient.IsUpdated())
{
- coefficient.decoratedHash = decoratedHash;
-
// DecoratedVisualProperty
const float borderlineWidth = decoratedVisualProperties->mBorderlineWidth.Get(updateBufferIndex);
const float borderlineOffset = decoratedVisualProperties->mBorderlineOffset.Get(updateBufferIndex);
DALI_LOG_INFO(gSceneGraphRendererLogFilter, Debug::Verbose, "blur radius %5.3f\n", blurRadius);
// D coefficients be used only decoratedVisual.
- // It can be calculated parallely with transform.
-
- coefficient.coefD = std::max((1.0f + Dali::Clamp(borderlineOffset, -1.0f, 1.0f)) * borderlineWidth, 2.0f * blurRadius);
+ // It can be calculated parallely with visual transform.
+ decoratedCoefficient.coefD = std::max((1.0f + Dali::Clamp(borderlineOffset, -1.0f, 1.0f)) * borderlineWidth, 2.0f * blurRadius);
}
+
+ // Update coefD so we can use this value out of this scope.
+ coefD = decoratedCoefficient.coefD;
}
// Calculate vertex position by coefficient
// TODO : We need to re-generate coefficient to consitder area width/height
const Vector4 resultArea = Vector4(originalXY.x,
originalXY.y,
- scaleVertexPosition.x + 2.0f * abs(basicVertexPosition.x) + coefficient.coefD,
- scaleVertexPosition.y + 2.0f * abs(basicVertexPosition.y) + coefficient.coefD);
+ scaleVertexPosition.x + 2.0f * abs(basicVertexPosition.x) + coefD,
+ scaleVertexPosition.y + 2.0f * abs(basicVertexPosition.y) + coefD);
DALI_LOG_INFO(gSceneGraphRendererLogFilter, Debug::Verbose, "%f %f %f %f--> %f %f %f %f\n", originalUpdateArea.x, originalUpdateArea.y, originalUpdateArea.z, originalUpdateArea.w, resultArea.x, resultArea.y, resultArea.z, resultArea.w);
#include <dali/internal/update/common/animatable-property.h>
#include <dali/internal/update/common/property-owner.h>
#include <dali/internal/update/common/uniform-map.h>
+#include <dali/internal/update/rendering/scene-graph-visual-renderer.h>
#include <dali/public-api/rendering/geometry.h>
#include <dali/public-api/rendering/renderer.h> // Dali::Renderer
using RendererIter = RendererContainer::Iterator;
using RendererConstIter = RendererContainer::ConstIterator;
-namespace VisualRenderer
-{
-struct AnimatableVisualProperties
-{
- AnimatableVisualProperties()
- : mTransformOffset(Vector2::ZERO),
- mTransformSize(Vector2::ONE),
- mTransformOrigin(Vector2::ZERO),
- mTransformAnchorPoint(Vector2::ZERO),
- mTransformOffsetSizeMode(Vector4::ZERO),
- mExtraSize(Vector2::ZERO),
- mMixColor(Vector3::ONE),
- mPreMultipliedAlpha(0.0f),
- mExtendedPropertiesDeleteFunction(nullptr)
- {
- }
-
- ~AnimatableVisualProperties()
- {
- if(mExtendedProperties && mExtendedPropertiesDeleteFunction)
- {
- mExtendedPropertiesDeleteFunction(mExtendedProperties);
- }
- }
-
- /**
- * @brief Cached coefficient value when we calculate visual transformed update size.
- * It can reduce complexity of calculate the vertex position.
- *
- * Vector2 vertexPosition = (XA * aPosition + XB) * originalSize + (CA * aPosition + CB) + Vector2(D, D) * aPosition
- */
- struct VisualTransformedUpdateSizeCoefficientCache
- {
- Vector2 coefXA{Vector2::ZERO};
- Vector2 coefXB{Vector2::ZERO};
- Vector2 coefCA{Vector2::ZERO};
- Vector2 coefCB{Vector2::ZERO};
- float coefD{0.0f};
-
- uint64_t hash{0u};
- uint64_t decoratedHash{0u};
- };
- VisualTransformedUpdateSizeCoefficientCache mCoefficient; ///< Coefficient value to calculate visual transformed update size by VisualProperties more faster.
-
- AnimatableProperty<Vector2> mTransformOffset;
- AnimatableProperty<Vector2> mTransformSize;
- AnimatableProperty<Vector2> mTransformOrigin;
- AnimatableProperty<Vector2> mTransformAnchorPoint;
- AnimatableProperty<Vector4> mTransformOffsetSizeMode;
- AnimatableProperty<Vector2> mExtraSize;
- AnimatableProperty<Vector3> mMixColor;
- AnimatableProperty<float> mPreMultipliedAlpha;
-
- void* mExtendedProperties{nullptr}; // Enable derived class to extend properties further
- void (*mExtendedPropertiesDeleteFunction)(void*){nullptr}; // Derived class's custom delete functor
-};
-
-struct AnimatableDecoratedVisualProperties
-{
- AnimatableDecoratedVisualProperties()
- : mCornerRadius(Vector4::ZERO),
- mCornerRadiusPolicy(1.0f),
- mBorderlineWidth(0.0f),
- mBorderlineColor(Color::BLACK),
- mBorderlineOffset(0.0f),
- mBlurRadius(0.0f)
- {
- }
- ~AnimatableDecoratedVisualProperties()
- {
- }
-
- // Delete function of AnimatableDecoratedVisualProperties* converted as void*
- static void DeleteFunction(void* data)
- {
- delete static_cast<AnimatableDecoratedVisualProperties*>(data);
- }
-
- AnimatableProperty<Vector4> mCornerRadius;
- AnimatableProperty<float> mCornerRadiusPolicy;
- AnimatableProperty<float> mBorderlineWidth;
- AnimatableProperty<Vector4> mBorderlineColor;
- AnimatableProperty<float> mBorderlineOffset;
- AnimatableProperty<float> mBlurRadius;
-};
-} // namespace VisualRenderer
-
class Renderer : public PropertyOwner,
public UniformMapDataProvider,
public RenderDataProvider
/**
* @copydoc RenderDataProvider::IsUpdated()
*/
- bool IsUpdated() const override
- {
- return Updated();
- }
+ bool IsUpdated() const override;
/**
* @copydoc RenderDataProvider::GetVisualTransformedUpdateArea()
Dali::Internal::Render::Renderer::StencilParameters mStencilParameters; ///< Struct containing all stencil related options
- uint64_t mUniformsHash{0}; ///< Hash of uniform map property values
uint32_t mIndexedDrawFirstElement; ///< first element index to be drawn using indexed draw
uint32_t mIndexedDrawElementsCount; ///< number of elements to be drawn using indexed draw
uint32_t mBlendBitmask; ///< The bitmask of blending options
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_VISUAL_RENDERER_PROPERTY_H
+#define DALI_INTERNAL_SCENE_GRAPH_VISUAL_RENDERER_PROPERTY_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dali/internal/update/common/animatable-property.h>
+
+namespace Dali::Internal::SceneGraph::VisualRenderer
+{
+/**
+ * @brief Base class for VisualRender properties coefficient.
+ * It will mark update flag as dirty if some properties are changed.
+ * By that update flag, we can determine that we need to re-calculate
+ * coefficient values or not.
+ */
+struct VisualRendererCoefficientCacheBase
+{
+ VisualRendererCoefficientCacheBase()
+ : mUpdated(true)
+ {
+ }
+
+ virtual ~VisualRendererCoefficientCacheBase() = default;
+
+ /**
+ * @brief Check whether this cache need to be update.
+ * After call this API, update flag will be reset.
+ *
+ * @return True if this coefficient updated. False otherwise.
+ */
+ bool IsUpdated()
+ {
+ bool ret = mUpdated;
+ mUpdated = false;
+ return ret;
+ }
+
+ /**
+ * @brief Mark update flag as true.
+ */
+ void Update()
+ {
+ mUpdated = true;
+ }
+
+private:
+ bool mUpdated; ///< Updated flag for this coefficient cache.
+};
+
+/**
+ * @brief Special AnimatableProperty class for VisualRenderer properties
+ * that will be used for coefficient calculation.
+ * It will be used to avoid useless coefficient update.
+ *
+ * @tparam T Type of animatable property
+ */
+template<typename T, size_t CacheBaseDataOffset>
+struct VisualRendererProperty : public AnimatableProperty<T>
+{
+ enum
+ {
+ VISUAL_RENDERER_CACHE_BASE_DATA_OFFSET = CacheBaseDataOffset
+ };
+ VisualRendererCoefficientCacheBase* GetCacheBaseData()
+ {
+ return reinterpret_cast<VisualRendererCoefficientCacheBase*>(
+ reinterpret_cast<uint8_t*>(this) - VISUAL_RENDERER_CACHE_BASE_DATA_OFFSET);
+ }
+ const VisualRendererCoefficientCacheBase* GetCacheBaseData() const
+ {
+ return reinterpret_cast<const VisualRendererCoefficientCacheBase*>(
+ reinterpret_cast<const uint8_t*>(this) - VISUAL_RENDERER_CACHE_BASE_DATA_OFFSET);
+ }
+
+public:
+ /**
+ * Constructor, initialize the dirty flag
+ */
+ VisualRendererProperty(const T& initialValue)
+ : AnimatableProperty<T>(initialValue)
+ {
+ }
+
+ /**
+ * Virtual destructor.
+ */
+ ~VisualRendererProperty() override = default;
+
+ /**
+ * @copydoc Dali::Internal::SceneGraph::AnimatablePropertyBase::OnSet
+ */
+ void OnSet() override
+ {
+ GetCacheBaseData()->Update();
+ AnimatablePropertyBase::OnSet();
+ }
+
+ /**
+ * @copydoc Dali::Internal::SceneGraph::AnimatablePropertyBase::OnBake
+ */
+ void OnBake() override
+ {
+ GetCacheBaseData()->Update();
+ AnimatablePropertyBase::OnBake();
+ }
+};
+
+} // namespace Dali::Internal::SceneGraph::VisualRenderer
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_VISUAL_RENDERER_PROPERTY_H
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_VISUAL_RENDERER_H
+#define DALI_INTERNAL_SCENE_GRAPH_VISUAL_RENDERER_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// EXTERNAL INCLUDES
+#include <stdint.h> ///< For size_t
+
+// INTERNAL INCLUDES
+#include <dali/internal/update/nodes/node-helper.h> ///< For property wrapper macro
+#include <dali/internal/update/rendering/scene-graph-visual-renderer-property.h>
+
+namespace Dali::Internal::SceneGraph::VisualRenderer
+{
+struct AnimatableVisualProperties
+{
+ AnimatableVisualProperties()
+ : mTransformOffset(Vector2::ZERO),
+ mTransformSize(Vector2::ONE),
+ mTransformOrigin(Vector2::ZERO),
+ mTransformAnchorPoint(Vector2::ZERO),
+ mTransformOffsetSizeMode(Vector4::ZERO),
+ mExtraSize(Vector2::ZERO),
+ mMixColor(Vector3::ONE),
+ mPreMultipliedAlpha(0.0f),
+ mExtendedPropertiesDeleteFunction(nullptr)
+ {
+ }
+
+ ~AnimatableVisualProperties()
+ {
+ if(mExtendedProperties && mExtendedPropertiesDeleteFunction)
+ {
+ mExtendedPropertiesDeleteFunction(mExtendedProperties);
+ }
+ }
+
+ /**
+ * @brief Cached coefficient value when we calculate visual transformed update size.
+ * It can reduce complexity of calculate the vertex position.
+ *
+ * Vector2 vertexPosition = (XA * aPosition + XB) * originalSize + (CA * aPosition + CB)
+ */
+ struct VisualTransformedUpdateSizeCoefficientCache : public VisualRendererCoefficientCacheBase
+ {
+ VisualTransformedUpdateSizeCoefficientCache()
+ : VisualRendererCoefficientCacheBase(),
+ coefXA(Vector2::ZERO),
+ coefXB(Vector2::ZERO),
+ coefCA(Vector2::ZERO),
+ coefCB(Vector2::ZERO)
+ {
+ }
+
+ ~VisualTransformedUpdateSizeCoefficientCache() override = default;
+
+ Vector2 coefXA;
+ Vector2 coefXB;
+ Vector2 coefCA;
+ Vector2 coefCB;
+ };
+
+public: // Default properties
+ // Define a base offset for the following wrappers. The wrapper macros calculate offsets from the previous
+ // element such that each wrapper type generates a compile time offset to the CoefficientCache data.
+ BASE(VisualTransformedUpdateSizeCoefficientCache, mCoefficient); ///< Coefficient value to calculate visual transformed update size by VisualProperties more faster.
+
+ PROPERTY_WRAPPER(mCoefficient, VisualRendererProperty, Vector2, mTransformOffset);
+ PROPERTY_WRAPPER(mTransformOffset, VisualRendererProperty, Vector2, mTransformSize);
+ PROPERTY_WRAPPER(mTransformSize, VisualRendererProperty, Vector2, mTransformOrigin);
+ PROPERTY_WRAPPER(mTransformOrigin, VisualRendererProperty, Vector2, mTransformAnchorPoint);
+ PROPERTY_WRAPPER(mTransformAnchorPoint, VisualRendererProperty, Vector4, mTransformOffsetSizeMode);
+ PROPERTY_WRAPPER(mTransformOffsetSizeMode, VisualRendererProperty, Vector2, mExtraSize);
+
+ // Properties that don't give any effort to coefficient.
+ AnimatableProperty<Vector3> mMixColor;
+ AnimatableProperty<float> mPreMultipliedAlpha;
+
+public: // Extended properties
+ void* mExtendedProperties{nullptr}; // Enable derived class to extend properties further
+ void (*mExtendedPropertiesDeleteFunction)(void*){nullptr}; // Derived class's custom delete functor
+};
+
+struct AnimatableDecoratedVisualProperties
+{
+ AnimatableDecoratedVisualProperties()
+ : mBorderlineWidth(0.0f),
+ mBorderlineOffset(0.0f),
+ mBlurRadius(0.0f),
+ mBorderlineColor(Color::BLACK),
+ mCornerRadius(Vector4::ZERO),
+ mCornerRadiusPolicy(1.0f)
+ {
+ }
+ ~AnimatableDecoratedVisualProperties()
+ {
+ }
+
+ // Delete function of AnimatableDecoratedVisualProperties* converted as void*
+ static void DeleteFunction(void* data)
+ {
+ delete static_cast<AnimatableDecoratedVisualProperties*>(data);
+ }
+
+ /**
+ * @brief Cached coefficient value when we calculate visual transformed update size.
+ * It can reduce complexity of calculate the vertex position.
+ *
+ * Vector2 vertexPosition += Vector2(D, D) * aPosition
+ */
+ struct DecoratedVisualTransformedUpdateSizeCoefficientCache : public VisualRendererCoefficientCacheBase
+ {
+ DecoratedVisualTransformedUpdateSizeCoefficientCache()
+ : VisualRendererCoefficientCacheBase(),
+ coefD(0.0f)
+ {
+ }
+
+ ~DecoratedVisualTransformedUpdateSizeCoefficientCache() override = default;
+
+ float coefD;
+ };
+
+public: // Default properties
+ // Define a base offset for the following wrappers. The wrapper macros calculate offsets from the previous
+ // element such that each wrapper type generates a compile time offset to the CoefficientCache data.
+ BASE(DecoratedVisualTransformedUpdateSizeCoefficientCache, mCoefficient); ///< Coefficient value to calculate visual transformed update size by VisualProperties more faster.
+
+ PROPERTY_WRAPPER(mCoefficient, VisualRendererProperty, float, mBorderlineWidth);
+ PROPERTY_WRAPPER(mBorderlineWidth, VisualRendererProperty, float, mBorderlineOffset);
+ PROPERTY_WRAPPER(mBorderlineOffset, VisualRendererProperty, float, mBlurRadius);
+
+ // Properties that don't give any effort to coefficient.
+ AnimatableProperty<Vector4> mBorderlineColor;
+ AnimatableProperty<Vector4> mCornerRadius;
+ AnimatableProperty<float> mCornerRadiusPolicy;
+};
+} // namespace Dali::Internal::SceneGraph::VisualRenderer
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_VISUAL_RENDERER_H
Actor& Actor::operator=(const Actor& rhs) = default;
-Actor::Actor(Actor&& rhs) = default;
+Actor::Actor(Actor&& rhs) noexcept = default;
-Actor& Actor::operator=(Actor&& rhs) = default;
+Actor& Actor::operator=(Actor&& rhs) noexcept = default;
Layer Actor::GetLayer()
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the actor to move
*/
- Actor(Actor&& rhs);
+ Actor(Actor&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the actor to move
* @return A reference to this
*/
- Actor& operator=(Actor&& rhs);
+ Actor& operator=(Actor&& rhs) noexcept;
// Containment
CameraActor& CameraActor::operator=(const CameraActor& rhs) = default;
-CameraActor::CameraActor(CameraActor&& rhs) = default;
+CameraActor::CameraActor(CameraActor&& rhs) noexcept = default;
-CameraActor& CameraActor::operator=(CameraActor&& rhs) = default;
+CameraActor& CameraActor::operator=(CameraActor&& rhs) noexcept = default;
void CameraActor::SetType(Dali::Camera::Type type)
{
* @SINCE_2_2.4
* @param[in] rhs A reference to the actor to move
*/
- CameraActor(CameraActor&& rhs);
+ CameraActor(CameraActor&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the actor to move
* @return A reference to this
*/
- CameraActor& operator=(CameraActor&& rhs);
+ CameraActor& operator=(CameraActor&& rhs) noexcept;
/**
* @brief Sets the camera type.
CustomActor& CustomActor::operator=(const CustomActor& rhs) = default;
-CustomActor::CustomActor(CustomActor&& rhs) = default;
+CustomActor::CustomActor(CustomActor&& rhs) noexcept = default;
-CustomActor& CustomActor::operator=(CustomActor&& rhs) = default;
+CustomActor& CustomActor::operator=(CustomActor&& rhs) noexcept = default;
CustomActorImpl& CustomActor::GetImplementation()
{
* @SINCE_1_9.22
* @param[in] rhs The actor to move
*/
- CustomActor(CustomActor&& rhs);
+ CustomActor(CustomActor&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs The actor to move
* @return A reference to this
*/
- CustomActor& operator=(CustomActor&& rhs);
+ CustomActor& operator=(CustomActor&& rhs) noexcept;
public: // Not intended for application developers
/**
*/
DrawableActor() = default;
+ /**
+ * @brief Copy constructor.
+ *
+ * @SINCE_2_2.17
+ * @param[in] copy The actor to copy
+ */
+ DrawableActor(const DrawableActor& copy) = default;
+
+ /**
+ * @brief Assignment operator.
+ *
+ * @SINCE_2_2.17
+ * @param[in] rhs The actor to copy
+ * @return A reference to this
+ */
+ DrawableActor& operator=(const DrawableActor& rhs) = default;
+
+ /**
+ * @brief Move constructor.
+ *
+ * @SINCE_2_2.17
+ * @param[in] rhs The actor to move
+ */
+ DrawableActor(DrawableActor&& rhs) noexcept = default;
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_2_2.17
+ * @param[in] rhs The actor to move
+ * @return A reference to this
+ */
+ DrawableActor& operator=(DrawableActor&& rhs) noexcept = default;
private:
explicit DrawableActor(Internal::DrawableActor* internal);
};
Layer& Layer::operator=(const Layer& rhs) = default;
-Layer::Layer(Layer&& rhs) = default;
+Layer::Layer(Layer&& rhs) noexcept = default;
-Layer& Layer::operator=(Layer&& rhs) = default;
+Layer& Layer::operator=(Layer&& rhs) noexcept = default;
void Layer::Raise()
{
* @SINCE_1_9.22
* @param[in] rhs The layer to move
*/
- Layer(Layer&& rhs);
+ Layer(Layer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs The layer to move
* @return A reference to this
*/
- Layer& operator=(Layer&& rhs);
+ Layer& operator=(Layer&& rhs) noexcept;
/**
* @brief Increments the depth of the layer.
Animation& Animation::operator=(const Animation& rhs) = default;
-Animation::Animation(Animation&& rhs) = default;
+Animation::Animation(Animation&& rhs) noexcept = default;
-Animation& Animation::operator=(Animation&& rhs) = default;
+Animation& Animation::operator=(Animation&& rhs) noexcept = default;
void Animation::SetDuration(float durationSeconds)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Animation(Animation&& rhs);
+ Animation(Animation&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Animation& operator=(Animation&& rhs);
+ Animation& operator=(Animation&& rhs) noexcept;
/**
* @brief Sets the duration of an animation.
Constraint& Constraint::operator=(const Constraint& rhs) = default;
-Constraint::Constraint(Constraint&& rhs) = default;
+Constraint::Constraint(Constraint&& rhs) noexcept = default;
-Constraint& Constraint::operator=(Constraint&& rhs) = default;
+Constraint& Constraint::operator=(Constraint&& rhs) noexcept = default;
Constraint Constraint::DownCast(BaseHandle baseHandle)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Constraint(Constraint&& rhs);
+ Constraint(Constraint&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Constraint& operator=(Constraint&& rhs);
+ Constraint& operator=(Constraint&& rhs) noexcept;
/**
* @brief Downcasts a handle to Constraint handle.
KeyFrames& KeyFrames::operator=(const KeyFrames& rhs) = default;
-KeyFrames::KeyFrames(KeyFrames&& rhs) = default;
+KeyFrames::KeyFrames(KeyFrames&& rhs) noexcept = default;
-KeyFrames& KeyFrames::operator=(KeyFrames&& rhs) = default;
+KeyFrames& KeyFrames::operator=(KeyFrames&& rhs) noexcept = default;
Property::Type KeyFrames::GetType() const
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- KeyFrames(KeyFrames&& rhs);
+ KeyFrames(KeyFrames&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- KeyFrames& operator=(KeyFrames&& rhs);
+ KeyFrames& operator=(KeyFrames&& rhs) noexcept;
/**
* @brief Gets the type of the key frame.
LinearConstrainer& LinearConstrainer::operator=(const LinearConstrainer& rhs) = default;
-LinearConstrainer::LinearConstrainer(LinearConstrainer&& rhs) = default;
+LinearConstrainer::LinearConstrainer(LinearConstrainer&& rhs) noexcept = default;
-LinearConstrainer& LinearConstrainer::operator=(LinearConstrainer&& rhs) = default;
+LinearConstrainer& LinearConstrainer::operator=(LinearConstrainer&& rhs) noexcept = default;
void LinearConstrainer::Apply(Dali::Property target, Dali::Property source, const Vector2& range, const Vector2& wrap)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- LinearConstrainer(LinearConstrainer&& rhs);
+ LinearConstrainer(LinearConstrainer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- LinearConstrainer& operator=(LinearConstrainer&& rhs);
+ LinearConstrainer& operator=(LinearConstrainer&& rhs) noexcept;
/**
* @brief Applies the linear constraint to the target property.
Path& Path::operator=(const Path& rhs) = default;
-Path::Path(Path&& rhs) = default;
+Path::Path(Path&& rhs) noexcept = default;
-Path& Path::operator=(Path&& rhs) = default;
+Path& Path::operator=(Path&& rhs) noexcept = default;
void Path::AddPoint(const Vector3& point)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Path(Path&& rhs);
+ Path(Path&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- Path& operator=(Path&& rhs);
+ Path& operator=(Path&& rhs) noexcept;
/**
* @brief Adds an interpolation point.
Extents(const Extents& copy) = default;
/**
+ * @brief Move constructor.
+ * @SINCE_2_2.17
+ * @param[in] move A reference to the moved Extents
+ */
+ Extents(Extents&& move) = default;
+
+ /**
* @brief Constructor.
*
* @SINCE_1_2.62
Extents& operator=(const Extents& copy) = default;
/**
+ * @brief Move Assignment operator.
+ * @SINCE_2_2.17
+ * @param[in] move A reference to the moved Extents
+ * @return Itself
+ */
+ Extents& operator=(Extents&& move) = default;
+
+ /**
* @brief Assignment operator.
*
* @SINCE_1_2.62
{
const uint32_t CORE_MAJOR_VERSION = 2;
const uint32_t CORE_MINOR_VERSION = 2;
-const uint32_t CORE_MICRO_VERSION = 15;
+const uint32_t CORE_MICRO_VERSION = 17;
const char* const CORE_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
GestureDetector& GestureDetector::operator=(const GestureDetector& rhs) = default;
-GestureDetector::GestureDetector(GestureDetector&& handle) = default;
+GestureDetector::GestureDetector(GestureDetector&& handle) noexcept = default;
-GestureDetector& GestureDetector::operator=(GestureDetector&& rhs) = default;
+GestureDetector& GestureDetector::operator=(GestureDetector&& rhs) noexcept = default;
void GestureDetector::Attach(Actor actor)
{
* @SINCE_2_2.4
* @param[in] handle A reference to the moved handle
*/
- GestureDetector(GestureDetector&& handle);
+ GestureDetector(GestureDetector&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- GestureDetector& operator=(GestureDetector&& rhs);
+ GestureDetector& operator=(GestureDetector&& rhs) noexcept;
public: // Actor related
/**
Gesture::Gesture(const Gesture& rhs) = default;
-Gesture::Gesture(Gesture&& rhs) = default;
+Gesture::Gesture(Gesture&& rhs)noexcept = default;
Gesture& Gesture::operator=(const Gesture& rhs) = default;
-Gesture& Gesture::operator=(Gesture&& rhs) = default;
+Gesture& Gesture::operator=(Gesture&& rhs)noexcept = default;
Gesture::~Gesture() = default;
* @SINCE_1_9.28
* @param[in] rhs A reference to the handle to move
*/
- Gesture(Gesture&& rhs);
+ Gesture(Gesture&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the handle to move
* @return A reference to this
*/
- Gesture& operator=(Gesture&& rhs);
+ Gesture& operator=(Gesture&& rhs) noexcept;
/**
* @brief Non virtual destructor.
HoverEvent::HoverEvent(const HoverEvent& rhs) = default;
-HoverEvent::HoverEvent(HoverEvent&& rhs) = default;
+HoverEvent::HoverEvent(HoverEvent&& rhs) noexcept = default;
HoverEvent::~HoverEvent() = default;
HoverEvent& HoverEvent::operator=(const HoverEvent& rhs) = default;
-HoverEvent& HoverEvent::operator=(HoverEvent&& rhs) = default;
+HoverEvent& HoverEvent::operator=(HoverEvent&& rhs) noexcept = default;
unsigned long HoverEvent::GetTime() const
{
* @SINCE_1_9.25
* @param[in] rhs A reference to the moved HoverEvent
*/
- HoverEvent(HoverEvent&& rhs);
+ HoverEvent(HoverEvent&& rhs) noexcept;
/**
* @brief Destructor.
* @param[in] rhs A reference to the moved HoverEvent
* @return A reference to this
*/
- HoverEvent& operator=(HoverEvent&& rhs);
+ HoverEvent& operator=(HoverEvent&& rhs) noexcept;
// Getters
KeyEvent::KeyEvent(const KeyEvent& rhs) = default;
-KeyEvent::KeyEvent(KeyEvent&& rhs) = default;
+KeyEvent::KeyEvent(KeyEvent&& rhs) noexcept = default;
KeyEvent::~KeyEvent() = default;
KeyEvent& KeyEvent::operator=(const KeyEvent& rhs) = default;
-KeyEvent& KeyEvent::operator=(KeyEvent&& rhs) = default;
+KeyEvent& KeyEvent::operator=(KeyEvent&& rhs) noexcept = default;
bool KeyEvent::IsShiftModifier() const
{
* @SINCE_1_9.27
* @param[in] rhs A reference to the moved handle
*/
- KeyEvent(KeyEvent&& rhs);
+ KeyEvent(KeyEvent&& rhs) noexcept;
/**
* @brief Copy assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- KeyEvent& operator=(KeyEvent&& rhs);
+ KeyEvent& operator=(KeyEvent&& rhs) noexcept;
/**
* @brief Destructor.
LongPressGestureDetector& LongPressGestureDetector::operator=(const LongPressGestureDetector& rhs) = default;
-LongPressGestureDetector::LongPressGestureDetector(LongPressGestureDetector&& handle) = default;
+LongPressGestureDetector::LongPressGestureDetector(LongPressGestureDetector&& handle) noexcept = default;
-LongPressGestureDetector& LongPressGestureDetector::operator=(LongPressGestureDetector&& rhs) = default;
+LongPressGestureDetector& LongPressGestureDetector::operator=(LongPressGestureDetector&& rhs) noexcept = default;
void LongPressGestureDetector::SetTouchesRequired(uint32_t touches)
{
* @SINCE_2_2.4
* @param[in] handle A reference to the moved handle
*/
- LongPressGestureDetector(LongPressGestureDetector&& handle);
+ LongPressGestureDetector(LongPressGestureDetector&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- LongPressGestureDetector& operator=(LongPressGestureDetector&& rhs);
+ LongPressGestureDetector& operator=(LongPressGestureDetector&& rhs) noexcept;
public: // Setters
/**
LongPressGesture::LongPressGesture(const LongPressGesture& rhs) = default;
-LongPressGesture::LongPressGesture(LongPressGesture&& rhs) = default;
+LongPressGesture::LongPressGesture(LongPressGesture&& rhs) noexcept = default;
LongPressGesture& LongPressGesture::operator=(const LongPressGesture& rhs) = default;
-LongPressGesture& LongPressGesture::operator=(LongPressGesture&& rhs) = default;
+LongPressGesture& LongPressGesture::operator=(LongPressGesture&& rhs) noexcept = default;
LongPressGesture::~LongPressGesture() = default;
* @SINCE_1_9.28
* @param[in] rhs A reference to the handle to move
*/
- LongPressGesture(LongPressGesture&& rhs);
+ LongPressGesture(LongPressGesture&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- LongPressGesture& operator=(LongPressGesture&& rhs);
+ LongPressGesture& operator=(LongPressGesture&& rhs) noexcept;
/**
* @brief Non virtual destructor.
PanGestureDetector& PanGestureDetector::operator=(const PanGestureDetector& rhs) = default;
-PanGestureDetector::PanGestureDetector(PanGestureDetector&& handle) = default;
+PanGestureDetector::PanGestureDetector(PanGestureDetector&& handle) noexcept = default;
-PanGestureDetector& PanGestureDetector::operator=(PanGestureDetector&& rhs) = default;
+PanGestureDetector& PanGestureDetector::operator=(PanGestureDetector&& rhs) noexcept = default;
void PanGestureDetector::SetMinimumTouchesRequired(uint32_t minimum)
{
* @SINCE_2_2.4
* @param[in] handle A reference to the moved handle
*/
- PanGestureDetector(PanGestureDetector&& handle);
+ PanGestureDetector(PanGestureDetector&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- PanGestureDetector& operator=(PanGestureDetector&& rhs);
+ PanGestureDetector& operator=(PanGestureDetector&& rhs) noexcept;
public: // Setters
/**
PanGesture::PanGesture(const PanGesture& rhs) = default;
-PanGesture::PanGesture(PanGesture&& rhs) = default;
+PanGesture::PanGesture(PanGesture&& rhs) noexcept = default;
PanGesture& PanGesture::operator=(const PanGesture& rhs) = default;
-PanGesture& PanGesture::operator=(PanGesture&& rhs) = default;
+PanGesture& PanGesture::operator=(PanGesture&& rhs) noexcept = default;
PanGesture::~PanGesture() = default;
* @SINCE_1_9.28
* @param[in] rhs A reference to the moved handle
*/
- PanGesture(PanGesture&& rhs);
+ PanGesture(PanGesture&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- PanGesture& operator=(PanGesture&& rhs);
+ PanGesture& operator=(PanGesture&& rhs) noexcept;
/**
* @brief Non virtual destructor.
PinchGestureDetector& PinchGestureDetector::operator=(const PinchGestureDetector& rhs) = default;
-PinchGestureDetector::PinchGestureDetector(PinchGestureDetector&& handle) = default;
+PinchGestureDetector::PinchGestureDetector(PinchGestureDetector&& handle) noexcept = default;
-PinchGestureDetector& PinchGestureDetector::operator=(PinchGestureDetector&& rhs) = default;
+PinchGestureDetector& PinchGestureDetector::operator=(PinchGestureDetector&& rhs) noexcept = default;
PinchGestureDetector::DetectedSignalType& PinchGestureDetector::DetectedSignal()
{
* @SINCE_2_2.4
* @param[in] handle A reference to the moved handle
*/
- PinchGestureDetector(PinchGestureDetector&& handle);
+ PinchGestureDetector(PinchGestureDetector&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- PinchGestureDetector& operator=(PinchGestureDetector&& rhs);
+ PinchGestureDetector& operator=(PinchGestureDetector&& rhs) noexcept;
public: // Signals
/**
PinchGesture::PinchGesture(const PinchGesture& rhs) = default;
-PinchGesture::PinchGesture(PinchGesture&& rhs) = default;
+PinchGesture::PinchGesture(PinchGesture&& rhs) noexcept = default;
PinchGesture& PinchGesture::operator=(const PinchGesture& rhs) = default;
-PinchGesture& PinchGesture::operator=(PinchGesture&& rhs) = default;
+PinchGesture& PinchGesture::operator=(PinchGesture&& rhs) noexcept = default;
PinchGesture::~PinchGesture() = default;
* @SINCE_1_9.28
* @param[in] rhs A reference to the moved handle
*/
- PinchGesture(PinchGesture&& rhs);
+ PinchGesture(PinchGesture&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- PinchGesture& operator=(PinchGesture&& rhs);
+ PinchGesture& operator=(PinchGesture&& rhs) noexcept;
/**
* @brief Non virtual destructor.
RotationGestureDetector& RotationGestureDetector::operator=(const RotationGestureDetector& rhs) = default;
-RotationGestureDetector::RotationGestureDetector(RotationGestureDetector&& handle) = default;
+RotationGestureDetector::RotationGestureDetector(RotationGestureDetector&& handle) noexcept = default;
-RotationGestureDetector& RotationGestureDetector::operator=(RotationGestureDetector&& rhs) = default;
+RotationGestureDetector& RotationGestureDetector::operator=(RotationGestureDetector&& rhs) noexcept = default;
RotationGestureDetector::DetectedSignalType& RotationGestureDetector::DetectedSignal()
{
* @SINCE_2_2.4
* @param[in] handle A reference to the moved handle
*/
- RotationGestureDetector(RotationGestureDetector&& handle);
+ RotationGestureDetector(RotationGestureDetector&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- RotationGestureDetector& operator=(RotationGestureDetector&& rhs);
+ RotationGestureDetector& operator=(RotationGestureDetector&& rhs) noexcept;
public: // Signals
/**
RotationGesture::RotationGesture(const RotationGesture& rhs) = default;
-RotationGesture::RotationGesture(RotationGesture&& rhs) = default;
+RotationGesture::RotationGesture(RotationGesture&& rhs) noexcept = default;
RotationGesture& RotationGesture::operator=(const RotationGesture& rhs) = default;
-RotationGesture& RotationGesture::operator=(RotationGesture&& rhs) = default;
+RotationGesture& RotationGesture::operator=(RotationGesture&& rhs) noexcept = default;
RotationGesture::~RotationGesture() = default;
* @SINCE_1_9.28
* @param[in] rhs A reference to the moved handle
*/
- RotationGesture(RotationGesture&& rhs);
+ RotationGesture(RotationGesture&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- RotationGesture& operator=(RotationGesture&& rhs);
+ RotationGesture& operator=(RotationGesture&& rhs) noexcept;
/**
* @brief Non virtual destructor.
TapGestureDetector& TapGestureDetector::operator=(const TapGestureDetector& rhs) = default;
-TapGestureDetector::TapGestureDetector(TapGestureDetector&& handle) = default;
+TapGestureDetector::TapGestureDetector(TapGestureDetector&& handle) noexcept = default;
-TapGestureDetector& TapGestureDetector::operator=(TapGestureDetector&& rhs) = default;
+TapGestureDetector& TapGestureDetector::operator=(TapGestureDetector&& rhs) noexcept = default;
void TapGestureDetector::SetMinimumTapsRequired(uint32_t taps)
{
* @SINCE_2_2.4
* @param[in] handle A reference to the moved handle
*/
- TapGestureDetector(TapGestureDetector&& handle);
+ TapGestureDetector(TapGestureDetector&& handle) noexcept;
/**
* @brief This move assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- TapGestureDetector& operator=(TapGestureDetector&& rhs);
+ TapGestureDetector& operator=(TapGestureDetector&& rhs) noexcept;
public: // Setters
/**
TapGesture::TapGesture(const TapGesture& rhs) = default;
-TapGesture::TapGesture(TapGesture&& rhs) = default;
+TapGesture::TapGesture(TapGesture&& rhs) noexcept = default;
TapGesture& TapGesture::operator=(const TapGesture& rhs) = default;
-TapGesture& TapGesture::operator=(TapGesture&& rhs) = default;
+TapGesture& TapGesture::operator=(TapGesture&& rhs) noexcept = default;
TapGesture::~TapGesture() = default;
* @SINCE_1_9.28
* @param rhs The handle to move.
*/
- TapGesture(TapGesture&& rhs);
+ TapGesture(TapGesture&& rhs) noexcept;
/**
* @brief Assignment operator.
* @SINCE_1_9.28
* @param rhs The handle to move.
*/
- TapGesture& operator=(TapGesture&& rhs);
+ TapGesture& operator=(TapGesture&& rhs) noexcept;
/**
* @brief Non virtual destructor.
TouchEvent::TouchEvent(const TouchEvent& other) = default;
-TouchEvent::TouchEvent(TouchEvent&& other) = default;
+TouchEvent::TouchEvent(TouchEvent&& other) noexcept = default;
TouchEvent::~TouchEvent() = default;
TouchEvent& TouchEvent::operator=(const TouchEvent& other) = default;
-TouchEvent& TouchEvent::operator=(TouchEvent&& other) = default;
+TouchEvent& TouchEvent::operator=(TouchEvent&& other) noexcept = default;
unsigned long TouchEvent::GetTime() const
{
* @SINCE_1_9.28
* @param[in] other The TouchEvent to move
*/
- TouchEvent(TouchEvent&& other);
+ TouchEvent(TouchEvent&& other) noexcept;
/**
* @brief Destructor.
* @param[in] other The TouchEvent to move
* @return A reference to this
*/
- TouchEvent& operator=(TouchEvent&& other);
+ TouchEvent& operator=(TouchEvent&& other) noexcept;
// Getters
WheelEvent::WheelEvent(const WheelEvent& rhs) = default;
-WheelEvent::WheelEvent(WheelEvent&& rhs) = default;
+WheelEvent::WheelEvent(WheelEvent&& rhs) noexcept = default;
WheelEvent::~WheelEvent() = default;
WheelEvent& WheelEvent::operator=(const WheelEvent& rhs) = default;
-WheelEvent& WheelEvent::operator=(WheelEvent&& rhs) = default;
+WheelEvent& WheelEvent::operator=(WheelEvent&& rhs) noexcept = default;
bool WheelEvent::IsShiftModifier() const
{
* @SINCE_1_9.26
* @param[in] rhs A reference to the moved WheelEvent
*/
- WheelEvent(WheelEvent&& rhs);
+ WheelEvent(WheelEvent&& rhs) noexcept;
/**
* @brief Destructor.
* @param[in] rhs A reference to the moved WheelEvent
* @return A reference to this
*/
- WheelEvent& operator=(WheelEvent&& rhs);
+ WheelEvent& operator=(WheelEvent&& rhs) noexcept;
/**
* @brief Checks to see if Shift key modifier has been supplied.
PixelData& PixelData::operator=(const PixelData& rhs) = default;
-PixelData::PixelData(PixelData&& rhs) = default;
+PixelData::PixelData(PixelData&& rhs) noexcept = default;
-PixelData& PixelData::operator=(PixelData&& rhs) = default;
+PixelData& PixelData::operator=(PixelData&& rhs) noexcept = default;
uint32_t PixelData::GetWidth() const
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- PixelData(PixelData&& rhs);
+ PixelData(PixelData&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- PixelData& operator=(PixelData&& rhs);
+ PixelData& operator=(PixelData&& rhs) noexcept;
/**
* @brief Gets the width of the buffer in pixels.
public:
AngleAxis(const AngleAxis&) = default; ///< Default copy constructor
- AngleAxis(AngleAxis&&) = default; ///< Default move constructor
+ AngleAxis(AngleAxis&&) noexcept = default; ///< Default move constructor
AngleAxis& operator=(const AngleAxis&) = default; ///< Default copy assignment operator
- AngleAxis& operator=(AngleAxis&&) = default; ///< Default move assignment operator
+ AngleAxis& operator=(AngleAxis&&) noexcept = default; ///< Default move assignment operator
public:
Radian angle; ///< The angle in radians
/*
- * 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.
SetTranslation(inverseTranslation);
}
+Vector3 Matrix::GetScale() const
+{
+ // Derive scale from axis lengths.
+ return Vector3(GetXAxis().Length(), GetYAxis().Length(), GetZAxis().Length());
+}
+
void Matrix::GetTransformComponents(Vector3& position,
Quaternion& rotation,
Vector3& scale) const
{
position = GetTranslation3();
+ scale = GetScale();
- // Derive scale from axis lengths.
- Vector3 theScale(GetXAxis().Length(), GetYAxis().Length(), GetZAxis().Length());
- scale = theScale;
-
- if(!(fabs(theScale.x - Vector3::ONE.x) < ROTATION_EPSILON &&
- fabs(theScale.y - Vector3::ONE.y) < ROTATION_EPSILON &&
- fabs(theScale.z - Vector3::ONE.z) < ROTATION_EPSILON))
+ if(!(fabs(scale.x - Vector3::ONE.x) < ROTATION_EPSILON &&
+ fabs(scale.y - Vector3::ONE.y) < ROTATION_EPSILON &&
+ fabs(scale.z - Vector3::ONE.z) < ROTATION_EPSILON))
{
MATH_INCREASE_COUNTER(PerformanceMonitor::MATRIX_MULTIPLYS);
MATH_INCREASE_BY(PerformanceMonitor::FLOAT_POINT_MULTIPLY, 9);
// Non-identity scale is embedded into rotation matrix. Remove it first:
Matrix m(*this);
- Vector3 inverseScale(1.0f / theScale.x, 1.0f / theScale.y, 1.0f / theScale.z);
+ Vector3 inverseScale(1.0f / scale.x, 1.0f / scale.y, 1.0f / scale.z);
m.mMatrix[0] *= inverseScale.x;
m.mMatrix[1] *= inverseScale.x;
m.mMatrix[2] *= inverseScale.x;
#define DALI_MATRIX_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.
}
/**
+ * @brief Gets the x,y and z components of the scale as a Vector3.
+ * Note that transform scale always has positive components.
+ *
+ * This assumes the matrix is a transform matrix.
+ * @SINCE_2_2.17
+ * @return The scale
+ */
+ Vector3 GetScale() const;
+
+ /**
* @brief Sets the translation.
*
* This assumes the matrix is a transform matrix.
Handle& Handle::operator=(const Handle& rhs) = default;
-Handle::Handle(Handle&& rhs) = default;
+Handle::Handle(Handle&& rhs) noexcept = default;
-Handle& Handle::operator=(Handle&& rhs) = default;
+Handle& Handle::operator=(Handle&& rhs) noexcept = default;
Handle Handle::DownCast(BaseHandle handle)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Handle(Handle&& rhs);
+ Handle(Handle&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Handle& operator=(Handle&& rhs);
+ Handle& operator=(Handle&& rhs) noexcept;
/**
* @brief Downcasts to a handle.
ObjectRegistry& ObjectRegistry::operator=(const ObjectRegistry& rhs) = default;
-ObjectRegistry::ObjectRegistry(ObjectRegistry&& rhs) = default;
+ObjectRegistry::ObjectRegistry(ObjectRegistry&& rhs) noexcept = default;
-ObjectRegistry& ObjectRegistry::operator=(ObjectRegistry&& rhs) = default;
+ObjectRegistry& ObjectRegistry::operator=(ObjectRegistry&& rhs) noexcept = default;
ObjectRegistry::ObjectCreatedSignalType& ObjectRegistry::ObjectCreatedSignal()
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- ObjectRegistry(ObjectRegistry&& rhs);
+ ObjectRegistry(ObjectRegistry&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- ObjectRegistry& operator=(ObjectRegistry&& rhs);
+ ObjectRegistry& operator=(ObjectRegistry&& rhs) noexcept;
public: // Signals
/**
PropertyCondition& PropertyCondition::operator=(const PropertyCondition& rhs) = default;
-PropertyCondition::PropertyCondition(PropertyCondition&& rhs) = default;
+PropertyCondition::PropertyCondition(PropertyCondition&& rhs) noexcept = default;
-PropertyCondition& PropertyCondition::operator=(PropertyCondition&& rhs) = default;
+PropertyCondition& PropertyCondition::operator=(PropertyCondition&& rhs) noexcept = default;
std::size_t PropertyCondition::GetArgumentCount() const
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- PropertyCondition(PropertyCondition&& rhs);
+ PropertyCondition(PropertyCondition&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- PropertyCondition& operator=(PropertyCondition&& rhs);
+ PropertyCondition& operator=(PropertyCondition&& rhs) noexcept;
public:
/**
PropertyNotification& PropertyNotification::operator=(const PropertyNotification& rhs) = default;
-PropertyNotification::PropertyNotification(PropertyNotification&& rhs) = default;
+PropertyNotification::PropertyNotification(PropertyNotification&& rhs) noexcept = default;
-PropertyNotification& PropertyNotification::operator=(PropertyNotification&& rhs) = default;
+PropertyNotification& PropertyNotification::operator=(PropertyNotification&& rhs) noexcept = default;
PropertyCondition PropertyNotification::GetCondition()
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- PropertyNotification(PropertyNotification&& rhs);
+ PropertyNotification(PropertyNotification&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- PropertyNotification& operator=(PropertyNotification&& rhs);
+ PropertyNotification& operator=(PropertyNotification&& rhs) noexcept;
/**
* @brief Gets the condition of this notification.
TypeInfo& TypeInfo::operator=(const TypeInfo& rhs) = default;
-TypeInfo::TypeInfo(TypeInfo&& rhs) = default;
+TypeInfo::TypeInfo(TypeInfo&& rhs) noexcept = default;
-TypeInfo& TypeInfo::operator=(TypeInfo&& rhs) = default;
+TypeInfo& TypeInfo::operator=(TypeInfo&& rhs) noexcept = default;
const std::string& TypeInfo::GetName() const
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- TypeInfo(TypeInfo&& rhs);
+ TypeInfo(TypeInfo&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- TypeInfo& operator=(TypeInfo&& rhs);
+ TypeInfo& operator=(TypeInfo&& rhs) noexcept;
/**
* @brief Retrieves the type name for this type.
TypeRegistry& TypeRegistry::operator=(const TypeRegistry& rhs) = default;
-TypeRegistry::TypeRegistry(TypeRegistry&& rhs) = default;
+TypeRegistry::TypeRegistry(TypeRegistry&& rhs) noexcept = default;
-TypeRegistry& TypeRegistry::operator=(TypeRegistry&& rhs) = default;
+TypeRegistry& TypeRegistry::operator=(TypeRegistry&& rhs) noexcept = default;
TypeRegistry TypeRegistry::Get()
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- TypeRegistry(TypeRegistry&& rhs);
+ TypeRegistry(TypeRegistry&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- TypeRegistry& operator=(TypeRegistry&& rhs);
+ TypeRegistry& operator=(TypeRegistry&& rhs) noexcept;
/**
* @brief Gets TypeInfo for a registered type.
return *this;
}
-WeakHandleBase::WeakHandleBase(WeakHandleBase&& rhs)
+WeakHandleBase::WeakHandleBase(WeakHandleBase&& rhs) noexcept
: mImpl(rhs.mImpl)
{
rhs.mImpl = nullptr;
}
-WeakHandleBase& WeakHandleBase::operator=(WeakHandleBase&& rhs)
+WeakHandleBase& WeakHandleBase::operator=(WeakHandleBase&& rhs) noexcept
{
if(this != &rhs)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- WeakHandleBase(WeakHandleBase&& rhs);
+ WeakHandleBase(WeakHandleBase&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- WeakHandleBase& operator=(WeakHandleBase&& rhs);
+ WeakHandleBase& operator=(WeakHandleBase&& rhs) noexcept;
/**
* @brief Equality operator overload.
RenderTaskList& RenderTaskList::operator=(const RenderTaskList& rhs) = default;
-RenderTaskList::RenderTaskList(RenderTaskList&& rhs) = default;
+RenderTaskList::RenderTaskList(RenderTaskList&& rhs) noexcept = default;
-RenderTaskList& RenderTaskList::operator=(RenderTaskList&& rhs) = default;
+RenderTaskList& RenderTaskList::operator=(RenderTaskList&& rhs) noexcept = default;
RenderTask RenderTaskList::CreateTask()
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- RenderTaskList(RenderTaskList&& rhs);
+ RenderTaskList(RenderTaskList&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- RenderTaskList& operator=(RenderTaskList&& rhs);
+ RenderTaskList& operator=(RenderTaskList&& rhs) noexcept;
/**
* @brief Creates a new RenderTask.
RenderTask& RenderTask::operator=(const RenderTask& rhs) = default;
-RenderTask::RenderTask(RenderTask&& rhs) = default;
+RenderTask::RenderTask(RenderTask&& rhs) noexcept = default;
-RenderTask& RenderTask::operator=(RenderTask&& rhs) = default;
+RenderTask& RenderTask::operator=(RenderTask&& rhs) noexcept = default;
void RenderTask::SetSourceActor(Actor actor)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- RenderTask(RenderTask&& rhs);
+ RenderTask(RenderTask&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- RenderTask& operator=(RenderTask&& rhs);
+ RenderTask& operator=(RenderTask&& rhs) noexcept;
/**
* @brief Sets the actors to be rendered.
DecoratedVisualRenderer& DecoratedVisualRenderer::operator=(const DecoratedVisualRenderer& handle) = default;
-DecoratedVisualRenderer::DecoratedVisualRenderer(DecoratedVisualRenderer&& rhs) = default;
+DecoratedVisualRenderer::DecoratedVisualRenderer(DecoratedVisualRenderer&& rhs) noexcept = default;
-DecoratedVisualRenderer& DecoratedVisualRenderer::operator=(DecoratedVisualRenderer&& rhs) = default;
+DecoratedVisualRenderer& DecoratedVisualRenderer::operator=(DecoratedVisualRenderer&& rhs) noexcept = default;
void DecoratedVisualRenderer::RegisterCornerRadiusUniform()
{
* @SINCE_2_1.21
* @param[in] rhs A reference to the moved handle
*/
- DecoratedVisualRenderer(DecoratedVisualRenderer&& rhs);
+ DecoratedVisualRenderer(DecoratedVisualRenderer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- DecoratedVisualRenderer& operator=(DecoratedVisualRenderer&& rhs);
+ DecoratedVisualRenderer& operator=(DecoratedVisualRenderer&& rhs) noexcept;
public:
/// @cond internal
{
}
-FrameBuffer::FrameBuffer(FrameBuffer&& rhs) = default;
+FrameBuffer::FrameBuffer(FrameBuffer&& rhs) noexcept = default;
-FrameBuffer& FrameBuffer::operator=(FrameBuffer&& rhs) = default;
+FrameBuffer& FrameBuffer::operator=(FrameBuffer&& rhs) noexcept = default;
void FrameBuffer::AttachColorTexture(Texture& texture)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- FrameBuffer(FrameBuffer&& rhs);
+ FrameBuffer(FrameBuffer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- FrameBuffer& operator=(FrameBuffer&& rhs);
+ FrameBuffer& operator=(FrameBuffer&& rhs) noexcept;
/**
* @brief Attach the base LOD of a 2D texture to the framebuffer for color rendering.
Geometry& Geometry::operator=(const Geometry& handle) = default;
-Geometry::Geometry(Geometry&& rhs) = default;
+Geometry::Geometry(Geometry&& rhs) noexcept = default;
-Geometry& Geometry::operator=(Geometry&& rhs) = default;
+Geometry& Geometry::operator=(Geometry&& rhs) noexcept = default;
std::size_t Geometry::AddVertexBuffer(VertexBuffer& vertexBuffer)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Geometry(Geometry&& rhs);
+ Geometry(Geometry&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Geometry& operator=(Geometry&& rhs);
+ Geometry& operator=(Geometry&& rhs) noexcept;
/**
* @brief Adds a VertexBuffer to be used as source of geometry vertices.
Renderer& Renderer::operator=(const Renderer& handle) = default;
-Renderer::Renderer(Renderer&& rhs) = default;
+Renderer::Renderer(Renderer&& rhs) noexcept = default;
-Renderer& Renderer::operator=(Renderer&& rhs) = default;
+Renderer& Renderer::operator=(Renderer&& rhs) noexcept = default;
void Renderer::SetGeometry(Geometry& geometry)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Renderer(Renderer&& rhs);
+ Renderer(Renderer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Renderer& operator=(Renderer&& rhs);
+ Renderer& operator=(Renderer&& rhs) noexcept;
/**
* @brief Sets the geometry to be used by this renderer.
Sampler& Sampler::operator=(const Sampler& handle) = default;
-Sampler::Sampler(Sampler&& rhs) = default;
+Sampler::Sampler(Sampler&& rhs) noexcept = default;
-Sampler& Sampler::operator=(Sampler&& rhs) = default;
+Sampler& Sampler::operator=(Sampler&& rhs) noexcept = default;
void Sampler::SetFilterMode(FilterMode::Type minFilter, FilterMode::Type magFilter)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Sampler(Sampler&& rhs);
+ Sampler(Sampler&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Sampler& operator=(Sampler&& rhs);
+ Sampler& operator=(Sampler&& rhs) noexcept;
/**
* @brief Sets the filter modes for this sampler.
Shader& Shader::operator=(const Shader& handle) = default;
-Shader::Shader(Shader&& rhs) = default;
+Shader::Shader(Shader&& rhs) noexcept = default;
-Shader& Shader::operator=(Shader&& rhs) = default;
+Shader& Shader::operator=(Shader&& rhs) noexcept = default;
Shader::Shader(Internal::Shader* pointer)
: Handle(pointer)
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Shader(Shader&& rhs);
+ Shader(Shader&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this
*/
- Shader& operator=(Shader&& rhs);
+ Shader& operator=(Shader&& rhs) noexcept;
/**
* @brief Get shader preprocessor of shading language version.
TextureSet& TextureSet::operator=(const TextureSet& handle) = default;
-TextureSet::TextureSet(TextureSet&& rhs) = default;
+TextureSet::TextureSet(TextureSet&& rhs) noexcept = default;
-TextureSet& TextureSet::operator=(TextureSet&& rhs) = default;
+TextureSet& TextureSet::operator=(TextureSet&& rhs) noexcept = default;
void TextureSet::SetTexture(size_t index, Texture texture)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- TextureSet(TextureSet&& rhs);
+ TextureSet(TextureSet&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- TextureSet& operator=(TextureSet&& rhs);
+ TextureSet& operator=(TextureSet&& rhs) noexcept;
/**
* @brief Sets the texture at position "index".
Texture& Texture::operator=(const Texture& handle) = default;
-Texture::Texture(Texture&& rhs) = default;
+Texture::Texture(Texture&& rhs) noexcept = default;
-Texture& Texture::operator=(Texture&& rhs) = default;
+Texture& Texture::operator=(Texture&& rhs) noexcept = default;
bool Texture::Upload(PixelData pixelData)
{
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Texture(Texture&& rhs);
+ Texture(Texture&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Texture& operator=(Texture&& rhs);
+ Texture& operator=(Texture&& rhs) noexcept;
/**
* @brief Uploads data to the texture from a PixelData object.
VertexBuffer& VertexBuffer::operator=(const VertexBuffer& handle) = default;
-VertexBuffer::VertexBuffer(VertexBuffer&& rhs) = default;
+VertexBuffer::VertexBuffer(VertexBuffer&& rhs) noexcept = default;
-VertexBuffer& VertexBuffer::operator=(VertexBuffer&& rhs) = default;
+VertexBuffer& VertexBuffer::operator=(VertexBuffer&& rhs) noexcept = default;
void VertexBuffer::SetData(const void* data, std::size_t size)
{
* @SINCE_1_9.27
* @param[in] rhs A reference to the moved handle
*/
- VertexBuffer(VertexBuffer&& rhs);
+ VertexBuffer(VertexBuffer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- VertexBuffer& operator=(VertexBuffer&& rhs);
+ VertexBuffer& operator=(VertexBuffer&& rhs) noexcept;
/**
* @brief Updates the whole buffer information.
VisualRenderer& VisualRenderer::operator=(const VisualRenderer& handle) = default;
-VisualRenderer::VisualRenderer(VisualRenderer&& rhs) = default;
+VisualRenderer::VisualRenderer(VisualRenderer&& rhs) noexcept = default;
-VisualRenderer& VisualRenderer::operator=(VisualRenderer&& rhs) = default;
+VisualRenderer& VisualRenderer::operator=(VisualRenderer&& rhs) noexcept = default;
VisualRenderer::VisualRenderer(Internal::VisualRenderer* pointer)
: Dali::Renderer(pointer)
* @SINCE_2_1.13
* @param[in] rhs A reference to the moved handle
*/
- VisualRenderer(VisualRenderer&& rhs);
+ VisualRenderer(VisualRenderer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- VisualRenderer& operator=(VisualRenderer&& rhs);
+ VisualRenderer& operator=(VisualRenderer&& rhs) noexcept;
public:
/// @cond internal
Name: dali2
Summary: DALi 3D Engine
-Version: 2.2.15
+Version: 2.2.17
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT