Reverted simplifying brush strokes, since it decreases performance while drawing the stroke
This commit is contained in:
parent
8c17eeb507
commit
73fde8beb7
1 changed files with 3 additions and 10 deletions
|
|
@ -212,12 +212,8 @@ void DrawBrushStroke::create_triangles(const std::function<bool(Vector2f, Vector
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pointsN.size() < 2) {
|
if(pointsN.size() < 2) {
|
||||||
if(bPath && !topPoints.empty()) {
|
if(bPath && !topPoints.empty())
|
||||||
SkPath newPath;
|
bPath->addPoly(topPoints.data(), topPoints.size(), false);
|
||||||
newPath.addPoly(topPoints.data(), topPoints.size(), false);
|
|
||||||
if(!Simplify(newPath, bPath.get()))
|
|
||||||
*bPath = newPath;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -365,10 +361,7 @@ void DrawBrushStroke::create_triangles(const std::function<bool(Vector2f, Vector
|
||||||
|
|
||||||
if(bPath && !topPoints.empty()) {
|
if(bPath && !topPoints.empty()) {
|
||||||
topPoints.insert(topPoints.begin(), bottomPoints.rbegin(), bottomPoints.rend());
|
topPoints.insert(topPoints.begin(), bottomPoints.rbegin(), bottomPoints.rend());
|
||||||
SkPath newPath;
|
bPath->addPoly(topPoints.data(), topPoints.size(), false);
|
||||||
newPath.addPoly(topPoints.data(), topPoints.size(), true);
|
|
||||||
if(!Simplify(newPath, bPath.get()))
|
|
||||||
*bPath = newPath;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue