X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-scroller.cpp;h=b2c1b19dca19fe52fb5c19572eb8a650759089fa;hp=6ad85d4d1362c0af8dd88af2a8008d4bb6ad040b;hb=8a647e87a01c5c78451653c1264a9eea81ac9b20;hpb=62c1e3ee309dec283a9e5d1b9d56816262ae8fd3 diff --git a/dali-toolkit/internal/text/text-scroller.cpp b/dali-toolkit/internal/text/text-scroller.cpp old mode 100644 new mode 100755 index 6ad85d4..b2c1b19 --- a/dali-toolkit/internal/text/text-scroller.cpp +++ b/dali-toolkit/internal/text/text-scroller.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -19,7 +19,6 @@ #include // EXTERNAL INCLUDES -#include #include // INTERNAL INCLUDES @@ -43,7 +42,7 @@ const int MINIMUM_SCROLL_SPEED = 1; // Speed should be set by Property system. const char* VERTEX_SHADER_SCROLL = DALI_COMPOSE_SHADER( attribute mediump vec2 aPosition;\n varying highp vec2 vTexCoord;\n - uniform mediump vec3 uSize;\n + uniform highp vec3 uSize;\n uniform mediump float uDelta;\n uniform mediump vec2 uTextureSize;\n uniform mediump float uGap;\n @@ -54,7 +53,7 @@ const char* VERTEX_SHADER_SCROLL = DALI_COMPOSE_SHADER( \n //Visual size and offset uniform mediump vec2 offset;\n - uniform mediump vec2 size;\n + uniform highp vec2 size;\n uniform mediump vec4 offsetSizeMode;\n uniform mediump vec2 origin;\n uniform mediump vec2 anchorPoint;\n @@ -272,7 +271,10 @@ void TextScroller::SetParameters( Actor scrollingTextActor, Renderer renderer, T // Reset to the original shader and texture before scrolling mRenderer.SetShader(mShader); - mRenderer.SetTextures( mTextureSet ); + if( mTextureSet ) + { + mRenderer.SetTextures( mTextureSet ); + } } mShader = mRenderer.GetShader(); @@ -339,7 +341,7 @@ void TextScroller::StartScrolling( Actor scrollingTextActor, float scrollAmount, Shader shader = mRenderer.GetShader(); mScrollAnimation = Animation::New( scrollDuration ); mScrollAnimation.AnimateTo( Property( shader, mScrollDeltaIndex ), scrollAmount, TimePeriod( mLoopDelay, scrollDuration ) ); - mScrollAnimation.SetEndAction( Animation::Discard ); + mScrollAnimation.SetEndAction( Animation::DISCARD ); mScrollAnimation.SetLoopCount( loopCount ); mScrollAnimation.FinishedSignal().Connect( this, &TextScroller::AutoScrollAnimationFinished ); mScrollAnimation.Play();