[Tizen] Change Property name USE_FIXED_CACHE to ENABLE_FRAME_CACHE 44/308044/1
authorsunghyun kim <scholb.kim@samsung.com>
Fri, 12 Jan 2024 05:21:31 +0000 (14:21 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 15 Mar 2024 10:21:41 +0000 (19:21 +0900)
existing name is ambiguous in meaning, so we change it to a more clear name.

Change-Id: I8a797dee0378ffbc6ab2547f63d9360f8a2da2b5

automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
dali-toolkit/devel-api/visuals/image-visual-properties-devel.h
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h
dali-toolkit/internal/visuals/visual-string-constants.cpp
dali-toolkit/internal/visuals/visual-string-constants.h

index 775c5fa..8136955 100644 (file)
@@ -390,7 +390,7 @@ int UtcDaliAnimatedVectorImageVisualGetPropertyMap01(void)
   value = resultMap.Find(DevelImageVisual::Property::MARKER_INFO, Property::MAP);
   DALI_TEST_CHECK(value);
 
-  value = resultMap.Find(DevelImageVisual::Property::USE_FIXED_CACHE, Property::BOOLEAN);
+  value = resultMap.Find(DevelImageVisual::Property::ENABLE_FRAME_CACHE, Property::BOOLEAN);
   DALI_TEST_CHECK(value);
   DALI_TEST_CHECK(value->Get<bool>() == false); // Check default value
 
@@ -1107,7 +1107,7 @@ int UtcDaliAnimatedVectorImageVisualUsedFixedCache(void)
   Property::Map propertyMap;
   propertyMap.Add(Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE)
     .Add(ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME)
-    .Add(DevelImageVisual::Property::USE_FIXED_CACHE, true)
+    .Add(DevelImageVisual::Property::ENABLE_FRAME_CACHE, true)
     .Add(ImageVisual::Property::SYNCHRONOUS_LOADING, false);
 
   Visual::Base visual = VisualFactory::Get().CreateVisual(propertyMap);
@@ -1140,7 +1140,7 @@ int UtcDaliAnimatedVectorImageVisualUsedFixedCache(void)
   DALI_TEST_CHECK(renderer);
 
   Property::Map    map   = actor.GetProperty<Property::Map>(DummyControl::Property::TEST_VISUAL);
-  Property::Value* value = map.Find(DevelImageVisual::Property::USE_FIXED_CACHE);
+  Property::Value* value = map.Find(DevelImageVisual::Property::ENABLE_FRAME_CACHE);
   DALI_TEST_CHECK(value->Get<bool>() == true);
 
   END_TEST;
@@ -1154,7 +1154,7 @@ int UtcDaliAnimatedVectorImageVisualUsedFixedCacheFailed(void)
   Property::Map propertyMap;
   propertyMap.Add(Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE)
     .Add(ImageVisual::Property::URL, TEST_VECTOR_IMAGE_INVALID_FILE_NAME)
-    .Add(DevelImageVisual::Property::USE_FIXED_CACHE, true)
+    .Add(DevelImageVisual::Property::ENABLE_FRAME_CACHE, true)
     .Add(ImageVisual::Property::SYNCHRONOUS_LOADING, false);
 
   Visual::Base visual = VisualFactory::Get().CreateVisual(propertyMap);
@@ -1180,14 +1180,14 @@ int UtcDaliAnimatedVectorImageVisualUsedFixedCacheFailed(void)
   DALI_TEST_CHECK(renderer);
 
   propertyMap.Clear();
-  propertyMap.Add(DevelImageVisual::Property::USE_FIXED_CACHE, true)
+  propertyMap.Add(DevelImageVisual::Property::ENABLE_FRAME_CACHE, true)
     .Add(ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME)
     .Add(ImageVisual::Property::DESIRED_WIDTH, 100)
     .Add(ImageVisual::Property::DESIRED_HEIGHT, 100);
   DevelControl::DoAction(actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelVisual::Action::UPDATE_PROPERTY, propertyMap);
 
   Property::Map    map   = actor.GetProperty<Property::Map>(DummyControl::Property::TEST_VISUAL);
-  Property::Value* value = map.Find(DevelImageVisual::Property::USE_FIXED_CACHE);
+  Property::Value* value = map.Find(DevelImageVisual::Property::ENABLE_FRAME_CACHE);
   DALI_TEST_CHECK(value->Get<bool>() == true);
 
   END_TEST;
index 473ec7c..a5e135c 100644 (file)
@@ -193,13 +193,13 @@ enum Type
 
   /**
    * @brief Whether to AnimatedVectorImageVisual fixed cache or not.
-   * @details Name "useFixedCache", type Property::BOOLEAN.
-   * If this property is true, AnimatedVectorImageVisual uses fixed cache for loading and keeps loaded frame
+   * @details Name "EnableFrameCache", type Property::BOOLEAN.
+   * If this property is true, AnimatedVectorImageVisual enable frame cache for loading and keeps loaded frame
    * until the visual is removed. It reduces CPU cost when the animated image will be looping.
    * But it can spend a lot of memory if the resource has high resolution image or many frame count.
    * @note It is used in the AnimatedImageVisual. The default is false
    */
-  USE_FIXED_CACHE = ORIENTATION_CORRECTION + 16
+  ENABLE_FRAME_CACHE = ORIENTATION_CORRECTION + 16
 };
 
 } //namespace Property
index e932b1b..f0474c5 100644 (file)
@@ -101,7 +101,7 @@ AnimatedVectorImageVisual::AnimatedVectorImageVisual(VisualFactoryCache& factory
   mRendererAdded(false),
   mCoreShutdown(false),
   mRedrawInScalingDown(true),
-  mUseFixedCache(false)
+  mEnableFrameCache(false)
 {
   // the rasterized image is with pre-multiplied alpha format
   mImpl->mFlags |= Visual::Base::Impl::IS_PREMULTIPLIED_ALPHA;
@@ -218,7 +218,7 @@ void AnimatedVectorImageVisual::DoCreatePropertyMap(Property::Map& map) const
   map.Insert(Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, IsSynchronousLoadingRequired());
   map.Insert(Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth());
   map.Insert(Toolkit::ImageVisual::Property::DESIRED_HEIGHT, mDesiredSize.GetHeight());
-  map.Insert(Toolkit::DevelImageVisual::Property::USE_FIXED_CACHE, mUseFixedCache);
+  map.Insert(Toolkit::DevelImageVisual::Property::ENABLE_FRAME_CACHE, mEnableFrameCache);
 }
 
 void AnimatedVectorImageVisual::DoCreateInstancePropertyMap(Property::Map& map) const
@@ -279,9 +279,9 @@ void AnimatedVectorImageVisual::DoSetProperties(const Property::Map& propertyMap
       {
         DoSetProperty(Toolkit::ImageVisual::Property::DESIRED_HEIGHT, keyValue.second);
       }
-      else if(keyValue.first == USE_FIXED_CACHE)
+      else if(keyValue.first == ENABLE_FRAME_CACHE)
       {
-        DoSetProperty(Toolkit::DevelImageVisual::Property::USE_FIXED_CACHE, keyValue.second);
+        DoSetProperty(Toolkit::DevelImageVisual::Property::ENABLE_FRAME_CACHE, keyValue.second);
       }
     }
   }
@@ -389,15 +389,15 @@ void AnimatedVectorImageVisual::DoSetProperty(Property::Index index, const Prope
       break;
     }
 
-    case Toolkit::DevelImageVisual::Property::USE_FIXED_CACHE:
+    case Toolkit::DevelImageVisual::Property::ENABLE_FRAME_CACHE:
     {
-      bool useFixedCache = false;
-      if(value.Get(useFixedCache))
+      bool enableFrameCache = false;
+      if(value.Get(enableFrameCache))
       {
-        mUseFixedCache = useFixedCache;
+        mEnableFrameCache = enableFrameCache;
         if(mVectorAnimationTask)
         {
-          mVectorAnimationTask->KeepRasterizedBuffer(mUseFixedCache);
+          mVectorAnimationTask->KeepRasterizedBuffer(mEnableFrameCache);
         }
       }
       break;
@@ -423,7 +423,7 @@ void AnimatedVectorImageVisual::OnInitialize(void)
     encodedImageBuffer = textureManager.GetEncodedImageBuffer(mImageUrl.GetUrl());
   }
 
-  mVectorAnimationTask->KeepRasterizedBuffer(mUseFixedCache);
+  mVectorAnimationTask->KeepRasterizedBuffer(mEnableFrameCache);
   mVectorAnimationTask->RequestLoad(mImageUrl, encodedImageBuffer, IsSynchronousLoadingRequired());
 
   auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
index ded8c45..5ebd051 100644 (file)
@@ -253,7 +253,7 @@ private:
   bool                               mRendererAdded;
   bool                               mCoreShutdown;
   bool                               mRedrawInScalingDown;
-  bool                               mUseFixedCache;
+  bool                               mEnableFrameCache;
 };
 
 } // namespace Internal
index 68c08d5..cb67bc7 100644 (file)
@@ -105,7 +105,7 @@ VectorAnimationTask::VectorAnimationTask(VisualFactoryCache& factoryCache)
   mKeepAnimation(false),
   mLayerInfoCached(false),
   mMarkerInfoCached(false),
-  mUseFixedCache(false),
+  mEnableFrameCache(false),
   mSizeUpdated(false)
 {
   mVectorRenderer.UploadCompletedSignal().Connect(this, &VectorAnimationTask::OnUploadCompleted);
@@ -329,7 +329,7 @@ void VectorAnimationTask::SetSize(uint32_t width, uint32_t height)
     mHeight = height;
 
     // If fixedCache is enabled, Call KeepRasterizedBuffer()
-    if(mUseFixedCache)
+    if(mEnableFrameCache)
     {
       if(mTotalFrame > 0 && !mLoadFailed)
       {
@@ -887,7 +887,7 @@ void VectorAnimationTask::OnLoadCompleted()
 {
   if(!mLoadFailed)
   {
-    if(mUseFixedCache && mSizeUpdated)
+    if(mEnableFrameCache && mSizeUpdated)
     {
       mVectorRenderer.KeepRasterizedBuffer();
       mSizeUpdated = false;
index 5209575..ef89500 100644 (file)
@@ -273,14 +273,14 @@ public: // Implementation of AsyncTask
     return "VectorAnimationTask";
   }
 
-  void KeepRasterizedBuffer(bool useFixedCache)
+  void KeepRasterizedBuffer(bool enableFrameCache)
   {
-    mUseFixedCache = useFixedCache;
+    mEnableFrameCache = enableFrameCache;
   }
 
   bool IsKeptRasterizedBuffer()
   {
-    return mUseFixedCache;
+    return mEnableFrameCache;
   }
 
 private:
@@ -420,7 +420,7 @@ private:
   bool                                 mKeepAnimation : 1;
   mutable bool                         mLayerInfoCached : 1;
   mutable bool                         mMarkerInfoCached : 1;
-  bool                                 mUseFixedCache : 1;
+  bool                                 mEnableFrameCache : 1;
   bool                                 mSizeUpdated : 1;
 };
 
index a44fc89..f867a50 100644 (file)
@@ -209,7 +209,7 @@ const char* const MASKING_TYPE_NAME("maskingType");
 const char* const MASK_TEXTURE_RATIO_NAME("maskTextureRatio");
 const char* const FAST_TRACK_UPLOADING_NAME("fastTrackUploading");
 const char* const ENABLE_BROKEN_IMAGE("enableBrokenImage");
-const char* const USE_FIXED_CACHE("useFixedCache");
+const char* const ENABLE_FRAME_CACHE("enableFrameCache");
 
 // Text visual
 const char* const TEXT_PROPERTY("text");
index b584d1b..cc97413 100644 (file)
@@ -113,7 +113,7 @@ extern const char* const MASKING_TYPE_NAME;
 extern const char* const MASK_TEXTURE_RATIO_NAME;
 extern const char* const FAST_TRACK_UPLOADING_NAME;
 extern const char* const ENABLE_BROKEN_IMAGE;
-extern const char* const USE_FIXED_CACHE;
+extern const char* const ENABLE_FRAME_CACHE;
 
 // Text visual
 extern const char* const TEXT_PROPERTY;