Create Renderer when the Visual is created
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image / image-visual.h
index 9ae50df..f40cf70 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_VISUAL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -205,6 +205,11 @@ protected:
   virtual ~ImageVisual();
 
   /**
+   * @copydoc Visual::Base::OnInitialize
+   */
+  void OnInitialize() override;
+
+  /**
    * @copydoc Visual::Base::DoSetProperties
    */
   void DoSetProperties( const Property::Map& propertyMap ) override;
@@ -290,12 +295,6 @@ private:
   void InitializeRenderer();
 
   /**
-   * @brief Creates the Dali::Renderer (potentially from the renderer cache), initializing it
-   * @param[in] textures to use
-   */
-  void CreateRenderer( TextureSet& textures );
-
-  /**
    * Creates the texture set and adds the texture to it
    * @param[out] textureRect The texture area of the texture in the atlas.
    * @param[in] url The URL of the image resource to use.
@@ -350,13 +349,11 @@ private:
   Dali::Toolkit::ImageVisual::ReleasePolicy::Type mReleasePolicy;
   Vector4 mAtlasRect;
   Dali::ImageDimensions mAtlasRectSize;
+  TextureManager::LoadState                       mLoadState;       ///< The texture loading state
   bool mAttemptAtlasing; ///< If true will attempt atlasing, otherwise create unique texture
-  bool mLoading;  ///< True if the texture is still loading.
   bool mOrientationCorrection; ///< true if the image will have it's orientation corrected.
 };
 
-
-
 } // namespace Internal
 
 } // namespace Toolkit