Merge "Fix for the cursor position with the arabic script." into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / renderer-factory-cache.h
index 2dbcd7a..8d5b18e 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_RENDERER_FACTORY_CACHE_H__
-#define __DALI_TOOLKIT_RENDERER_FACTORY_CACHE_H__
+#ifndef DALI_TOOLKIT_RENDERER_FACTORY_CACHE_H
+#define DALI_TOOLKIT_RENDERER_FACTORY_CACHE_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
  * limitations under the License.
  */
 
-#include <map>
+// 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>
-#include <dali/devel-api/rendering/geometry.h>
-#include <dali/devel-api/rendering/shader.h>
-#include <dali/devel-api/rendering/renderer.h>
+#include <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/rendering/renderer.h>
+#include <dali/public-api/rendering/shader.h>
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/devel-api/object/weak-handle.h>
 
@@ -113,6 +115,13 @@ public:
    */
   static Geometry CreateQuadGeometry();
 
+  /**
+   * Create the grid geometry.
+   * @param[in] gridSize The size of the grid.
+   * @return The created grid geometry.
+   */
+  static Geometry CreateGridGeometry( Uint16Pair gridSize );
+
 public:
 
   /**
@@ -152,6 +161,19 @@ public:
    */
   Renderer GetDebugRenderer();
 
+  /**
+   * Get the SVG rasterization thread.
+   * @return A pointer pointing to the SVG rasterization thread.
+   */
+  SvgRasterizeThread* GetSVGRasterizationThread();
+
+private: // for svg rasterization thread
+
+  /**
+   * Applies the rasterized image to material
+   */
+  void ApplyRasterizedSVGToSampler();
+
 protected:
 
   /**
@@ -192,9 +214,6 @@ private:
   int FindRenderer( const std::string& key ) const;
 
 private:
-  // ToDo: test whether using the WeakHandle could improve the performance
-  //       With WeakHandle, the resource would be released automatically when no control is using it
-
   Geometry mGeometry[GEOMETRY_TYPE_MAX+1];
   Shader mShader[SHADER_TYPE_MAX+1];
 
@@ -202,6 +221,8 @@ private:
   CachedRenderers mRenderers;
 
   Renderer mDebugRenderer;
+
+  SvgRasterizeThread*  mSvgRasterizeThread;
 };
 
 } // namespace Internal
@@ -210,4 +231,4 @@ private:
 
 } // namespace Dali
 
-#endif /*__DALI_TOOLKIT_RENDERER_FACTORY_CACHE_H__ */
+#endif // DALI_TOOLKIT_RENDERER_FACTORY_CACHE_H