Merge branch 'devel/master' into tizen accepted/tizen/unified/20230810.070126
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 9 Aug 2023 00:33:54 +0000 (09:33 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 9 Aug 2023 00:33:54 +0000 (09:33 +0900)
Change-Id: I546ad02a127f4960afbd9a150a25edc4ae2cf453

1  2 
dali-extension/internal/rive-animation-view/rive-animation-view-impl.cpp

  #include "rive-animation-view-impl.h"
  
  // EXTERNAL INCLUDES
++#include <dali-toolkit/devel-api/controls/control-devel.h>
  #include <dali/devel-api/adaptor-framework/window-devel.h>
  #include <dali/devel-api/common/stage.h>
  #include <dali/devel-api/rendering/renderer-devel.h>
  #include <dali/integration-api/debug.h>
  #include <dali/public-api/object/type-registry-helper.h>
  #include <dali/public-api/object/type-registry.h>
--#include <dali-toolkit/devel-api/controls/control-devel.h>
  
  // INTERNAL INCLUDES
  #include <dali-extension/devel-api/rive-animation-view/rive-animation-view.h>
@@@ -38,7 -38,7 +38,6 @@@ namespace Interna
  {
  namespace
  {
--
  Geometry CreateQuadGeometry()
  {
    const float halfWidth  = 0.5f;
@@@ -79,28 -79,28 +78,27 @@@ DALI_PROPERTY_REGISTRATION(Extension, R
  DALI_TYPE_REGISTRATION_END()
  
  const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
--  attribute mediump vec2 aPosition;\n
--  uniform highp   mat4 uMvpMatrix;\n
--  uniform highp   vec3 uSize;\n
--  varying mediump vec2 vTexCoord;\n
--  \n
--  void main()\n
--  {\n
--    gl_Position = uMvpMatrix * vec4(aPosition * uSize.xy, 0.0, 1.0);\n
--    vTexCoord = aPosition + vec2(0.5);\n
--  }\n
--);
++  attribute mediump vec2     aPosition;\n
++    uniform highp mat4       uMvpMatrix;\n
++      uniform highp vec3     uSize;\n
++        varying mediump vec2 vTexCoord;\n
++  \n void main()\n {
++          \n
++            gl_Position = uMvpMatrix * vec4(aPosition * uSize.xy, 0.0, 1.0);
++          \n
++            vTexCoord = aPosition + vec2(0.5);
++          \n
++        }\n);
  
  const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
--  varying mediump vec2 vTexCoord;\n
--  uniform sampler2D sTexture;\n
--  uniform lowp vec4 uColor;\n
--  \n
--  void main()\n
--  {\n
--      gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n
--  }\n
--);
++  varying mediump vec2  vTexCoord;\n
++    uniform sampler2D   sTexture;\n
++      uniform lowp vec4 uColor;\n
++  \n void main()\n {
++        \n
++          gl_FragColor = texture2D(sTexture, vTexCoord) * uColor;
++        \n
++      }\n);
  
  #if defined(DEBUG_ENABLED)
  Debug::Filter* gRiveAnimationLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_RIVE_ANIMATION");
@@@ -175,7 -176,7 +174,6 @@@ void RiveAnimationView::OnSceneConnecti
    }
  
    DALI_LOG_INFO(gRiveAnimationLogFilter, Debug::Verbose, "RiveAnimationView::OnSceneConnection [%p]\n", this);
--
  }
  
  void RiveAnimationView::OnSceneDisconnection()
@@@ -473,7 -474,7 +471,7 @@@ void RiveAnimationView::SetUrl(const st
  
    Geometry geometry = CreateQuadGeometry();
    Shader   shader   = Shader::New(VERTEX_SHADER, FRAGMENT_SHADER);
--  mRenderer  = Renderer::New(geometry, shader);
++  mRenderer         = Renderer::New(geometry, shader);
  
    TextureSet textureSet = TextureSet::New();
    mRenderer.SetTextures(textureSet);
@@@ -543,14 -544,14 +541,14 @@@ void RiveAnimationView::SendAnimationDa
  
  void RiveAnimationView::ClearAnimationsData()
  {
--    mAnimationData.animations.clear();
--    mAnimationData.elapsedTimes.clear();
--    mAnimationData.fillColors.clear();
--    mAnimationData.strokeColors.clear();
--    mAnimationData.opacities.clear();
--    mAnimationData.scales.clear();
--    mAnimationData.rotations.clear();
--    mAnimationData.positions.clear();
++  mAnimationData.animations.clear();
++  mAnimationData.elapsedTimes.clear();
++  mAnimationData.fillColors.clear();
++  mAnimationData.strokeColors.clear();
++  mAnimationData.opacities.clear();
++  mAnimationData.scales.clear();
++  mAnimationData.rotations.clear();
++  mAnimationData.positions.clear();
  }
  
  void RiveAnimationView::SetVectorImageSize()
@@@ -594,7 -595,7 +592,7 @@@ void RiveAnimationView::OnScaleNotifica
  
  void RiveAnimationView::OnSizeNotification(PropertyNotification& source)
  {
--  Vector3 size       = Self().GetCurrentProperty<Vector3>(Actor::Property::SIZE);
++  Vector3 size = Self().GetCurrentProperty<Vector3>(Actor::Property::SIZE);
    mSize.width  = size.width;
    mSize.height = size.height;