Commit 102741497cbd63634442f94872c8ffbfc7bd588b

Authored by Adeel Kazmi
2 parents 7b66dbc9 1873e36a

[dali_2.2.28] Merge branch 'devel/master'

Change-Id: I5d0e7db1e84497db2f177eb6884e1a1263ed0e71
examples/sparkle/sparkle-effect-example.cpp
1 /* 1 /*
2 - * Copyright (c) 2021 Samsung Electronics Co., Ltd. 2 + * Copyright (c) 2023 Samsung Electronics Co., Ltd.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -168,6 +168,7 @@ private: @@ -168,6 +168,7 @@ private:
168 Actor meshActor = Actor::New(); 168 Actor meshActor = Actor::New();
169 meshActor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); 169 meshActor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
170 meshActor.SetProperty(Actor::Property::SIZE, Vector2(1, 1)); 170 meshActor.SetProperty(Actor::Property::SIZE, Vector2(1, 1));
  171 + meshActor.SetProperty(Actor::Property::UPDATE_AREA_HINT, ACTOR_UPDATE_AREA_HINT);
171 meshActor.AddRenderer(renderer); 172 meshActor.AddRenderer(renderer);
172 173
173 return meshActor; 174 return meshActor;
examples/sparkle/sparkle-effect.h
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 #define DALI_SPARKLE_EFFECT_H 2 #define DALI_SPARKLE_EFFECT_H
3 3
4 /* 4 /*
5 - * Copyright (c) 2021 Samsung Electronics Co., Ltd. 5 + * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * 6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License. 8 * you may not use this file except in compliance with the License.
@@ -191,12 +191,22 @@ MovingPath PATHS[] = @@ -191,12 +191,22 @@ MovingPath PATHS[] =
191 {339, 348, 361, 465, 382, 477, 406, 442, 430, 406, 269, 369}}; 191 {339, 348, 361, 465, 382, 477, 406, 442, 430, 406, 269, 369}};
192 const unsigned int NUM_PARTICLE(sizeof(PATHS) / sizeof(PATHS[0])); 192 const unsigned int NUM_PARTICLE(sizeof(PATHS) / sizeof(PATHS[0]));
193 193
194 -const float PARTICLE_SIZE = 13.f; 194 +constexpr float PARTICLE_SIZE = 13.f;
195 195
196 -const float ACTOR_SCALE = 0.704f; // resize 500*500 to 352*352, a bit smaller than 360*360  
197 -const Vector3 ACTOR_POSITION(-176.f, -176.f, 1.f); 196 +// These values are mainly used to set the size of the actor, the shader draws outside the values set
  197 +constexpr float ACTOR_DIMENSION_SIZE(500.0f);
  198 +constexpr float ACTOR_SCALE = 0.704f; // resize 500*500 to 352*352, a bit smaller than 360*360
  199 +constexpr float ACTOR_POSITION_VALUE(176.0f);
  200 +constexpr Vector3 ACTOR_POSITION(-ACTOR_POSITION_VALUE, -ACTOR_POSITION_VALUE, 1.f);
198 201
199 -const int MAXIMUM_ANIMATION_COUNT = 30; 202 +// Need to remove scale in the update-size-hint
  203 +constexpr Vector4 ACTOR_UPDATE_AREA_HINT(
  204 + ACTOR_POSITION_VALUE,
  205 + ACTOR_POSITION_VALUE,
  206 + ACTOR_DIMENSION_SIZE / ACTOR_SCALE,
  207 + ACTOR_DIMENSION_SIZE / ACTOR_SCALE);
  208 +
  209 +constexpr int MAXIMUM_ANIMATION_COUNT = 30;
200 210
201 // Geometry format used by the SparkeEffect 211 // Geometry format used by the SparkeEffect
202 struct Vertex 212 struct Vertex
packaging/com.samsung.dali-demo.spec
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 Name: com.samsung.dali-demo 3 Name: com.samsung.dali-demo
4 Summary: The OpenGLES Canvas Core Demo 4 Summary: The OpenGLES Canvas Core Demo
5 -Version: 2.2.27 5 +Version: 2.2.28
6 Release: 1 6 Release: 1
7 Group: System/Libraries 7 Group: System/Libraries
8 License: Apache-2.0 8 License: Apache-2.0