Remove batching.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-factory-cache.h
index 6f67a66..c674aac 100644 (file)
@@ -17,9 +17,6 @@
  * limitations under the License.
  */
 
-// INTERNAL INCLUDES
-#include "svg/svg-rasterize-thread.h"
-
 // EXTERNAL INCLUDES
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/object/ref-object.h>
@@ -29,6 +26,9 @@
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/devel-api/object/weak-handle.h>
 
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/visuals/npatch-loader.h>
+#include <dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h>
 
 namespace Dali
 {
@@ -42,6 +42,8 @@ namespace Internal
 class ImageAtlasManager;
 typedef IntrusivePtr<ImageAtlasManager> ImageAtlasManagerPtr;
 
+class NPatchLoader;
+
 /**
  * Caches shaders and geometries. Owned by VisualFactory.
  */
@@ -62,12 +64,13 @@ public:
     GRADIENT_SHADER_RADIAL_USER_SPACE,
     GRADIENT_SHADER_RADIAL_BOUNDING_BOX,
     IMAGE_SHADER,
-    BATCH_IMAGE_SHADER,
     IMAGE_SHADER_ATLAS_DEFAULT_WRAP,
     IMAGE_SHADER_ATLAS_CUSTOM_WRAP,
     NINE_PATCH_SHADER,
     SVG_SHADER,
-    SHADER_TYPE_MAX = SVG_SHADER
+    TEXT_SHADER,
+    WIREFRAME_SHADER,
+    SHADER_TYPE_MAX = WIREFRAME_SHADER
   };
 
   /**
@@ -79,7 +82,8 @@ public:
     BORDER_GEOMETRY,
     NINE_PATCH_GEOMETRY,
     NINE_PATCH_BORDER_GEOMETRY,
-    GEOMETRY_TYPE_MAX = NINE_PATCH_BORDER_GEOMETRY
+    WIREFRAME_GEOMETRY,
+    GEOMETRY_TYPE_MAX = WIREFRAME_GEOMETRY
   };
 
 public:
@@ -129,13 +133,6 @@ public:
   static Geometry CreateGridGeometry( Uint16Pair gridSize );
 
   /**
-   * Create the batchable geometry
-   * @param[in] texCoords The texture atlas rect coordinates
-   * @return The created batchable geometry
-   */
-  static Geometry CreateBatchQuadGeometry( Vector4 texCoords );
-
-  /**
    * @brief Returns an image to be used when a visual has failed to correctly render
    * @return The broken image handle.
    */
@@ -171,24 +168,20 @@ public:
   bool CleanRendererCache( const std::string& key );
 
   /**
-   * @brief Cache the debug renderer
-   */
-  void CacheDebugRenderer( Renderer& renderer );
-
-  /**
-   * @brief Request the debug renderer;
+   * Get the image atlas manager.
+   * @return A pointer to the atlas manager
    */
-  Renderer GetDebugRenderer();
+  ImageAtlasManagerPtr GetAtlasManager();
 
   /**
-   * Get the image atlas manager.
-   * @return A pointer pointing to the atlas manager
+   * Get the N-Patch texture cache.
+   * @return A reference to the N patch loader
    */
-  ImageAtlasManagerPtr GetAtlasManager();
+  NPatchLoader& GetNPatchLoader();
 
   /**
    * Get the SVG rasterization thread.
-   * @return A pointer pointing to the SVG rasterization thread.
+   * @return A raw pointer pointing to the SVG rasterization thread.
    */
   SvgRasterizeThread* GetSVGRasterizationThread();
 
@@ -245,9 +238,11 @@ private:
   HashVector mRendererHashes;
   CachedRenderers mRenderers;
 
-  Renderer mDebugRenderer;
+  Renderer mWireframeRenderer;
 
   ImageAtlasManagerPtr mAtlasManager;
+  NPatchLoader mNPatchLoader;
+
   SvgRasterizeThread*  mSvgRasterizeThread;
 };