From bfa7bee6699072acd1ca49ec78142d34b59c3c67 Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Mon, 1 Oct 2018 14:18:38 +0900 Subject: [PATCH] Revert "[Tizen] Modify codes for Dali Windows backend" This reverts commit c54fda57c75f6407fbbc76771792718eb6d10906. --- .../devel-api/layouting/layout-group-impl.cpp | 4 ++-- dali-toolkit/internal/builder/builder-impl.h | 12 ++++++------ dali-toolkit/internal/builder/builder-signals.cpp | 2 +- .../controls/scrollable/item-view/item-view-impl.h | 2 +- .../scrollable/scroll-view/scroll-view-impl.cpp | 4 ++-- .../internal/layouting/flex-layout-impl.cpp | 4 ++-- .../internal/layouting/linear-layout-impl.cpp | 22 +++++++++++----------- .../internal/layouting/vbox-layout-impl.cpp | 6 +++--- .../visuals/animated-image/animated-image-visual.h | 2 +- .../internal/visuals/texture-manager-impl.h | 6 +++--- dali-toolkit/public-api/dali-toolkit-common.h | 10 ---------- 11 files changed, 32 insertions(+), 42 deletions(-) mode change 100755 => 100644 dali-toolkit/devel-api/layouting/layout-group-impl.cpp mode change 100755 => 100644 dali-toolkit/internal/builder/builder-signals.cpp mode change 100755 => 100644 dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp mode change 100755 => 100644 dali-toolkit/internal/layouting/flex-layout-impl.cpp mode change 100755 => 100644 dali-toolkit/internal/layouting/linear-layout-impl.cpp mode change 100755 => 100644 dali-toolkit/internal/layouting/vbox-layout-impl.cpp mode change 100755 => 100644 dali-toolkit/internal/visuals/animated-image/animated-image-visual.h mode change 100755 => 100644 dali-toolkit/internal/visuals/texture-manager-impl.h diff --git a/dali-toolkit/devel-api/layouting/layout-group-impl.cpp b/dali-toolkit/devel-api/layouting/layout-group-impl.cpp old mode 100755 new mode 100644 index 2ff7ec7..8cdd8bc --- a/dali-toolkit/devel-api/layouting/layout-group-impl.cpp +++ b/dali-toolkit/devel-api/layouting/layout-group-impl.cpp @@ -763,8 +763,8 @@ void LayoutGroup::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMea auto childMargin = childLayout->GetMargin(); DALI_LOG_INFO( gLogFilter, Debug::Verbose, "LayoutGroup::OnMeasure child width[%d] height(%d)\n", childWidth.mValue, childHeight.mValue ); - layoutWidth = std::max( layoutWidth, childWidth + LayoutLength( childMargin.start ) + LayoutLength( childMargin.end ) ); - layoutHeight = std::max( layoutHeight, childHeight + LayoutLength( childMargin.top ) + LayoutLength( childMargin.bottom ) ); + layoutWidth = std::max( layoutWidth, childWidth + childMargin.start + childMargin.end ); + layoutHeight = std::max( layoutHeight, childHeight + childMargin.top + childMargin.bottom ); DALI_LOG_INFO( gLogFilter, Debug::Verbose, "LayoutGroup::OnMeasure calculated child width[%d] calculated height(%d)\n", layoutWidth.mValue, layoutHeight.mValue ); } else diff --git a/dali-toolkit/internal/builder/builder-impl.h b/dali-toolkit/internal/builder/builder-impl.h index f2bc15a..692e0d8 100755 --- a/dali-toolkit/internal/builder/builder-impl.h +++ b/dali-toolkit/internal/builder/builder-impl.h @@ -37,16 +37,16 @@ #include // Warning messages usually displayed -#define DALI_SCRIPT_WARNING(format, ...) \ - DALI_LOG_WARNING("Script:" format, ## __VA_ARGS__) +#define DALI_SCRIPT_WARNING(format, args...) \ + DALI_LOG_WARNING("Script:" format, ## args) // Info messages are usually debug build -#define DALI_SCRIPT_INFO(format, ...) \ - DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::General, "Script:" format, ## __VA_ARGS__) +#define DALI_SCRIPT_INFO(format, args...) \ + DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::General, "Script:" format, ## args) // Info Verbose need to be swiched on in gFilterScript filter constructor (by default set to General) -#define DALI_SCRIPT_VERBOSE(format, ...) \ - DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::Verbose, "Script:" format, ## __VA_ARGS__) +#define DALI_SCRIPT_VERBOSE(format, args...) \ + DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::Verbose, "Script:" format, ## args) namespace Dali { diff --git a/dali-toolkit/internal/builder/builder-signals.cpp b/dali-toolkit/internal/builder/builder-signals.cpp old mode 100755 new mode 100644 index 9138e9b..55809bd --- a/dali-toolkit/internal/builder/builder-signals.cpp +++ b/dali-toolkit/internal/builder/builder-signals.cpp @@ -35,7 +35,7 @@ namespace Toolkit namespace Internal { extern Animation CreateAnimation( const TreeNode& child, Dali::Toolkit::Internal::Builder* const builder ); -extern void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value ); +extern bool DeterminePropertyFromNode( const TreeNode& node, Property::Value& value ); } } } diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h index 3f8444f..1bb4d2a 100755 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h @@ -634,7 +634,7 @@ private: float mScrollSpeed; float mScrollOvershoot; - Dali::Gesture::State mGestureState : 4; + Dali::Gesture::State mGestureState : 3; bool mAnimatingOvershootOn : 1; ///< Whether we are currently animating overshoot to 1.0f/-1.0f (on) or to 0.0f (off) bool mAnimateOvershootOff : 1; ///< Whether we are currently animating overshoot to 1.0f/-1.0f (on) or to 0.0f (off) bool mAnchoringEnabled : 1; diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp old mode 100755 new mode 100644 index bb83e7d..163c248 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -41,9 +41,9 @@ //#define ENABLED_SCROLL_STATE_LOGGING #ifdef ENABLED_SCROLL_STATE_LOGGING -#define DALI_LOG_SCROLL_STATE(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s:%d " format "\n", __PRETTY_FUNCTION__, __LINE__, ## __VA_ARGS__) +#define DALI_LOG_SCROLL_STATE(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s:%d " format "\n", __PRETTY_FUNCTION__, __LINE__, ## args) #else -#define DALI_LOG_SCROLL_STATE(format, ...) +#define DALI_LOG_SCROLL_STATE(format, args...) #endif // TODO: Change to two class system: diff --git a/dali-toolkit/internal/layouting/flex-layout-impl.cpp b/dali-toolkit/internal/layouting/flex-layout-impl.cpp old mode 100755 new mode 100644 index 6b7779c..bf5d084 --- a/dali-toolkit/internal/layouting/flex-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/flex-layout-impl.cpp @@ -332,8 +332,8 @@ YGSize FlexLayout::OnChildMeasure( YGNodeRef node, // Remove padding here since Yoga doesn't consider it as a part of the node size Extents padding = childLayout->GetPadding(); - auto measuredWidth = childLayout->GetMeasuredWidth() - LayoutLength( padding.end ) - LayoutLength( padding.start ); - auto measuredHeight = childLayout->GetMeasuredHeight() - LayoutLength( padding.bottom ) - LayoutLength( padding.top ); + auto measuredWidth = childLayout->GetMeasuredWidth() - padding.end - padding.start; + auto measuredHeight = childLayout->GetMeasuredHeight() - padding.bottom - padding.top; return YGSize{ .width = measuredWidth, diff --git a/dali-toolkit/internal/layouting/linear-layout-impl.cpp b/dali-toolkit/internal/layouting/linear-layout-impl.cpp old mode 100755 new mode 100644 index f039aa9..fdba7e6 --- a/dali-toolkit/internal/layouting/linear-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/linear-layout-impl.cpp @@ -452,7 +452,7 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout auto height = bottom - top; // Space available for child - auto childSpace = height - LayoutLength( padding.top ) - LayoutLength( padding.bottom ); + auto childSpace = height - padding.top - padding.bottom; auto count = GetChildCount(); @@ -514,24 +514,24 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout { case Dali::Toolkit::LinearLayout::Alignment::TOP: { - childTop = LayoutLength( padding.top ) + LayoutLength( childMargin.top ); + childTop = LayoutLength( padding.top ) + childMargin.top; break; } case Dali::Toolkit::LinearLayout::Alignment::BOTTOM: { - childTop = height - LayoutLength( padding.bottom ) - childHeight - LayoutLength( childMargin.bottom ); + childTop = height - padding.bottom - childHeight - childMargin.bottom; break; } case Dali::Toolkit::LinearLayout::Alignment::CENTER_VERTICAL: default: { - childTop = LayoutLength( padding.top ) + ( ( childSpace - childHeight ) / 2 ) + LayoutLength( childMargin.top ) - LayoutLength( childMargin.bottom ); + childTop = LayoutLength( padding.top ) + ( ( childSpace - childHeight ) / 2 ) + childMargin.top - childMargin.bottom; break; } } childLeft += childMargin.start; childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childLeft += childWidth + LayoutLength( childMargin.end ) + mCellPadding.width; + childLeft += childWidth + childMargin.end + mCellPadding.width; } } } @@ -583,7 +583,7 @@ void LinearLayout::MeasureVertical( MeasureSpec widthMeasureSpec, MeasureSpec he if( isExactly && useExcessSpace ) { LayoutLength totalLength = mTotalLength; - mTotalLength = std::max( totalLength, totalLength + LayoutLength( childMargin.top ) + LayoutLength( childMargin.bottom ) ); + mTotalLength = std::max( totalLength, totalLength + childMargin.top + childMargin.bottom ); } else { @@ -804,7 +804,7 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe auto width = right - left; // Space available for child - auto childSpace = width - LayoutLength( padding.start ) - LayoutLength( padding.end ); + auto childSpace = width - padding.start - padding.end; auto count = GetChildCount(); switch ( mAlignment & VERTICAL_ALIGNMENT_MASK ) @@ -845,22 +845,22 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe case Dali::Toolkit::LinearLayout::Alignment::BEGIN: default: { - childLeft = LayoutLength( padding.start ) + LayoutLength( childMargin.start ); + childLeft = LayoutLength( padding.start ) + childMargin.start; break; } case Dali::Toolkit::LinearLayout::Alignment::END: { - childLeft = width - LayoutLength( padding.end ) - childWidth - LayoutLength( childMargin.end ); + childLeft = width - padding.end - childWidth - childMargin.end; break; } case Dali::Toolkit::LinearLayout::Alignment::CENTER_HORIZONTAL: { - childLeft = LayoutLength( padding.start ) + ( childSpace - childWidth ) / 2 + LayoutLength( childMargin.start ) - LayoutLength( childMargin.end ); + childLeft = LayoutLength( padding.start ) + ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end; break; } } childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childTop += childHeight + LayoutLength( childMargin.bottom ) + mCellPadding.height; + childTop += childHeight + childMargin.bottom + mCellPadding.height; } } } diff --git a/dali-toolkit/internal/layouting/vbox-layout-impl.cpp b/dali-toolkit/internal/layouting/vbox-layout-impl.cpp old mode 100755 new mode 100644 index 9d50bda..22fba16 --- a/dali-toolkit/internal/layouting/vbox-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/vbox-layout-impl.cpp @@ -233,7 +233,7 @@ void VboxLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, La auto width = right - left; // Space available for child - auto childSpace = width - LayoutLength( padding.start ) - LayoutLength( padding.end ); + auto childSpace = width - padding.start - padding.end; auto count = GetChildCount(); for( unsigned int childIndex = 0; childIndex < count; childIndex++) @@ -248,10 +248,10 @@ void VboxLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, La auto childMargin = childLayout->GetMargin(); childTop += childMargin.top; - childLeft = ( childSpace - childWidth ) / 2 + LayoutLength( childMargin.start ) - LayoutLength( childMargin.end ); + childLeft = ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end; childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childTop += childHeight + LayoutLength( childMargin.bottom ) + mCellPadding.height; + childTop += childHeight + childMargin.bottom + mCellPadding.height; } } } diff --git a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h old mode 100755 new mode 100644 index dcd48ce..b5fbb2e --- a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h +++ b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h @@ -264,7 +264,7 @@ private: Dali::WrapMode::Type mWrapModeU:3; Dali::WrapMode::Type mWrapModeV:3; - DevelAnimatedImageVisual::Action::Type mActionStatus:3; + DevelAnimatedImageVisual::Action::Type mActionStatus:2; bool mStartFirstFrame:1; }; diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.h b/dali-toolkit/internal/visuals/texture-manager-impl.h old mode 100755 new mode 100644 index 6df17c6..59d191e --- a/dali-toolkit/internal/visuals/texture-manager-impl.h +++ b/dali-toolkit/internal/visuals/texture-manager-impl.h @@ -482,12 +482,12 @@ private: TextureManager::TextureHash hash; ///< The hash used to cache this Texture float scaleFactor; ///< The scale factor to apply to the Texture when masking int16_t referenceCount; ///< The reference count of clients using this Texture - LoadState loadState:4; ///< The load state showing the load progress of the Texture + LoadState loadState:3; ///< The load state showing the load progress of the Texture FittingMode::Type fittingMode:2; ///< The requested FittingMode Dali::SamplingMode::Type samplingMode:3; ///< The requested SamplingMode - StorageType storageType:2; ///< CPU storage / GPU upload; + StorageType storageType:1; ///< CPU storage / GPU upload; bool loadSynchronously:1; ///< True if synchronous loading was requested - UseAtlas useAtlas:2; ///< USE_ATLAS if an atlas was requested. + UseAtlas useAtlas:1; ///< USE_ATLAS if an atlas was requested. ///< This is updated to false if atlas is not used bool cropToMask:1; ///< true if the image should be cropped to the mask size. bool orientationCorrection:1; ///< true if the image should be rotated to match exif orientation data diff --git a/dali-toolkit/public-api/dali-toolkit-common.h b/dali-toolkit/public-api/dali-toolkit-common.h index d16ef81..56f3927 100755 --- a/dali-toolkit/public-api/dali-toolkit-common.h +++ b/dali-toolkit/public-api/dali-toolkit-common.h @@ -38,18 +38,8 @@ # define DALI_TOOLKIT_API __attribute__ ((visibility ("default"))) # endif #else -#ifdef WIN32 -#ifdef BUILDING_DALI_TOOLKIT -/** Visibility attribute to hide declarations */ -# define DALI_TOOLKIT_API __declspec(dllexport) -#else -/** Visibility attribute to hide declarations */ -# define DALI_TOOLKIT_API __declspec(dllimport) -#endif -#else /** Visibility attribute to show declarations */ # define DALI_TOOLKIT_API #endif -#endif #endif // DALI_TOOLKIT_COMMON_H -- 2.7.4