diff --git a/src/lib/tvgShape.cpp b/src/lib/tvgShape.cpp index e4cfb9e5..40b80ee4 100644 --- a/src/lib/tvgShape.cpp +++ b/src/lib/tvgShape.cpp @@ -52,7 +52,8 @@ unique_ptr Shape::gen() noexcept Result Shape::reset() noexcept { - pImpl->reset(); + pImpl->path.reset(); + pImpl->flag = RenderUpdateFlag::Path; return Result::Success; } diff --git a/src/lib/tvgShapeImpl.h b/src/lib/tvgShapeImpl.h index 2281ea0b..4bc5f618 100644 --- a/src/lib/tvgShapeImpl.h +++ b/src/lib/tvgShapeImpl.h @@ -352,24 +352,6 @@ struct Shape::Impl return true; } - void reset() - { - path.reset(); - - if (fill) { - delete(fill); - fill = nullptr; - } - if (stroke) { - delete(stroke); - stroke = nullptr; - } - - color[0] = color[1] = color[2] = color[3] = 0; - - flag = RenderUpdateFlag::All; - } - Paint* duplicate() { auto ret = Shape::gen();