namespace Internal
{
+class ImageVisualShaderFactory;
class ImageVisual;
typedef IntrusivePtr< ImageVisual > ImageVisualPtr;
* The visual will load the Image asynchronously when the associated actor is put on stage, and destroy the image when it is off stage
*
* @param[in] factoryCache The VisualFactoryCache object
+ * @param[in] shaderFactory The ImageVisualShaderFactory object
* @param[in] imageUrl The URL of the image resource to use
* @param[in] properties A Property::Map containing settings for this visual
* @param[in] size The width and height to fit the loaded image to.
* @return A smart-pointer to the newly allocated visual.
*/
static ImageVisualPtr New( VisualFactoryCache& factoryCache,
+ ImageVisualShaderFactory& shaderFactory,
const VisualUrl& imageUrl,
const Property::Map& properties,
ImageDimensions size = ImageDimensions(),
* The visual will load the Image asynchronously when the associated actor is put on stage, and destroy the image when it is off stage
*
* @param[in] factoryCache The VisualFactoryCache object
+ * @param[in] shaderFactory The ImageVisualShaderFactory object
* @param[in] imageUrl The URL of the image resource to use
* @param[in] size The width and height to fit the loaded image to.
* @param[in] fittingMode The FittingMode of the resource to load
* @return A smart-pointer to the newly allocated visual.
*/
static ImageVisualPtr New( VisualFactoryCache& factoryCache,
+ ImageVisualShaderFactory& shaderFactory,
const VisualUrl& imageUrl,
ImageDimensions size = ImageDimensions(),
FittingMode::Type fittingMode = FittingMode::DEFAULT,
* @brief Create a new image visual with an Image type.
*
* @param[in] factoryCache The VisualFactoryCache object
+ * @param[in] shaderFactory The ImageVisualShaderFactory object
* @param[in] image The image to use
*/
- static ImageVisualPtr New( VisualFactoryCache& factoryCache, const Image& image );
+ static ImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Image& image );
public: // from Visual
* The visual will load the Image asynchronously when the associated actor is put on stage, and destroy the image when it is off stage
*
* @param[in] factoryCache The VisualFactoryCache object
+ * @param[in] shaderFactory The ImageVisualShaderFactory object
* @param[in] imageUrl The URL of the image resource to use
* @param[in] size The width and height to fit the loaded image to.
* @param[in] fittingMode The FittingMode of the resource to load
* @param[in] samplingMode The SamplingMode of the resource to load
*/
ImageVisual( VisualFactoryCache& factoryCache,
+ ImageVisualShaderFactory& shaderFactory,
const VisualUrl& imageUrl,
ImageDimensions size,
FittingMode::Type fittingMode,
* @brief Constructor with an Image type.
*
* @param[in] factoryCache The VisualFactoryCache object
+ * @param[in] shaderFactory The ImageVisualShaderFactory object
* @param[in] image The image to use
*/
- ImageVisual( VisualFactoryCache& factoryCache, const Image& image );
+ ImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Image& image );
/**
* @brief A reference counted object may only be deleted by calling Unreference().
public:
/**
- * Get the standard image rendering shader.
- * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
- * @param[in] atlasing Whether texture atlasing is applied.
- * @param[in] defaultTextureWrapping Whether the default texture wrap mode is applied.
- */
- static Shader GetImageShader( VisualFactoryCache& factoryCache, bool atlasing, bool defaultTextureWrapping );
-
- /**
* @copydoc AtlasUploadObserver::UploadCompleted
*
* To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
TextureManager::TextureId mTextureId;
TextureSet mTextures;
+ ImageVisualShaderFactory& mImageVisualShaderFactory;
+
Dali::FittingMode::Type mFittingMode:3;
Dali::SamplingMode::Type mSamplingMode:4;
Dali::WrapMode::Type mWrapModeU:3;