X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Feffects-view%2Feffects-view-impl.cpp;h=d2e188de39b30d7e011c39c0ea5f139d7f971c17;hp=44bc39bda77a5fe9bd6c7c02eeda032d4754c707;hb=aa4d3eae3c1c35c383e34c075d57dcc9835f8bcf;hpb=928f30d2caf2775c5bcbfd84ceb4bf37ca29f020 diff --git a/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp b/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp index 44bc39b..d2e188d 100644 --- a/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp +++ b/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -33,6 +33,7 @@ // INTERNAL INCLUDES #include #include +#include #include #include #include @@ -65,7 +66,7 @@ DALI_TYPE_REGISTRATION_END() const Pixel::Format EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT = Pixel::RGBA8888; const float ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f; -const Vector4 EFFECTS_VIEW_DEFAULT_BACKGROUND_COLOR( 1.0f, 1.0f, 1.0f, 0.0 ); +const Vector4 EFFECTS_VIEW_DEFAULT_BACKGROUND_COLOR( 0.0f, 0.0f, 0.0f, 0.0 ); const bool EFFECTS_VIEW_REFRESH_ON_DEMAND(false); // Visuals are not stylable or public @@ -193,7 +194,7 @@ void EffectsView::SetType( Toolkit::EffectsView::EffectType type ) FrameBufferImage dummyImage = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat ); Internal::InitializeVisual( self, mVisualPostFilter, dummyImage ); - RegisterVisual( POST_FILTER_VISUAL, mVisualPostFilter ); + DevelControl::RegisterVisual( *this, POST_FILTER_VISUAL, mVisualPostFilter ); Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::VERTEX_SHADER ] = EFFECTS_VIEW_VERTEX_SOURCE; @@ -289,8 +290,6 @@ void EffectsView::OnInitialize() void EffectsView::OnSizeSet(const Vector3& targetSize) { - Control::OnSizeSet( targetSize ); - mTargetSize = Vector2(targetSize); // if we are already on stage, need to update render target sizes now to reflect the new size of this actor @@ -304,13 +303,15 @@ void EffectsView::OnSizeSet(const Vector3& targetSize) } mChildrenRoot.SetSize( targetSize ); + + Control::OnSizeSet( targetSize ); } void EffectsView::OnStageConnection( int depth ) { - Control::OnStageConnection( depth ); - Enable(); + + Control::OnStageConnection( depth ); } void EffectsView::OnStageDisconnection() @@ -328,12 +329,12 @@ void EffectsView::OnStageDisconnection() void EffectsView::OnChildAdd( Actor& child ) { - Control::OnChildAdd( child ); - if( child != mChildrenRoot && child != mCameraForChildren ) { mChildrenRoot.Add( child ); } + + Control::OnChildAdd( child ); } void EffectsView::OnChildRemove( Actor& child ) @@ -427,8 +428,7 @@ void EffectsView::AllocateResources() mImageForChildren = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat ); Internal::InitializeVisual( self, mVisualForChildren, mImageForChildren ); - RegisterVisual( CHILD_VISUAL, mVisualForChildren ); - mVisualForChildren.SetDepthIndex( DepthIndex::CONTENT+1 ); + DevelControl::RegisterVisual( *this, CHILD_VISUAL, mVisualForChildren, DepthIndex::CONTENT + 1 ); mImagePostFilter = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat ); TextureSet textureSet = TextureSet::New();