Rework how progress bar shown with stamps

Was drawing progress bar while DRAWING stamps into the UI
(in https://sourceforge.net/p/tuxpaint/tuxpaint/ci/ad4bfde57c170082d93979a7073f7358872eca21/),
even if they were already loaded and thumbnailed.

Now only doing it when loading a new stamp.  Should hopefully
help with performance.  (h/t Pere for reporting slowness on Android)
This commit is contained in:
Bill Kendrick 2020-04-01 22:28:05 -07:00
parent 950ad369b9
commit b9c929a0a1
3 changed files with 5 additions and 4 deletions

View file

@ -6,7 +6,7 @@
Copyright 2002-2020 by various contributors; see AUTHORS.txt
http://www.tuxpaint.org/
June 14, 2002 - March 28, 2020
June 14, 2002 - April 1, 2020
----------------------------------------------------------------------

View file

@ -22,7 +22,7 @@ version
<p>June 14, 2002 -
March 28, 2020</p>
April 1, 2020</p>
</center>

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - March 15, 2020
June 14, 2002 - April 1, 2020
*/
@ -7236,6 +7236,8 @@ static void get_stamp_thumb(stamp_type * sd)
/* nope, see if there's a pre-rendered one we can use */
show_progress_bar(screen);
need_mirror = sd->mirrored;
need_flip = sd->flipped;
bigimg = NULL;
@ -8850,7 +8852,6 @@ static void draw_stamps(void)
for (stamp = stamp_scroll[stamp_group]; stamp < stamp_scroll[stamp_group] + max; stamp++)
{
i = stamp - stamp_scroll[stamp_group];
show_progress_bar(screen);
dest.x = ((i % 2) * 48) + (WINDOW_WIDTH - 96);
dest.y = ((i / 2) * 48) + 40 + off_y;