result
_EflNode::SetFlushNeeded(void)
{
- if (!__pSurface || !_VisualElementSurfaceImpl::GetInstance(*__pSurface))
+ _EflVisualElementSurfaceImpl* pSurfaceImpl = null;
+ if (!__pSurface)
+ {
+ return E_INVALID_STATE;
+ }
+ pSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*__pSurface));
+ if (!pSurfaceImpl)
{
return E_INVALID_STATE;
}
int imageWidth = 0;
int imageHeight = 0;
- evas_object_image_size_get(pImageObject, &imageWidth, &imageHeight);
- evas_object_image_data_update_add(pImageObject, 0, 0, imageWidth, imageHeight);
+ if (pSurfaceImpl->__isImageObject)
+ {
+ evas_object_image_size_get(pImageObject, &imageWidth, &imageHeight);
+ evas_object_image_data_update_add(pImageObject, 0, 0, imageWidth, imageHeight);
+ }
}
if(__pLayer)
invalidatedNativeProps &= nativeProps;
+
+ _EflVisualElementSurfaceImpl* pSurfaceImpl = null;
+
if (likely(pSurface) && likely(_VisualElementSurfaceImpl::GetInstance(*pSurface)))
{
pImageObjectNew = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*pSurface)->GetNativeHandle());
+ pSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pSurface));
}
if (likely(__pSharedSurface) && likely(_VisualElementSurfaceImpl::GetInstance(*__pSharedSurface)))
{
bool createNewObject = true;
- evas_object_image_size_get(pImageObjectNew, &imageWidth, &imageHeight);
-
if (likely(__pSurface))
{
// if the surfaces are same, change the size
evas_object_hide(pImageObject);
}
-
- _EflVisualElementSurfaceImpl* pEflVisualElementSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pSurface));
- if (pEflVisualElementSurfaceImpl && pEflVisualElementSurfaceImpl->__pBuffer != null)
+ if (pSurfaceImpl && pSurfaceImpl->__pBuffer != null)
{
evas_object_image_source_set(pImageObject, pImageObjectNew);
#if 0 // needed if evas_object_show() has not been called in ctor of _EflVisualElementSurfaceImpl
if (likely(contentBoundsAdjusted.width > 0) && likely(contentBoundsAdjusted.height > 0))
{
- evas_object_image_fill_set(
- pImageObjectNew,
- contentBoundsAdjusted.x,
- contentBoundsAdjusted.y,
- contentBoundsAdjusted.width,
- contentBoundsAdjusted.height
- );
+
+ if (pSurfaceImpl && pSurfaceImpl->__isImageObject)
+ {
+ evas_object_image_fill_set(
+ pImageObjectNew,
+ contentBoundsAdjusted.x,
+ contentBoundsAdjusted.y,
+ contentBoundsAdjusted.width,
+ contentBoundsAdjusted.height
+ );
+ }
needDefaultFillSet = false;
}
if (likely(needDefaultFillSet))
{
- evas_object_image_fill_set(pImageObjectNew, 0, 0, newW, newH);
+ if (pSurfaceImpl && pSurfaceImpl->__isImageObject)
+ {
+ evas_object_image_fill_set(pImageObjectNew, 0, 0, newW, newH);
+ }
}
}
, __pEvasImage(null)
, __pBuffer(null)
, __fromOutside(false)
+ , __isImageObject(true)
{
ClearLastResult();
, __pEvasImage(null)
, __pBuffer(null)
, __fromOutside(true)
+ , __isImageObject(true)
{
ClearLastResult();
}
SysTryReturnVoidResult(NID_UI_ANIM, __pEvasImage, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to create a new surface.");
+ // type check
+ const char* pType = evas_object_type_get(__pEvasImage);
+ if (strcmp("image", pType))
+ {
+ __isImageObject = false;
+ }
+
#if 1 // Todo : Temporary code(regarding the visibility of evas source object)
evas_object_show(__pEvasImage);
evas_object_move(__pEvasImage, -999999, -999999);