X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-factory-impl.h;h=5ee3e8ef160e45cf1784a51774da363dff7d8fc3;hp=999a0c40daf7913ab39b41db1c6e2a28482b4f33;hb=29540fc153880d6949c85786b78b8583ae8f1d37;hpb=30ae04d70a9a93e49163a5cec2efafd32fc678b5 diff --git a/dali-toolkit/internal/visuals/visual-factory-impl.h b/dali-toolkit/internal/visuals/visual-factory-impl.h index 999a0c4..5ee3e8e 100644 --- a/dali-toolkit/internal/visuals/visual-factory-impl.h +++ b/dali-toolkit/internal/visuals/visual-factory-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_VISUAL_FACTORY_IMPL_H /* - * Copyright (c) 2017 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. @@ -24,6 +24,8 @@ #include #include #include +#include +#include namespace Dali { @@ -35,6 +37,7 @@ namespace Internal { class VisualFactoryCache; +class ImageVisualShaderFactory; /** * @copydoc Toolkit::VisualFactory @@ -51,14 +54,17 @@ public: VisualFactory( bool debugEnabled ); /** - * @copydoc Toolkit::VisualFactory::CreateVisual( const Property::Map& ) + * @brief StyleChanged callback + * + * @param[in] styleManager Handle for style manager. + * @param[in] type Style change type. */ - Toolkit::Visual::Base CreateVisual( const Property::Map& propertyMap ); + void OnStyleChangedSignal( Toolkit::StyleManager styleManager, StyleChange::Type type ); /** - * @copydoc Toolkit::VisualFactory::CreateVisual( const Image& ) + * @copydoc Toolkit::VisualFactory::CreateVisual( const Property::Map& ) */ - Toolkit::Visual::Base CreateVisual( const Image& image ); + Toolkit::Visual::Base CreateVisual( const Property::Map& propertyMap ); /** * @copydoc Toolkit::VisualFactory::CreateVisual( const std::string&, ImageDimensions ) @@ -93,14 +99,21 @@ private: */ Internal::VisualFactoryCache& GetFactoryCache(); + /** + * Get the image visual shader factory, creating it if necessary. + */ + ImageVisualShaderFactory& GetImageVisualShaderFactory(); + VisualFactory(const VisualFactory&) = delete; VisualFactory& operator=(const VisualFactory& rhs) = delete; private: - std::unique_ptr mFactoryCache; - bool mDebugEnabled:1; - bool mPreMultiplyOnLoad:1; ///< Local store for this flag + std::unique_ptr< VisualFactoryCache > mFactoryCache; + std::unique_ptr< ImageVisualShaderFactory > mImageVisualShaderFactory; + SlotDelegate< VisualFactory > mSlotDelegate; + bool mDebugEnabled:1; + bool mPreMultiplyOnLoad:1; ///< Local store for this flag }; /** @@ -119,12 +132,12 @@ void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterTyp { if( actor ) { - Toolkit::GetImplementation(visual).SetOffStage( actor ); + Toolkit::GetImplementation(visual).SetOffScene( actor ); } visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 ); - if( visual && actor && actor.OnStage() ) + if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) { - Toolkit::GetImplementation(visual).SetOnStage(actor); + Toolkit::GetImplementation(visual).SetOnScene(actor); } } @@ -142,12 +155,12 @@ void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterTyp { if( actor && visual ) { - Toolkit::GetImplementation(visual).SetOffStage( actor ); + Toolkit::GetImplementation(visual).SetOffScene( actor ); } visual = Toolkit::VisualFactory::Get().CreateVisual( param ); - if( visual && actor && actor.OnStage() ) + if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) { - Toolkit::GetImplementation(visual).SetOnStage(actor); + Toolkit::GetImplementation(visual).SetOnScene(actor); } }