X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fsvg%2Fsvg-visual.h;h=2ccd337556feee032957c5d088861123cd3e2f55;hp=9dd680766f8eb7cfa4c8d6da60ed9a18339692fb;hb=HEAD;hpb=5e568632fb11fd797309ccd61d4fcae784de91a0 diff --git a/dali-toolkit/internal/visuals/svg/svg-visual.h b/dali-toolkit/internal/visuals/svg/svg-visual.h index 9dd6807..faf8a22 100644 --- a/dali-toolkit/internal/visuals/svg/svg-visual.h +++ b/dali-toolkit/internal/visuals/svg/svg-visual.h @@ -25,6 +25,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali { @@ -72,9 +73,10 @@ public: * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object * @param[in] shaderFactory The ImageVisualShaderFactory object * @param[in] imageUrl The URL to svg resource to use + * @param[in] size The width and height of the rasterized buffer. The visual size will be used if these are 0. * @return A smart-pointer to the newly allocated visual. */ - static SvgVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl); + static SvgVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, ImageDimensions size = ImageDimensions()); public: // from Visual /** @@ -104,8 +106,9 @@ protected: * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object * @param[in] shaderFactory The ImageVisualShaderFactory object * @param[in] imageUrl The URL to svg resource to use + * @param[in] size The width and height of the rasterized buffer. The visual size will be used if these are 0. */ - SvgVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl); + SvgVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, ImageDimensions size); /** * @brief A reference counted object may only be deleted by calling Unreference(). @@ -151,10 +154,9 @@ public: /** * @bried Apply the rasterized image to the visual. * - * @param[in] rasterizedPixelData The pixel buffer with the rasterized pixels - * @param[in] bool Whether the resource is loaded + * @param[in] task SvgTaskPtr */ - void ApplyRasterizedImage(PixelData rasterizedPixelData, bool isLoaded); + void ApplyRasterizedImage(SvgTaskPtr task); private: /** @@ -186,6 +188,9 @@ private: uint32_t mDefaultHeight; WeakHandle mPlacementActor; Vector2 mRasterizedSize; + Dali::ImageDimensions mDesiredSize{}; + SvgTaskPtr mLoadingTask; + SvgTaskPtr mRasterizingTask; bool mLoadFailed; bool mAttemptAtlasing; ///< If true will attempt atlasing, otherwise create unique texture };