picture: remove unnecessary reloads

After #1338 is applied there is no need to reload
the pictures while aksing about its viewbox or its size.
This commit is contained in:
Mira Grudzinska 2023-04-01 17:21:41 +02:00 committed by Hermet Park
parent c7137a8105
commit 7b90d61e71
2 changed files with 0 additions and 2 deletions

View 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;

View 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;