#define DALI_TOOLKIT_VISUAL_FACTORY_IMPL_H
/*
- * 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.
*/
Toolkit::Visual::Base CreateVisual( const std::string& image, ImageDimensions size );
+ /**
+ * @return the reference to texture manager
+ */
+ Internal::TextureManager& GetTextureManager();
+
protected:
/**
template< class ParameterType0, class ParameterType1 >
void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterType0& param0, ParameterType1& param1 )
{
- visual.RemoveAndReset( actor );
+ if( actor )
+ {
+ Toolkit::GetImplementation(visual).SetOffStage( actor );
+ }
visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 );
if( visual && actor && actor.OnStage() )
{
template< class ParameterType >
void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterType& param )
{
- visual.RemoveAndReset( actor );
+ if( actor && visual )
+ {
+ Toolkit::GetImplementation(visual).SetOffStage( actor );
+ }
visual = Toolkit::VisualFactory::Get().CreateVisual( param );
if( visual && actor && actor.OnStage() )
{