Commit 2e7efcd5 authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

erasers performance: pragmas

parent 0fc1a4df
...@@ -768,15 +768,21 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth) ...@@ -768,15 +768,21 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
itemPainterPath.addPolygon(pi->sceneTransform().map(pi->polygon())); itemPainterPath.addPolygon(pi->sceneTransform().map(pi->polygon()));
if (eraserPath.contains(itemPainterPath)) if (eraserPath.contains(itemPainterPath))
{ {
// Compele remove item #pragma omp critical
intersectedItems << pi; {
intersectedPolygons << QPolygonF(); // Compele remove item
intersectedItems << pi;
intersectedPolygons << QPolygonF();
}
} }
else if (eraserPath.intersects(itemPainterPath)) else if (eraserPath.intersects(itemPainterPath))
{ {
QPainterPath newPath = itemPainterPath.subtracted(eraserPath); QPainterPath newPath = itemPainterPath.subtracted(eraserPath);
intersectedItems << pi; #pragma omp critical
intersectedPolygons << newPath.simplified().toFillPolygon(pi->sceneTransform().inverted()); {
intersectedItems << pi;
intersectedPolygons << newPath.simplified().toFillPolygon(pi->sceneTransform().inverted());
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment