Revert "[Tizen] Erase observer at TexturManager remove"
authorEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Tue, 30 Aug 2022 06:26:49 +0000 (15:26 +0900)
committerEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Tue, 30 Aug 2022 06:26:49 +0000 (15:26 +0900)
This reverts commit 21150f0eaed8163c98d4514fb676075f7154bf5d.

automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
dali-toolkit/internal/texture-manager/texture-manager-impl.cpp

index 01e0166..7a7bf26 100644 (file)
@@ -82,8 +82,6 @@ const char* TEST_GIF_FILE_NAME = TEST_RESOURCE_DIR "/anim.gif";
 const char* TEST_SVG_FILE_NAME                   = TEST_RESOURCE_DIR "/svg1.svg";
 const char* TEST_ANIMATED_VECTOR_IMAGE_FILE_NAME = TEST_RESOURCE_DIR "/insta_camera.json";
 
-const char* TEST_WEBP_FILE_NAME                  = TEST_RESOURCE_DIR "/dali-logo.webp";
-
 void TestUrl(ImageView imageView, const std::string url)
 {
   Property::Value value = imageView.GetProperty(imageView.GetPropertyIndex("image"));
@@ -3889,24 +3887,3 @@ int UtcDaliImageViewSetImageOnResourceReadySignal05(void)
 
   END_TEST;
 }
-
-int UtcDaliImageViewUseSameUrlWithAnimatedImageVisual(void)
-{
-  tet_infoline("Test multiple views with same image in animated image visual");
-  ToolkitTestApplication application;
-
-  gImageView1 = ImageView::New(TEST_WEBP_FILE_NAME);
-  application.GetScene().Add(gImageView1);
-
-  tet_infoline("Remove imageView and Create new imageView with same url");
-  application.GetScene().Remove(gImageView1);
-  gImageView2 = ImageView::New(TEST_WEBP_FILE_NAME);
-  application.GetScene().Add(gImageView2);
-
-  application.SendNotification();
-  application.Render();
-
-  tet_infoline("Check the ImageView load image successfully");
-  DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
-  END_TEST;
-}
index 8d68a88..e23ee49 100644 (file)
@@ -732,26 +732,6 @@ void TextureManager::Remove(const TextureManager::TextureId& textureId, TextureU
     }
     else
     {
-      // Erase observer
-      if(observer)
-      {
-        TextureCacheIndex textureInfoIndex = mTextureCacheManager.GetCacheIndexFromId(textureId);
-        if(textureInfoIndex != INVALID_CACHE_INDEX)
-        {
-          TextureInfo& textureInfo(mTextureCacheManager[textureInfoIndex]);
-          for(auto it = textureInfo.observerList.Begin(), endIt = textureInfo.observerList.End(); it != endIt; it++)
-          {
-            if((*it) == observer)
-            {
-              // Disconnect and remove the observer.
-              observer->DestructionSignal().Disconnect(this, &TextureManager::ObserverDestroyed);
-              textureInfo.observerList.Erase(it);
-              break;
-            }
-          }
-        }
-      }
-
       // Remove textureId in CacheManager.
       mTextureCacheManager.RemoveCache(textureId);
     }