#include <dali/public-api/rendering/texture-set.h>
#include <dali/devel-api/adaptor-framework/vector-image-renderer.h>
#include <dali/integration-api/adaptor-framework/log-factory-interface.h>
+#include <dali/integration-api/processor-interface.h>
#include <memory>
// INTERNAL INCLUDES
* @param[in] url The URL to svg resource to use.
* @param[in] width The rasterization width.
* @param[in] height The rasterization height.
- * @param[in] loaded The svg resource is loaded or not.
*/
- RasterizingTask( SvgVisual* svgRenderer, VectorImageRenderer vectorRenderer, const VisualUrl& url, float dpi, unsigned int width, unsigned int height, bool loaded );
+ RasterizingTask(SvgVisual* svgRenderer, VectorImageRenderer vectorRenderer, const VisualUrl& url, float dpi, unsigned int width, unsigned int height);
/**
* Destructor.
float mDpi;
unsigned int mWidth;
unsigned int mHeight;
- bool mLoaded;
+ bool mLoadSuccess;
};
/**
* The worker thread for SVG rasterization.
*/
-class SvgRasterizeThread : public Thread
+class SvgRasterizeThread : public Thread, Integration::Processor
{
public:
*
* @param[in] trigger The trigger to wake up the main thread.
*/
- SvgRasterizeThread( EventThreadCallback* trigger );
+ SvgRasterizeThread();
/**
* Terminate the svg rasterize thread, join and delete.
*/
void DeleteImage( VectorImageRenderer vectorImage );
+ /**
+ * @copydoc Dali::Integration::Processor::Process()
+ */
+ void Process() override;
+
private:
/**
*/
void AddCompletedTask( RasterizingTaskPtr task );
+ /**
+ * Applies the rasterized image to material
+ */
+ void ApplyRasterizedSVGToSampler();
+
+ /**
+ * @brief Unregister a previously registered processor
+ *
+ */
+ void UnregisterProcessor();
+
protected:
/**
std::unique_ptr< EventThreadCallback > mTrigger;
const Dali::LogFactoryInterface& mLogFactory;
bool mIsThreadWaiting;
+ bool mProcessorRegistered;
};
} // namespace Internal