From c964c85af8a3002eea8b2472446be96b36c32515 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Sat, 1 Apr 2023 17:21:41 +0200 Subject: [PATCH] picture: remove unnecessary reloads 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 --- src/lib/tvgPicture.cpp | 1 - src/lib/tvgPictureImpl.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/lib/tvgPicture.cpp b/src/lib/tvgPicture.cpp index 0af5430..2b1d0f5 100644 --- a/src/lib/tvgPicture.cpp +++ b/src/lib/tvgPicture.cpp @@ -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; diff --git a/src/lib/tvgPictureImpl.h b/src/lib/tvgPictureImpl.h index 4c9b2a1..781e72a 100644 --- a/src/lib/tvgPictureImpl.h +++ b/src/lib/tvgPictureImpl.h @@ -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; -- 2.7.4