[dali_2.2.28] Merge branch 'devel/master' 35/293435/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 26 May 2023 11:40:45 +0000 (12:40 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 26 May 2023 11:40:45 +0000 (12:40 +0100)
Change-Id: I5d0e7db1e84497db2f177eb6884e1a1263ed0e71

examples/sparkle/sparkle-effect-example.cpp
examples/sparkle/sparkle-effect.h
packaging/com.samsung.dali-demo.spec

index d4060fc..a6c7a83 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -168,6 +168,7 @@ private:
     Actor meshActor = Actor::New();
     meshActor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
     meshActor.SetProperty(Actor::Property::SIZE, Vector2(1, 1));
+    meshActor.SetProperty(Actor::Property::UPDATE_AREA_HINT, ACTOR_UPDATE_AREA_HINT);
     meshActor.AddRenderer(renderer);
 
     return meshActor;
index acd2d41..2f0247a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_SPARKLE_EFFECT_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -191,12 +191,22 @@ MovingPath PATHS[] =
     {339, 348, 361, 465, 382, 477, 406, 442, 430, 406, 269, 369}};
 const unsigned int NUM_PARTICLE(sizeof(PATHS) / sizeof(PATHS[0]));
 
-const float PARTICLE_SIZE = 13.f;
+constexpr float PARTICLE_SIZE = 13.f;
 
-const float   ACTOR_SCALE = 0.704f; // resize 500*500 to 352*352, a bit smaller than 360*360
-const Vector3 ACTOR_POSITION(-176.f, -176.f, 1.f);
+// These values are mainly used to set the size of the actor, the shader draws outside the values set
+constexpr float   ACTOR_DIMENSION_SIZE(500.0f);
+constexpr float   ACTOR_SCALE = 0.704f; // resize 500*500 to 352*352, a bit smaller than 360*360
+constexpr float   ACTOR_POSITION_VALUE(176.0f);
+constexpr Vector3 ACTOR_POSITION(-ACTOR_POSITION_VALUE, -ACTOR_POSITION_VALUE, 1.f);
 
-const int MAXIMUM_ANIMATION_COUNT = 30;
+// Need to remove scale in the update-size-hint
+constexpr Vector4 ACTOR_UPDATE_AREA_HINT(
+  ACTOR_POSITION_VALUE,
+  ACTOR_POSITION_VALUE,
+  ACTOR_DIMENSION_SIZE / ACTOR_SCALE,
+  ACTOR_DIMENSION_SIZE / ACTOR_SCALE);
+
+constexpr int MAXIMUM_ANIMATION_COUNT = 30;
 
 // Geometry format used by the SparkeEffect
 struct Vertex
index 8456568..04b417a 100755 (executable)
@@ -2,7 +2,7 @@
 
 Name:       com.samsung.dali-demo
 Summary:    The OpenGLES Canvas Core Demo
-Version:    2.2.27
+Version:    2.2.28
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0