From: Hermet Park Date: Mon, 19 Jul 2021 11:32:31 +0000 (+0900) Subject: common saver: change to instance based for future sync/async behavior. X-Git-Tag: accepted/tizen/unified/20210727.124506~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5628e074a51c4c9850c7d2dfb0fbb339109fb23a;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git common saver: change to instance based for future sync/async behavior. reserve sync() method TODO --- diff --git a/inc/thorvg.h b/inc/thorvg.h index e172570..48380b0 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -1403,9 +1403,11 @@ public: * @retval Result::MemoryCorruption When casting in the internal function implementation failed. * @retval Result::Unknown Others. * - * @BETA_API */ - static Result save(std::unique_ptr paint, const std::string& path) noexcept; + Result save(std::unique_ptr paint, const std::string& path) noexcept; + Result sync() noexcept; + + static std::unique_ptr gen() noexcept; _TVG_DECLARE_PRIVATE(Saver); }; diff --git a/src/examples/images/test.tvg b/src/examples/images/test.tvg index 3deaea6..9fcda9e 100644 Binary files a/src/examples/images/test.tvg and b/src/examples/images/test.tvg differ diff --git a/src/lib/tvgSaver.cpp b/src/lib/tvgSaver.cpp index 761c571..1768ca4 100644 --- a/src/lib/tvgSaver.cpp +++ b/src/lib/tvgSaver.cpp @@ -59,3 +59,16 @@ Result Saver::save(std::unique_ptr paint, const std::string& path) noexce delete p; return Result::Unknown; } + + +Result Saver::sync() noexcept +{ + //TODO: + return Result::Success; +} + + +unique_ptr Saver::gen() noexcept +{ + return unique_ptr(new Saver); +} \ No newline at end of file