Create Renderer when the Visual is created
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / wireframe / wireframe-visual.h
index f446806..12ebfe5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_WIREFRAME_VISUAL_H
 
 /*
- * Copyright (c) 2016 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.
@@ -92,36 +92,52 @@ protected:
   virtual ~WireframeVisual();
 
 protected: // from Visual::Base
+  /**
+   * @copydoc Visual::Base::OnInitialize
+   */
+  void OnInitialize() override;
 
   /**
    * @copydoc Visual::Base::GetHeightForWidth()
    */
-  virtual float GetHeightForWidth( float width );
+  float GetHeightForWidth( float width ) override;
 
   /**
    * @copydoc Visual::Base::GetNaturalSize()
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap()
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
+
+  /**
+   * @copydoc Visual::Base::CreateInstancePropertyMap
+   */
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::DoSetProperties()
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
-   * @copydoc Visual::Base::DoSetOnStage
+   * @copydoc Visual::Base::DoSetOnScene
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnScene( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
+
+  /**
+   * @copydoc Visual::Base::GetVisualObject
+   *
+   * Overriding as this visual can sometimes act as a proxy to the actual visual, i.e. when using debug rendering.
+   */
+  Base& GetVisualObject() override;
 
 private:
   /**
@@ -130,11 +146,6 @@ private:
    */
   Geometry CreateQuadWireframeGeometry();
 
-  /**
-   * @brief Initialise the renderer from the cache, if not available, create and save to the cache for sharing.
-   */
-  void InitializeRenderer();
-
   // Undefined
   WireframeVisual( const WireframeVisual& visual);