X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-factory-cache.h;h=0b77e535321d4722e2f1347a7c6410942a223da8;hp=488be155466bdb94abcb93a677339d08f7c44856;hb=83066ea18044c04fbbf0378aa6863416c532e10b;hpb=cc0aefb3259c6fe818d9949ebf768843cc01e6fd diff --git a/dali-toolkit/internal/visuals/visual-factory-cache.h b/dali-toolkit/internal/visuals/visual-factory-cache.h index 488be15..0b77e53 100644 --- a/dali-toolkit/internal/visuals/visual-factory-cache.h +++ b/dali-toolkit/internal/visuals/visual-factory-cache.h @@ -17,9 +17,6 @@ * limitations under the License. */ -// INTERNAL INCLUDES -#include "svg/svg-rasterize-thread.h" - // EXTERNAL INCLUDES #include #include @@ -29,6 +26,9 @@ #include #include +// INTERNAL INCLUDES +#include +#include namespace Dali { @@ -39,6 +39,11 @@ namespace Toolkit namespace Internal { +class ImageAtlasManager; +typedef IntrusivePtr ImageAtlasManagerPtr; + +class NPatchLoader; + /** * Caches shaders and geometries. Owned by VisualFactory. */ @@ -59,6 +64,9 @@ 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 @@ -122,6 +130,19 @@ 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. + */ + static Image GetBrokenVisualImage(); + public: /** @@ -152,18 +173,30 @@ public: bool CleanRendererCache( const std::string& key ); /** - * @brief Cache the debug renderer + * @brief Cache the wireframe renderer + */ + void CacheWireframeRenderer( Renderer& renderer ); + + /** + * @brief Request the wireframe renderer; */ - void CacheDebugRenderer( Renderer& renderer ); + Renderer GetWireframeRenderer(); /** - * @brief Request the debug renderer; + * Get the image atlas manager. + * @return A pointer to the atlas manager */ - Renderer GetDebugRenderer(); + ImageAtlasManagerPtr GetAtlasManager(); + + /** + * Get the N-Patch texture cache. + * @return A reference to the N patch loader + */ + 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(); @@ -220,7 +253,10 @@ private: HashVector mRendererHashes; CachedRenderers mRenderers; - Renderer mDebugRenderer; + Renderer mWireframeRenderer; + + ImageAtlasManagerPtr mAtlasManager; + NPatchLoader mNPatchLoader; SvgRasterizeThread* mSvgRasterizeThread; };