From: Hosang Kim Date: Mon, 25 Jul 2022 05:58:50 +0000 (+0900) Subject: Merge branch 'devel/master' into tizen X-Git-Tag: accepted/tizen/unified/20220726.132118^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f908c847e47d06c9a28f2a454dd00ac2efe4a9f;hp=d9c4984cec0d335c9c1e00149b3ae6b05c7a5414;p=platform%2Fcore%2Fuifw%2Fdali-demo.git Merge branch 'devel/master' into tizen --- diff --git a/examples/animated-vector-images/animated-vector-images-example.cpp b/examples/animated-vector-images/animated-vector-images-example.cpp index d138483..9612c47 100644 --- a/examples/animated-vector-images/animated-vector-images-example.cpp +++ b/examples/animated-vector-images/animated-vector-images-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "shared/view.h" @@ -35,8 +36,8 @@ const char* TOOLBAR_IMAGE(DEMO_IMAGE_DIR "top-bar.png"); const char* APPLICATION_TITLE("Animated Vector Images"); const char* IMAGE_PATH[] = { + DEMO_IMAGE_DIR "done.json", DEMO_IMAGE_DIR "insta_camera.json", - DEMO_IMAGE_DIR "you're_in!.json", DEMO_IMAGE_DIR "jolly_walker.json"}; const unsigned int NUMBER_OF_IMAGES = 3; @@ -140,10 +141,80 @@ public: mTable.AddChild(mImageViews[x], TableView::CellPosition(CellPlacement::IMAGE, x)); } + DevelAnimatedVectorImageVisual::DynamicPropertyInfo info; + info.id = 1; + info.keyPath = "Shape Layer 1.Ellipse 1.Fill 1"; + info.property = static_cast(VectorAnimationRenderer::VectorProperty::FILL_COLOR); + info.callback = MakeCallback(this, &AnimatedVectorImageViewController::FillColorCallback); + + DevelControl::DoActionExtension(mImageViews[0], ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::SET_DYNAMIC_PROPERTY, Any(info)); + + info.id = 2; + info.keyPath = "**"; + info.property = static_cast(VectorAnimationRenderer::VectorProperty::STROKE_COLOR); + info.callback = MakeCallback(this, &AnimatedVectorImageViewController::StrokeColorCallback); + + DevelControl::DoActionExtension(mImageViews[0], ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::SET_DYNAMIC_PROPERTY, Any(info)); + + info.id = 3; + info.keyPath = "**"; + info.property = static_cast(VectorAnimationRenderer::VectorProperty::STROKE_WIDTH); + info.callback = MakeCallback(this, &AnimatedVectorImageViewController::StrokeWidthCallback); + + DevelControl::DoActionExtension(mImageViews[0], ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::SET_DYNAMIC_PROPERTY, Any(info)); + + info.id = 4; + info.keyPath = "Shape Layer 2.Shape 1"; + info.property = static_cast(VectorAnimationRenderer::VectorProperty::TRANSFORM_ROTATION); + info.callback = MakeCallback(this, &AnimatedVectorImageViewController::TransformRotationCallback); + + DevelControl::DoActionExtension(mImageViews[0], ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::SET_DYNAMIC_PROPERTY, Any(info)); + application.GetWindow().KeyEventSignal().Connect(this, &AnimatedVectorImageViewController::OnKeyEvent); } private: + Property::Value FillColorCallback(int32_t id, VectorAnimationRenderer::VectorProperty property, uint32_t frameNumber) + { + if(frameNumber < 60) + { + return Vector3(0, 0, 1); + } + else + { + return Vector3(1, 0, 0); + } + } + + Property::Value StrokeColorCallback(int32_t id, VectorAnimationRenderer::VectorProperty property, uint32_t frameNumber) + { + if(frameNumber < 60) + { + return Vector3(1, 0, 1); + } + else + { + return Vector3(1, 1, 0); + } + } + + Property::Value StrokeWidthCallback(int32_t id, VectorAnimationRenderer::VectorProperty property, uint32_t frameNumber) + { + if(frameNumber < 60) + { + return 2.0f; + } + else + { + return 5.0f; + } + } + + Property::Value TransformRotationCallback(int32_t id, VectorAnimationRenderer::VectorProperty property, uint32_t frameNumber) + { + return frameNumber * 20.0f; + } + bool OnPlayButtonClicked(Button button) { unsigned int controlIndex = GetControlIndex(button); diff --git a/examples/perf-view-creation/perf-view-creation-example.cpp b/examples/perf-view-creation/perf-view-creation-example.cpp index 4cb9fa6..2ef0074 100644 --- a/examples/perf-view-creation/perf-view-creation-example.cpp +++ b/examples/perf-view-creation/perf-view-creation-example.cpp @@ -34,10 +34,6 @@ using namespace Dali; using namespace Dali::Toolkit; using namespace std; -// TODO : borderline, blur type need to solve partial update issue. -// Until that issue exist, just block it. -#define ALLOW_BORDER_AND_BLUR 0 - namespace { enum class ControlTestType @@ -47,12 +43,10 @@ enum class ControlTestType IMAGE, ///< Test with simple image TEXT, ///< Test with simple text label ROUNDED_COLOR, ///< Test with rounded color -#if ALLOW_BORDER_AND_BLUR BORDER_COLOR, ///< Test with borderline color ROUNDED_BORDER_COLOR, ///< Test with rounded borderline color BLUR_COLOR, ///< Test with blur color - ROUNDED_BLUR_COLOR, ///< Test with blur color -#endif + ROUNDED_BLUR_COLOR, ///< Test with rounded blur color TYPE_MAX, // clang-format on }; @@ -66,12 +60,10 @@ const char* TestTypeString(ControlTestType type) case ControlTestType::IMAGE: return "IMAGE"; case ControlTestType::TEXT: return "TEXT"; case ControlTestType::ROUNDED_COLOR: return "ROUNDED COLOR"; -#if ALLOW_BORDER_AND_BLUR case ControlTestType::BORDER_COLOR: return "BORDER COLOR"; case ControlTestType::ROUNDED_BORDER_COLOR:return "ROUNDED BORDER COLOR"; case ControlTestType::BLUR_COLOR: return "BLUR COLOR"; case ControlTestType::ROUNDED_BLUR_COLOR: return "ROUNDED BLUR COLOR"; -#endif default: return "UNKNOWN"; } // clang-format on @@ -94,7 +86,7 @@ constexpr uint32_t DURATION_OF_ANIMATION(DURATION_PER_COLUMNS*(COLUMNS_COUNT * 4 // We should render same type of views in some timing. static_assert(COLUMNS_COUNT * 2 <= TOTAL_COLUMNS_COUNT); -constexpr float VIEW_MARGIN_RATE = 0.1f; +constexpr float VIEW_MARGIN_RATE = 0.2f; // copy from dali-adaptor time-service.cpp void GetNanoseconds(uint64_t& timeInNanoseconds) @@ -141,7 +133,6 @@ Control CreateRoundedColor() return bgView; } -#if ALLOW_BORDER_AND_BLUR Control CreateBorderColor(const float& requiredBorderlineWidth) { Control bgView = Control::New(Control::ControlBehaviour::DISABLE_STYLE_CHANGE_SIGNALS); @@ -203,7 +194,6 @@ Control CreateRoundedBlurColor(const float& requiredBlurRadius) return bgView; } -#endif /** * @brief Statistic container that we can get average / sum / min/ max. @@ -379,7 +369,6 @@ public: bgView = CreateRoundedColor(); break; } -#if ALLOW_BORDER_AND_BLUR case ControlTestType::BORDER_COLOR: { bgView = CreateBorderColor(std::min(mSize.x, mSize.y) * VIEW_MARGIN_RATE); @@ -400,7 +389,6 @@ public: bgView = CreateRoundedBlurColor(std::min(mSize.x, mSize.y) * VIEW_MARGIN_RATE * 0.5f); break; } -#endif } bgView[Actor::Property::PARENT_ORIGIN] = ParentOrigin::TOP_LEFT; diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index d4f10f2..db41816 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -2,7 +2,7 @@ Name: com.samsung.dali-demo Summary: The OpenGLES Canvas Core Demo -Version: 2.1.31 +Version: 2.1.32 Release: 1 Group: System/Libraries License: Apache-2.0 diff --git a/resources/images/done.json b/resources/images/done.json new file mode 100644 index 0000000..a4b1196 --- /dev/null +++ b/resources/images/done.json @@ -0,0 +1 @@ +{"v":"4.11.1","fr":29.9700012207031,"ip":0,"op":76.0000030955435,"w":70,"h":70,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[35,35,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":33,"s":[0,0,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":46,"s":[120,120,100],"e":[100,100,100]},{"t":52.0000021180034}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-7,1.438],[-2.656,5.781],[7.422,-4.297]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":33,"s":[0],"e":[100]},{"t":52.0000021180034}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":450.000018328876,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[35,35,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":18,"s":[0,0,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":33,"s":[120,120,100],"e":[80,80,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":41,"s":[80,80,100],"e":[110,110,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":49,"s":[110,110,100],"e":[100,100,100]},{"t":52.0000021180034}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[13.015,0],[0,-13.015],[-13.015,0],[0,13.015]],"o":[[-13.015,0],[0,13.015],[13.015,0],[0,-13.015]],"v":[[0,-23.566],[-23.566,0],[0,23.566],[23.566,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.898039215686,0.898039215686,0.898039215686,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.760784313725,0.2,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[105.535,105.535],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":450.000018328876,"st":0,"bm":0}]} \ No newline at end of file