Add condition for animation thread
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 3 Dec 2013 05:31:49 +0000 (14:31 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 3 Dec 2013 05:31:49 +0000 (14:31 +0900)
Change-Id: Ia200b5bf9e64646067d273afd57d7dcec4ecab22

src/ui/animations/FUiAnim_AnimationManager.cpp
src/ui/animations/FUiAnim_AnimationManager.h

index 0b47a19..b201b71 100644 (file)
@@ -382,7 +382,7 @@ _AnimationManager::AddAnimation(Tizen::Base::Object& target, _AnimationTargetTyp
        result r = E_SUCCESS;
        bool isInMainThread;
 
-       isInMainThread = IsInMainThread(animation);
+       isInMainThread = IsInMainThread(target, type, animation);
 
        if (__pCurrentTransaction->IsCommitted())               // default transaction
        {
@@ -1082,7 +1082,7 @@ _AnimationManager::EventHandlerNotifyTransactionFinished(_TransactionNode* pNode
 }
 
 bool
-_AnimationManager::IsInMainThread(VisualElementAnimation& animation)
+_AnimationManager::IsInMainThread(Tizen::Base::Object& target, _AnimationTargetType type, VisualElementAnimation& animation)
 {
        VisualElementValueAnimation* pValueAnimation;
 
@@ -1104,6 +1104,18 @@ _AnimationManager::IsInMainThread(VisualElementAnimation& animation)
                }
        }
 
+       if (type == _ANIMATION_TARGET_VE)
+       {
+               VisualElement& targetVE = static_cast< VisualElement& >(target);
+               _VisualElementImpl* pVeImpl = _VisualElementImpl::GetInstance(targetVE);
+
+               if (pVeImpl->GetRoot() == null)
+               {
+                       return true;
+               }
+               // TODO: add condition for EFL
+       }
+
        return false;
 }
 
index d13c9c6..95145de 100644 (file)
@@ -114,7 +114,7 @@ private:
 
        const VisualElementAnimation* GetAnimation(Tizen::Base::Object& target, const Tizen::Base::String& keyName) const;
 
-       bool IsInMainThread(VisualElementAnimation& animation);
+       bool IsInMainThread(Tizen::Base::Object& target, _AnimationTargetType type, VisualElementAnimation& animation);
 
 private:
        static _AnimationManager* __pInstance;