Prevent to update_add on object to use file_set
authorBongjoo Seo <bongjoo.seo@samsung.com>
Wed, 12 Jun 2013 09:17:13 +0000 (18:17 +0900)
committerBongjoo Seo <bongjoo.seo@samsung.com>
Wed, 12 Jun 2013 09:17:13 +0000 (18:17 +0900)
Change-Id: I40a995c747a5598b4642f80261d91dc50aa574ba
Signed-off-by: Bongjoo Seo <bongjoo.seo@samsung.com>
src/ui/FUi_NativeObjectHandler.cpp
src/ui/animations/FUiAnim_EflNode.cpp

index b6f48fa..bc6cd50 100644 (file)
@@ -119,11 +119,16 @@ STO_SetVisualElementNativeObject(void* pVisualElement, void* pNativeObject)
        _EflNode* pNode = (_EflNode*)pVEImpl->GetNativeNode();
        pNode->AddNativeSmartObject(*pVE, pEO);
 
-       int imageWidth = 0;
-       int imageHeight = 0;
+       const char* pName = null;
+       evas_object_image_file_get(pEO, &pName, null);
+       if (!pName)
+       {
+               int imageWidth = 0;
+               int imageHeight = 0;
 
-       evas_object_image_size_get(pEO, &imageWidth, &imageHeight);
-       evas_object_image_data_update_add(pEO, 0, 0, imageWidth, imageHeight);
+               evas_object_image_size_get(pEO, &imageWidth, &imageHeight);
+               evas_object_image_data_update_add(pEO, 0, 0, imageWidth, imageHeight);
+       }
 }
 
 extern "C" _OSP_EXPORT_
@@ -238,11 +243,16 @@ _NativeObjectHandler::SetNativeObjectToVisualElement(VisualElement* pVisualEleme
        _EflNode* pNode = (_EflNode*)pVEImpl->GetNativeNode();
        pNode->AddNativeSmartObject(*pVisualElement, pNative);
 
-       int imageWidth = 0;
-       int imageHeight = 0;
+       const char* pName = null;
+       evas_object_image_file_get(pNative, &pName, null);
+       if (!pName)
+       {
+               int imageWidth = 0;
+               int imageHeight = 0;
 
-       evas_object_image_size_get(pNative, &imageWidth, &imageHeight);
-       evas_object_image_data_update_add(pNative, 0, 0, imageWidth, imageHeight);
+               evas_object_image_size_get(pNative, &imageWidth, &imageHeight);
+               evas_object_image_data_update_add(pNative, 0, 0, imageWidth, imageHeight);
+       }
        return E_SUCCESS;
 }
 
index 2c093ff..460c86f 100644 (file)
@@ -692,8 +692,13 @@ _EflNode::SetFlushNeeded(void)
 
                if (pSurfaceImpl->__isImageObject)
                {
-                       evas_object_image_size_get(pImageObject, &imageWidth, &imageHeight);
-                       evas_object_image_data_update_add(pImageObject, 0, 0, imageWidth, imageHeight);
+                       const char* pName = null;
+                       evas_object_image_file_get(pImageObject, &pName, null);
+                       if (!pName)
+                       {
+                               evas_object_image_size_get(pImageObject, &imageWidth, &imageHeight);
+                               evas_object_image_data_update_add(pImageObject, 0, 0, imageWidth, imageHeight);
+                       }
                }
        }