From 2d2f8899ec3fa58710f677abae9a601dce5d3b87 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 20 Nov 2022 19:54:09 +0100 Subject: [PATCH] multiframe: Remove frame offset from updates The frame offsets were recently removed from the loader update callbacks and added in the infrastructure before calling the user update function. Now drop the frame offsets so that the update coordinates are relative to the frame, not the canvas. Should make things simpler in the end. --- src/lib/image.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/lib/image.c b/src/lib/image.c index 58fdfe6..19668c7 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -731,12 +731,6 @@ __imlib_LoadProgress(ImlibImage * im, int x, int y, int w, int h) lc->area += w * h; lc->pct = (100. * lc->area + .1) / (im->w * im->h); - if (im->pframe) - { - x += im->pframe->frame_x; - y += im->pframe->frame_y; - } - rc = !lc->progress(im, lc->pct, x, y, w, h); return rc; @@ -767,11 +761,6 @@ __imlib_LoadProgressRows(ImlibImage * im, int row, int nrows) pct = (100 * nrtot * (lc->pass + 1)) / (im->h * lc->n_pass); if (pct == 100 || pct >= lc->pct + lc->granularity) { - if (im->pframe) - { - col += im->pframe->frame_x; - row += im->pframe->frame_y; - } rc = !lc->progress(im, pct, col, row, im->w, nrows); lc->row = nrtot; lc->pct += lc->granularity;