X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-factory-impl.h;h=d334e9c139c6d264e37de2b998bb419039251e7e;hb=72bd31374a8fcc82ca9ce002e55ab0c558488d95;hp=257b03cdf633bfcad18fce2469c394772745c021;hpb=64d0a7e7289061aca3d578e91c4df288b73ae86f;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-factory-impl.h b/dali-toolkit/internal/visuals/visual-factory-impl.h old mode 100644 new mode 100755 index 257b03c..d334e9c --- 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) 2018 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. @@ -35,7 +35,7 @@ namespace Internal { class VisualFactoryCache; -typedef IntrusivePtr VisualFactoryCachePtr; +class ImageVisualShaderFactory; /** * @copydoc Toolkit::VisualFactory @@ -52,21 +52,31 @@ public: VisualFactory( bool debugEnabled ); /** - * @copydoc Toolkit::RenderFactory::CreateVisual( const Property::Map& ) + * @copydoc Toolkit::VisualFactory::CreateVisual( const Property::Map& ) */ Toolkit::Visual::Base CreateVisual( const Property::Map& propertyMap ); /** - * @copydoc Toolkit::RenderFactory::CreateVisual( const Image& ) + * @copydoc Toolkit::VisualFactory::CreateVisual( const Image& ) */ Toolkit::Visual::Base CreateVisual( const Image& image ); /** - * @copydoc Toolkit::RenderFactory::CreateVisual( const std::string&, ImageDimensions ) + * @copydoc Toolkit::VisualFactory::CreateVisual( const std::string&, ImageDimensions ) */ Toolkit::Visual::Base CreateVisual( const std::string& image, ImageDimensions size ); /** + * @copydoc Toolkit::VisualFactory::SetPreMultiplyOnLoad() + */ + void SetPreMultiplyOnLoad( bool preMultiply ); + + /** + * @copydoc Toolkit::VisualFactory::GetPreMultiplyOnLoad() + */ + bool GetPreMultiplyOnLoad() const; + + /** * @return the reference to texture manager */ Internal::TextureManager& GetTextureManager(); @@ -79,21 +89,25 @@ protected: virtual ~VisualFactory(); private: - /** - * Undefined copy constructor. + * Get the factory cache, creating it if necessary. */ - VisualFactory(const VisualFactory&); + Internal::VisualFactoryCache& GetFactoryCache(); /** - * Undefined assignment operator. + * Get the image visual shader factory, creating it if necessary. */ - VisualFactory& operator=(const VisualFactory& rhs); + ImageVisualShaderFactory& GetImageVisualShaderFactory(); -private: + VisualFactory(const VisualFactory&) = delete; - VisualFactoryCachePtr mFactoryCache; - bool mDebugEnabled; + VisualFactory& operator=(const VisualFactory& rhs) = delete; + +private: + std::unique_ptr mFactoryCache; + std::unique_ptr< ImageVisualShaderFactory > mImageVisualShaderFactory; + bool mDebugEnabled:1; + bool mPreMultiplyOnLoad:1; ///< Local store for this flag }; /**