existing name is ambiguous in meaning, so we change it to a more clear name.
Change-Id: I8a797dee0378ffbc6ab2547f63d9360f8a2da2b5
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
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);
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;
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);
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;
/**
* @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
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;
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
{
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);
}
}
}
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;
encodedImageBuffer = textureManager.GetEncodedImageBuffer(mImageUrl.GetUrl());
}
- mVectorAnimationTask->KeepRasterizedBuffer(mUseFixedCache);
+ mVectorAnimationTask->KeepRasterizedBuffer(mEnableFrameCache);
mVectorAnimationTask->RequestLoad(mImageUrl, encodedImageBuffer, IsSynchronousLoadingRequired());
auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
bool mRendererAdded;
bool mCoreShutdown;
bool mRedrawInScalingDown;
- bool mUseFixedCache;
+ bool mEnableFrameCache;
};
} // namespace Internal
mKeepAnimation(false),
mLayerInfoCached(false),
mMarkerInfoCached(false),
- mUseFixedCache(false),
+ mEnableFrameCache(false),
mSizeUpdated(false)
{
mVectorRenderer.UploadCompletedSignal().Connect(this, &VectorAnimationTask::OnUploadCompleted);
mHeight = height;
// If fixedCache is enabled, Call KeepRasterizedBuffer()
- if(mUseFixedCache)
+ if(mEnableFrameCache)
{
if(mTotalFrame > 0 && !mLoadFailed)
{
{
if(!mLoadFailed)
{
- if(mUseFixedCache && mSizeUpdated)
+ if(mEnableFrameCache && mSizeUpdated)
{
mVectorRenderer.KeepRasterizedBuffer();
mSizeUpdated = false;
return "VectorAnimationTask";
}
- void KeepRasterizedBuffer(bool useFixedCache)
+ void KeepRasterizedBuffer(bool enableFrameCache)
{
- mUseFixedCache = useFixedCache;
+ mEnableFrameCache = enableFrameCache;
}
bool IsKeptRasterizedBuffer()
{
- return mUseFixedCache;
+ return mEnableFrameCache;
}
private:
bool mKeepAnimation : 1;
mutable bool mLayerInfoCached : 1;
mutable bool mMarkerInfoCached : 1;
- bool mUseFixedCache : 1;
+ bool mEnableFrameCache : 1;
bool mSizeUpdated : 1;
};
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");
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;