Merge "The system color table is updated to ver 130315" into tizen_2.1
authorKi-Dong Hong <kidong.hong@samsung.com>
Mon, 18 Mar 2013 04:49:19 +0000 (13:49 +0900)
committerGerrit Code Review <gerrit2@kim11>
Mon, 18 Mar 2013 04:49:19 +0000 (13:49 +0900)
src/ui/animations/FUiAnim_VisualElementImpl.cpp
src/ui/animations/FUiAnim_VisualElementSharedData.cpp
src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp
src/ui/inc/FUiAnim_VisualElementSharedData.h

index f223418..ac31831 100644 (file)
@@ -1014,6 +1014,12 @@ _VisualElementImpl::SetSurfaceChanged(void)
        {
                if(__pPresentation)
                {
+                       _VisualElementImpl* pElement = __pPresentation;
+                       while (pElement)
+                       {
+                               pElement->GetSharedData().childrenSurfaceChanged = true;
+                               pElement = pElement->__pParent;
+                       }
 #ifdef OLD
                        __pPresentation->InvalidateHierarchyProps(HIERARCHY_PROPERTY_SURFACE, false, false);
 #endif
@@ -1021,6 +1027,12 @@ _VisualElementImpl::SetSurfaceChanged(void)
        }
        else
        {
+               _VisualElementImpl* pElement = this;
+               while (pElement)
+               {
+                       pElement->GetSharedData().childrenSurfaceChanged = true;
+                       pElement = pElement->__pParent;
+               }
 #ifdef OLD
                InvalidateHierarchyProps(HIERARCHY_PROPERTY_SURFACE, false, false);
 #endif
@@ -2180,7 +2192,7 @@ _VisualElementImpl::SetTransformMatrixI(const FloatMatrix4& xform, bool updateDe
        {
                FloatMatrix4 currentValue = __pPresentation->__transform;
 
-               const String* subProperties[] = {       pVeSubPropTransformRotationX,
+               static const String* subProperties[] = {        pVeSubPropTransformRotationX,
                                                                                        pVeSubPropTransformRotationY,
                                                                                        pVeSubPropTransformRotationZ,
                                                                                        pVeSubPropTransformScaleX,
@@ -3681,9 +3693,7 @@ _VisualElementImpl::GetCanvasN(const FloatRectangle& bounds)
        //      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.");
 
@@ -5276,7 +5286,7 @@ _VisualElementImpl::UpdateHierarchyProps(void)
        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, ...)
@@ -5286,12 +5296,13 @@ _VisualElementImpl::UpdateHierarchyProps(void)
        // 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();
        }
 }
@@ -5819,12 +5830,11 @@ _VisualElementImpl::DrawRectangle(const FloatRectangle& drawRect)
 
        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));
@@ -6078,13 +6088,11 @@ _VisualElementImpl::ScrollByPoint(const FloatPoint& pointOffset, bool scrollSelf
        }
        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;
@@ -6465,7 +6473,7 @@ _VisualElementImpl::CaptureI(Canvas& outputCanvas, const FloatRectangle& rectDes
                        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));
                }
        }
 
index c4d8da8..4cc1cf6 100644 (file)
@@ -41,6 +41,7 @@ namespace Tizen { namespace Ui { namespace Animations
 _VisualElementSharedData::_VisualElementSharedData(void)
        : invalidatedNativeProps(-1)
        , childrenInvalidated(false)
+       , childrenSurfaceChanged(false)
        , surfaceChanged(false)
        , pNativeNode(null)
        , pSurface(null)
index a87dca7..9a8c458 100644 (file)
@@ -936,7 +936,7 @@ _DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo&
        if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false)
        {
                __isFlickEnabled = false;
-               return false;
+               return true;
        }
 
        if (__isFlickInProgress)
@@ -968,6 +968,16 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
                return false;
        }
 
+       if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress && !__isTouchMoved)
+       {
+               __isTouchMoved = false;
+               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
+               __pDateTimeBar->SetVisibleState(false);
+               __pDateTimeBar->Close();
+               ResetFlickAnimationTimer();
+               return true;
+       }
+
        int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition());
        bool isEventFire = true;
 
@@ -985,15 +995,6 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
        __isTouchMoved = false;
        __distance = 0.0f;
 
-       if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress)
-       {
-               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
-               __pDateTimeBar->SetVisibleState(false);
-               __pDateTimeBar->Close();
-               ResetFlickAnimationTimer();
-               return false;
-       }
-
        __pDateTimeBar->Invalidate();
 
        if (isEventFire == true)
@@ -1038,7 +1039,7 @@ _DateTimeBarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to
 
        if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false || __touchMoveHandled == true)
        {
-               return false;
+               return true;
        }
 
        _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
index 8c13d72..6cffb45 100644 (file)
@@ -64,13 +64,14 @@ public:
 
        bool NeedNativeReconfigure(void) const
        {
-               return (invalidatedNativeProps != 0 || surfaceChanged);
+               return (invalidatedNativeProps != 0 || childrenSurfaceChanged);
        }
 
 
 public:
        int invalidatedNativeProps;
        bool childrenInvalidated;
+       bool childrenSurfaceChanged;
        bool surfaceChanged;
        _INativeNode* pNativeNode;
        VisualElementSurface* pSurface;