Reverted simplifying brush strokes, since it decreases performance while drawing the stroke

This commit is contained in:
Yousef Khadadeh 2025-08-25 20:34:02 +03:00
parent 8c17eeb507
commit 73fde8beb7

View file

@ -212,12 +212,8 @@ void DrawBrushStroke::create_triangles(const std::function<bool(Vector2f, Vector
}
if(pointsN.size() < 2) {
if(bPath && !topPoints.empty()) {
SkPath newPath;
newPath.addPoly(topPoints.data(), topPoints.size(), false);
if(!Simplify(newPath, bPath.get()))
*bPath = newPath;
}
if(bPath && !topPoints.empty())
bPath->addPoly(topPoints.data(), topPoints.size(), false);
return;
}
@ -365,10 +361,7 @@ void DrawBrushStroke::create_triangles(const std::function<bool(Vector2f, Vector
if(bPath && !topPoints.empty()) {
topPoints.insert(topPoints.begin(), bottomPoints.rbegin(), bottomPoints.rend());
SkPath newPath;
newPath.addPoly(topPoints.data(), topPoints.size(), true);
if(!Simplify(newPath, bPath.get()))
*bPath = newPath;
bPath->addPoly(topPoints.data(), topPoints.size(), false);
}
}