picture: remove unnecessary reloads 35/291435/1
authorMira Grudzinska <veleveta@gmail.com>
Sat, 1 Apr 2023 15:21:41 +0000 (17:21 +0200)
committerjykeon <jykeon@samsung.com>
Mon, 17 Apr 2023 03:13:28 +0000 (12:13 +0900)
After #1338 is applied there is no need to reload
the pictures while aksing about its viewbox or its size.

Change-Id: I63ec1899f6b4ee6bd44a6c21e8fedcf6ee192217
Signed-off-by: jykeon <jykeon@samsung.com>
src/lib/tvgPicture.cpp
src/lib/tvgPictureImpl.h

index 0af5430..2b1d0f5 100644 (file)
@@ -98,7 +98,6 @@ Result Picture::size(float w, float h) noexcept
 Result Picture::size(float* w, float* h) const noexcept
 {
     if (!pImpl->loader) return Result::InsufficientCondition;
-    pImpl->reload();
     if (w) *w = pImpl->w;
     if (h) *h = pImpl->h;
     return Result::Success;
index 4c9b2a1..781e72a 100644 (file)
@@ -162,7 +162,6 @@ struct Picture::Impl
     bool viewbox(float* x, float* y, float* w, float* h)
     {
         if (!loader) return false;
-        reload();
         if (x) *x = loader->vx;
         if (y) *y = loader->vy;
         if (w) *w = loader->vw;