X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fshader-effects%2Fmotion-blur-effect.cpp;h=205327ddcf280f5a2f59bfac92660ebccf0ad43f;hp=a444640f2566bc6f1a5431a57dddceac089dcc91;hb=030e7c680a6eb0e8d87bfdb8ec359a0267ef7db2;hpb=2ec164cd618f93ccafe17b1d0b8ff16401ed4aef diff --git a/dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp b/dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp index a444640..205327d 100644 --- a/dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp +++ b/dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 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,10 +19,8 @@ #include // EXTERNAL INCLUDES -#include #include #include -#include namespace Dali { @@ -85,20 +83,15 @@ MotionBlurEffect::~MotionBlurEffect() MotionBlurEffect MotionBlurEffect::Apply( RenderableActor renderable ) { MotionBlurEffect newEffect = New( MOTION_BLUR_NUM_SAMPLES ); - ImageActor imageActor = ImageActor::DownCast(renderable); - if( imageActor ) - { - imageActor.SetShaderEffect( newEffect ); - } + renderable.SetShaderEffect( newEffect ); Dali::Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_BLUR_MODEL_LASTFRAME ); - Constraint constraint = Constraint::New( uModelProperty, - Source( renderable, Actor::Property::WORLD_MATRIX ), - EqualToConstraint() ); + Constraint constraint = Constraint::New( newEffect, uModelProperty, EqualToConstraint() ); + constraint.AddSource( Source( renderable, Actor::Property::WORLD_MATRIX ) ); // and set up constraint. - newEffect.ApplyConstraint( constraint ); + constraint.Apply(); return newEffect; }