From c0d323bef80f762d3eb60b774f8b05db2e7530a7 Mon Sep 17 00:00:00 2001 From: Bongjoo Seo Date: Wed, 12 Jun 2013 18:17:13 +0900 Subject: [PATCH] Prevent to update_add on object to use file_set Change-Id: I40a995c747a5598b4642f80261d91dc50aa574ba Signed-off-by: Bongjoo Seo --- src/ui/FUi_NativeObjectHandler.cpp | 26 ++++++++++++++++++-------- src/ui/animations/FUiAnim_EflNode.cpp | 9 +++++++-- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/ui/FUi_NativeObjectHandler.cpp b/src/ui/FUi_NativeObjectHandler.cpp index b6f48fa..bc6cd50 100644 --- a/src/ui/FUi_NativeObjectHandler.cpp +++ b/src/ui/FUi_NativeObjectHandler.cpp @@ -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; } diff --git a/src/ui/animations/FUiAnim_EflNode.cpp b/src/ui/animations/FUiAnim_EflNode.cpp index 2c093ff..460c86f 100644 --- a/src/ui/animations/FUiAnim_EflNode.cpp +++ b/src/ui/animations/FUiAnim_EflNode.cpp @@ -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); + } } } -- 2.7.4