{
if (mFlag & (DirtyState::Path)) {
if (mStroke.enable) {
- VPath newPath = mPath;
if (mStroke.dashArraySize) {
VDasher dasher(mStroke.dashArray, mStroke.dashArraySize);
- newPath = dasher.dashed(mPath);
+ mPath = dasher.dashed(mPath);
}
mRleTask = VRaster::instance().generateStrokeInfo(
- newPath, std::move(mRle), mStroke.cap, mStroke.join, mStroke.width,
+ std::move(mPath), std::move(mRle), mStroke.cap, mStroke.join, mStroke.width,
mStroke.meterLimit);
} else {
- mRleTask = VRaster::instance().generateFillInfo(mPath, std::move(mRle), mFillRule);
+ mRleTask = VRaster::instance().generateFillInfo(std::move(mPath), std::move(mRle), mFillRule);
}
mFlag &= ~DirtyFlag(DirtyState::Path);
}
return receiver;
}
- std::future<VRle> strokeRle(const VPath &path, VRle &&rle, CapStyle cap, JoinStyle join,
+ std::future<VRle> strokeRle(const VPath &&path, VRle &&rle, CapStyle cap, JoinStyle join,
float width, float meterLimit)
{
RleTask *task = new RleTask();
task->stroke = true;
- task->path = path;
+ task->path = std::move(path);
task->rle = std::move(rle);
task->cap = cap;
task->join = join;
return async(task);
}
- std::future<VRle> fillRle(const VPath &path, VRle &&rle, FillRule fillRule)
+ std::future<VRle> fillRle(const VPath &&path, VRle &&rle, FillRule fillRule)
{
RleTask *task = new RleTask();
- task->path = path;
+ task->path = std::move(path);
task->rle = std::move(rle);
task->fillRule = fillRule;
task->stroke = false;
VRaster::~VRaster() {}
-std::future<VRle> VRaster::generateFillInfo(const VPath &path, VRle &&rle,
+std::future<VRle> VRaster::generateFillInfo(const VPath &&path, VRle &&rle,
FillRule fillRule)
{
if (path.isEmpty()) {
promise.set_value(VRle());
return promise.get_future();
}
- return raster_scheduler.fillRle(path, std::move(rle), fillRule);
+ return raster_scheduler.fillRle(std::move(path), std::move(rle), fillRule);
}
-std::future<VRle> VRaster::generateStrokeInfo(const VPath &path, VRle &&rle, CapStyle cap,
+std::future<VRle> VRaster::generateStrokeInfo(const VPath &&path, VRle &&rle, CapStyle cap,
JoinStyle join, float width,
float meterLimit)
{
promise.set_value(VRle());
return promise.get_future();
}
- return raster_scheduler.strokeRle(path, std::move(rle), cap, join, width, meterLimit);
+ return raster_scheduler.strokeRle(std::move(path), std::move(rle), cap, join, width, meterLimit);
}
V_END_NAMESPACE
VRaster &operator=(VRaster const &) = delete;
VRaster &operator=(VRaster &&) = delete;
- std::future<VRle> generateFillInfo(const VPath &path, VRle &&rle,
+ std::future<VRle> generateFillInfo(const VPath &&path, VRle &&rle,
FillRule fillRule = FillRule::Winding);
- std::future<VRle> generateStrokeInfo(const VPath &path, VRle &&rle, CapStyle cap,
+ std::future<VRle> generateStrokeInfo(const VPath &&path, VRle &&rle, CapStyle cap,
JoinStyle join, float width,
float meterLimit);