From: Adeel Kazmi Date: Mon, 13 Jul 2015 11:42:29 +0000 (+0100) Subject: Updates after RenderableActor removal X-Git-Tag: dali_1.0.49~16^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F43716%2F2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Updates after RenderableActor removal Change-Id: Ic4c5a8369913f829c301ab18b007f358abf98774 --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp index 2d9d8cc..a4887ba 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp @@ -232,7 +232,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // Default, HorizontalCenter, VerticalCenter - Ensure they do not change! { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -252,7 +252,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalLeft, VerticalCenter { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -272,7 +272,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalRight, VerticalCenter { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -292,7 +292,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalLeft, VerticalTop { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -312,7 +312,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalCenter, VerticalTop { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -332,7 +332,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalRight, VerticalTop { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -352,7 +352,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalLeft, VerticalBottom { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -372,7 +372,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalCenter, VerticalBottom { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -392,7 +392,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalRight, VerticalBottom { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -466,7 +466,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(); DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -479,7 +479,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalLeft); DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -492,7 +492,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalRight); DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -505,7 +505,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop); DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -518,7 +518,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop); DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -531,7 +531,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop); DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -544,7 +544,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom); DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -557,7 +557,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom); DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -570,7 +570,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom); DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -588,7 +588,7 @@ int UtcDaliAlignmentSetScaling(void) // ScaleToFill { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -621,7 +621,7 @@ int UtcDaliAlignmentSetScaling(void) // ScaleToFitKeepAspect { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -654,7 +654,7 @@ int UtcDaliAlignmentSetScaling(void) // ScaleToFillKeepAspect { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -687,7 +687,7 @@ int UtcDaliAlignmentSetScaling(void) // ShrinkToFit { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -720,7 +720,7 @@ int UtcDaliAlignmentSetScaling(void) // ShrinkToFitKeepAspect { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -905,7 +905,7 @@ int UtcDaliAlignmentChildAddAndRemove(void) application.Render(); application.SendNotification(); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); alignment.Add(actor); DALI_TEST_EQUALS(alignment.GetChildCount(), 1u, TEST_LOCATION); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp index 1180731..a886d9d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -354,7 +354,7 @@ int UtcDaliControlImplChildAddAndRemove(void) DALI_TEST_EQUALS( dummyImpl.childAddCalled, false, TEST_LOCATION ); DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION ); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); dummy.Add(actor); DALI_TEST_EQUALS( dummyImpl.childAddCalled, true, TEST_LOCATION ); DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION ); @@ -382,7 +382,7 @@ int UtcDaliControlImplChildAddAndRemove(void) application.SendNotification(); DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION ); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); dummy.Add(actor); DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION ); diff --git a/dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h b/dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h index 461e564..5140144 100644 --- a/dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h +++ b/dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h @@ -142,7 +142,7 @@ public: /** * @brief Enable different blending mode for rendering. * - * @param[in] enable If false, the default blending function for RenderableActor is used. + * @param[in] enable If false, the default blending function if ImageActor is used. */ void SetBlendMode( bool enable ); diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp index 104c334..24d5934 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp @@ -21,6 +21,7 @@ // EXTERNAL INCLUDES #include #include +#include namespace Dali { @@ -86,14 +87,14 @@ ImageActor PageTurnLandscapeView::NewPageFromRenderBuffer( int pageIndex ) void PageTurnLandscapeView::OnAddPage( ImageActor newPage, bool isLeftSide ) { newPage.SetParentOrigin( ParentOrigin::CENTER ); - newPage.SetCullFace( CullBack ); + SetCullFace( newPage, CullBack ); if( 0 < newPage.GetChildCount() ) { ImageActor backImage = ImageActor::DownCast( newPage.GetChildAt( 0 ) ); backImage.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION ); backImage.SetSize( mPageSize ); - backImage.SetCullFace( CullFront ); + SetCullFace( backImage, CullFront ); backImage.SetZ( 0.25f * STATIC_PAGE_INTERVAL_DISTANCE ); } if( isLeftSide ) diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp index 9b18917..4d761fe 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include //INTERNAL INCLUDES #include @@ -159,14 +160,23 @@ void PageTurnPortraitView::OnPossibleOutwardsFlick( const Vector2& panPosition, AlphaFunction::EASE_OUT, TimePeriod(PAGE_TURN_OVER_ANIMATION_DURATION*0.75f) ); animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunction::EASE_OUT ); animation.Play(); - ImageActor::DownCast(actor).SetCullFace( CullBack ); + + ImageActor imageActor = ImageActor::DownCast(actor); + if( imageActor ) + { + SetCullFace( imageActor, CullBack ); + } animation.FinishedSignal().Connect( this, &PageTurnPortraitView::OnTurnedOver ); } } void PageTurnPortraitView::OnTurnedOver( Animation& animation ) { - ImageActor::DownCast(mAnimationActorPair[animation]).SetCullFace( CullNone ); + ImageActor imageActor = ImageActor::DownCast( mAnimationActorPair[ animation ] ); + if( imageActor ) + { + SetCullFace( imageActor, CullNone ); + } TurnedOver( animation ); } diff --git a/dali-toolkit/internal/text/rendering/text-renderer.h b/dali-toolkit/internal/text/rendering/text-renderer.h index 17be8d8..eea4efa 100644 --- a/dali-toolkit/internal/text/rendering/text-renderer.h +++ b/dali-toolkit/internal/text/rendering/text-renderer.h @@ -42,7 +42,7 @@ typedef IntrusivePtr RendererPtr; * @brief Abstract base class for Text renderers. * * This is reponsible for rendering the glyphs from a ViewInterface in the specified positions. - * It is implemented by returning a RenderableActor intended as the child of a UI control. + * It is implemented by returning an Actor intended as the child of a UI control. */ class Renderer : public RefObject { diff --git a/docs/content/programming-guide/properties.h b/docs/content/programming-guide/properties.h index bde81c2..d984cf1 100644 --- a/docs/content/programming-guide/properties.h +++ b/docs/content/programming-guide/properties.h @@ -33,7 +33,7 @@ Within the public-api header file; image-actor.h: @code /** * @brief An enumeration of properties belonging to the ImageActor class. - * Properties additional to RenderableActor. + * Properties additional to Actor. */ struct Property { diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp index 149edb9..b242721 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp @@ -257,8 +257,6 @@ const ActorFunctions ActorFunctionTable[]= // ignore GetNinePatchBorder use imageActor.border { "SetSortModifier", ImageActorApi::SetSortModifier, IMAGE_ACTOR_API }, { "GetSortModifier", ImageActorApi::GetSortModifier, IMAGE_ACTOR_API }, - { "SetCullFace", ImageActorApi::SetCullFace, IMAGE_ACTOR_API }, - { "GetCullFace", ImageActorApi::GetCullFace, IMAGE_ACTOR_API }, { "SetBlendMode", ImageActorApi::SetBlendMode, IMAGE_ACTOR_API }, { "GetBlendMode", ImageActorApi::GetBlendMode, IMAGE_ACTOR_API }, { "SetBlendFunc", ImageActorApi::SetBlendFunc, IMAGE_ACTOR_API }, diff --git a/plugins/dali-script-v8/src/actors/image-actor-api.cpp b/plugins/dali-script-v8/src/actors/image-actor-api.cpp index 7394fa0..252838e 100644 --- a/plugins/dali-script-v8/src/actors/image-actor-api.cpp +++ b/plugins/dali-script-v8/src/actors/image-actor-api.cpp @@ -192,59 +192,6 @@ void ImageActorApi::GetSortModifier( const v8::FunctionCallbackInfo& } /** - * Set the face-culling mode for this actor. - * @for ImageActor - * @method setCullFace - * @param {Number} cullMode - * @example - * // cull mode should be one of the following constants - * dali.CULL_FACE_DISABLE // Face culling disabled - * dali.CULL_FRONT_FACE // Cull front facing polygons - * dali.CULL_BACK_FACE // Cull back facing polygons - * dali.CULL_FRONT_AND_BACK_FACE // Cull front and back facing polygons - * actor.SetCullFace( dali.CULL_FRONT_FACE ); - */ -void ImageActorApi::SetCullFace( const v8::FunctionCallbackInfo& args ) -{ - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope handleScope( isolate ); - ImageActor imageActor = GetImageActor( isolate, args ); - - bool found( false ); - int cullMode = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 ); - if( !found ) - { - DALI_SCRIPT_EXCEPTION( isolate, "bad parameter" ); - return; - } - - imageActor.SetCullFace( static_cast( cullMode ) ); - -} - -/** - * Retrieve the face-culling mode for this actor. - * @for ImageActor - * @method getCullFace - * @return {Number} cullMode - * @example - * // cull mode is one of the following - * dali.CULL_FACE_DISABLE // Face culling disabled - * dali.CULL_FRONT_FACE // Cull front facing polygons - * dali.CULL_BACK_FACE // Cull back facing polygons - * dali.CULL_FRONT_AND_BACK_FACE // Cull front and back facing polygon - */ -void ImageActorApi::GetCullFace( const v8::FunctionCallbackInfo& args ) -{ - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope handleScope( isolate ); - ImageActor imageActor = GetImageActor( isolate, args ); - - args.GetReturnValue().Set( v8::Integer::New( isolate, imageActor.GetCullFace() ) ); - -} - -/** * Sets the blending mode. * * If blending is disabled (BLENDING_OFF) fade in and fade out animations do not work. diff --git a/plugins/dali-script-v8/src/actors/image-actor-api.h b/plugins/dali-script-v8/src/actors/image-actor-api.h index 2d00599..f5974e0 100644 --- a/plugins/dali-script-v8/src/actors/image-actor-api.h +++ b/plugins/dali-script-v8/src/actors/image-actor-api.h @@ -44,8 +44,6 @@ namespace ImageActorApi void GetImage( const v8::FunctionCallbackInfo< v8::Value >& args ); void SetSortModifier( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetSortModifier( const v8::FunctionCallbackInfo< v8::Value >& args ); - void SetCullFace( const v8::FunctionCallbackInfo< v8::Value >& args ); - void GetCullFace( const v8::FunctionCallbackInfo< v8::Value >& args ); void SetBlendMode( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetBlendMode( const v8::FunctionCallbackInfo< v8::Value >& args ); void SetBlendFunc( const v8::FunctionCallbackInfo< v8::Value >& args ); diff --git a/plugins/dali-script-v8/src/constants/constants-wrapper.cpp b/plugins/dali-script-v8/src/constants/constants-wrapper.cpp index c3b2043..77f8a7f 100644 --- a/plugins/dali-script-v8/src/constants/constants-wrapper.cpp +++ b/plugins/dali-script-v8/src/constants/constants-wrapper.cpp @@ -204,12 +204,6 @@ const IntegerPair EnumTable[] = { "BLEND_EQUATION_SUBTRACT", BlendingEquation::SUBTRACT }, { "BLEND_EQUATION_REVERSE_SUBTRACT", BlendingEquation::REVERSE_SUBTRACT }, - - { "CULL_FACE_DISABLE", CullNone }, - { "CULL_FRONT_FACE", CullFront }, - { "CULL_BACK_FACE", CullBack }, - { "CULL_FRONT_AND_BACK_FACE", CullFrontAndBack }, - { "CAMERA_FREE_LOOK" , Camera::FREE_LOOK }, { "CAMERA_LOOK_AT_TARGET" , Camera::LOOK_AT_TARGET }, { "CAMERA_PERSPECTIVE_PROJECTION" , Camera::PERSPECTIVE_PROJECTION },