{
if(__pPresentation)
{
+ _VisualElementImpl* pElement = __pPresentation;
+ while (pElement)
+ {
+ pElement->GetSharedData().childrenSurfaceChanged = true;
+ pElement = pElement->__pParent;
+ }
#ifdef OLD
__pPresentation->InvalidateHierarchyProps(HIERARCHY_PROPERTY_SURFACE, false, false);
#endif
}
else
{
+ _VisualElementImpl* pElement = this;
+ while (pElement)
+ {
+ pElement->GetSharedData().childrenSurfaceChanged = true;
+ pElement = pElement->__pParent;
+ }
#ifdef OLD
InvalidateHierarchyProps(HIERARCHY_PROPERTY_SURFACE, false, false);
#endif
{
FloatMatrix4 currentValue = __pPresentation->__transform;
- const String* subProperties[] = { pVeSubPropTransformRotationX,
+ static const String* subProperties[] = { pVeSubPropTransformRotationX,
pVeSubPropTransformRotationY,
pVeSubPropTransformRotationZ,
pVeSubPropTransformScaleX,
// because 'bounds' is for the VE does not comply with size of surface.
// (in which case the surface will be displayed scaled)
- _VisualElementImpl* pRenderTarget = null;
-
- pRenderTarget = GetRenderTarget();
+ _VisualElementImpl* pRenderTarget = GetRenderTarget();
SysTryReturn(NID_UI_ANIM, pRenderTarget, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Target VisualElement is not available.");
SysTryReturn(NID_UI_ANIM, pRenderTarget->__pSharedData, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Target VisualElement is not constructed.");
const int mask = HIERARCHY_PROPERTY_MASK;
#endif
- if (unlikely((__childrenNeedsUpdateProps & mask) == 0))
+ if (unlikely((__childrenNeedsUpdateProps & mask) == 0 && GetSharedData().childrenSurfaceChanged == false))
return;
// Node will be reconfigured later(before OnDraw, or DrawRectangle, ...)
// WARNING:
// __childrenNeedsUpdateProps should be cleared *ONLY AFTER* flushing native nodes !
__childrenNeedsUpdateProps &= ~mask;
+ GetSharedData().childrenSurfaceChanged = false;
int count = __children.GetCount();
for (int i = 0; i < count; i++)
{
_VisualElementImpl* pChild = __children.GetChildAt(i);
- if (likely((pChild->__childrenNeedsUpdateProps & mask) != 0))
+ if (likely((pChild->__childrenNeedsUpdateProps & mask) != 0 || pChild->GetSharedData().childrenSurfaceChanged == true))
pChild->UpdateHierarchyProps();
}
}
if (needDraw)
{
- Canvas* pCanvas = null;
- pCanvas = GetCanvasN();
+ Canvas* pCanvas = GetCanvasN();
if (pCanvas)
{
- result r = pCanvas->SetClipBounds(Rectangle(drawRectVisible.x,
+ result r = pCanvas->SetClipBounds(FloatRectangle(drawRectVisible.x,
drawRectVisible.y,
drawRectVisible.width,
drawRectVisible.height));
}
else if (scrollSelf)
{
- Canvas* pCanvas = null;
- _CanvasImpl* pCanvasImpl = null;
+ Canvas* pCanvas = GetCanvasN(); // TODO: clip rect......
- pCanvas = GetCanvasN(); // TODO: clip rect......
if (pCanvas)
{
- pCanvasImpl = _CanvasImpl::GetInstance(*pCanvas);
+ _CanvasImpl* pCanvasImpl = _CanvasImpl::GetInstance(*pCanvas);
if (pCanvasImpl)
{
Point pointDest;
point.y = rectDest.y + bounds.y;
//pOutput->FillRectangle(color, Rectangle(drawRect.x + bounds.x, drawRect.y + bounds.y, drawRect.width, drawRect.height));
- pOutput->FillRectangle(color, Rectangle(point.x, point.y, drawRect.width, drawRect.height));
+ pOutput->FillRectangle(color, FloatRectangle(point.x, point.y, drawRect.width, drawRect.height));
}
}