From 386df6932dbcba70a010e386f7256b01ddc68b93 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Thu, 12 Oct 2023 14:22:49 +0900 Subject: [PATCH] Fix node texture draw issue MapView drawing issue In the case of a node without texture set, it is not drawn. If we do not call 'TrimContainers', it works normally. Fix UTC : If an empty texture is set, the number of textures does not change Please refer this patch : Change the TextureSet Count when we set empty texture or sampler Change-Id: If0d9c3abdd8d34d5a90e5dd40c63fe228232e2ac Signed-off-by: huiyu.eun --- automated-tests/src/dali/utc-Dali-TextureSet.cpp | 4 ++-- dali/internal/event/rendering/texture-set-impl.cpp | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-TextureSet.cpp b/automated-tests/src/dali/utc-Dali-TextureSet.cpp index a06ae42..71eb2cb 100644 --- a/automated-tests/src/dali/utc-Dali-TextureSet.cpp +++ b/automated-tests/src/dali/utc-Dali-TextureSet.cpp @@ -471,7 +471,7 @@ int UtcDaliTextureSetRemoveTextureAndGetTextureCount(void) // Set empty texture so we can remove it. textureSet.SetTexture(1u, Texture()); - DALI_TEST_EQUALS(textureSet.GetTextureCount(), 1u, TEST_LOCATION); + DALI_TEST_EQUALS(textureSet.GetTextureCount(), 2u, TEST_LOCATION); DALI_TEST_EQUALS(textureSet.GetTexture(0u), image0, TEST_LOCATION); application.SendNotification(); @@ -505,7 +505,7 @@ int UtcDaliTextureSetRemoveTextureAndGetTextureCount(void) // Set empty texture end of textureset. textureSet.SetTexture(2u, Texture()); - DALI_TEST_EQUALS(textureSet.GetTextureCount(), 1u, TEST_LOCATION); + DALI_TEST_EQUALS(textureSet.GetTextureCount(), 3u, TEST_LOCATION); DALI_TEST_EQUALS(textureSet.GetTexture(0u), image0, TEST_LOCATION); application.SendNotification(); diff --git a/dali/internal/event/rendering/texture-set-impl.cpp b/dali/internal/event/rendering/texture-set-impl.cpp index 61db3dc..a229fe6 100644 --- a/dali/internal/event/rendering/texture-set-impl.cpp +++ b/dali/internal/event/rendering/texture-set-impl.cpp @@ -52,12 +52,6 @@ void TextureSet::SetTexture(uint32_t index, TexturePtr texture) } SceneGraph::SetTextureMessage(mEventThreadServices, *mSceneObject, index, renderTexture); - - if(!texture) - { - // Check wheter we need to pop back textures - TrimContainers(); - } } Texture* TextureSet::GetTexture(uint32_t index) const @@ -92,12 +86,6 @@ void TextureSet::SetSampler(uint32_t index, SamplerPtr sampler) } SceneGraph::SetSamplerMessage(mEventThreadServices, *mSceneObject, index, renderSampler); - - if(!sampler) - { - // Check wheter we need to pop back sampler - TrimContainers(); - } } Sampler* TextureSet::GetSampler(uint32_t index) const -- 2.7.4