From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47895: 28.0.50; Emacs should only animate images that are visible Date: Sun, 02 May 2021 12:35:28 +0300 Message-ID: <83zgxd7a1r.fsf@gnu.org> References: <87r1j6m920.fsf@gnus.org> <8335vmrux2.fsf@gnu.org> <87mttum230.fsf@gnus.org> <83r1j5qd2x.fsf@gnu.org> <87v98ajj3k.fsf@gnus.org> <834kfukx2v.fsf@gnu.org> <87bla2ji7v.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22386"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47895@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 11:36:29 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ld8Wb-0005jM-8k for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 11:36:29 +0200 Original-Received: from localhost ([::1]:60034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ld8WZ-0007oA-W2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 05:36:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ld8WB-0007nz-Iv for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 05:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ld8WA-00054n-Im for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 05:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ld8WA-00072F-GG for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 05:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 May 2021 09:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47895 X-GNU-PR-Package: emacs Original-Received: via spool by 47895-submit@debbugs.gnu.org id=B47895.161994815627037 (code B ref 47895); Sun, 02 May 2021 09:36:02 +0000 Original-Received: (at 47895) by debbugs.gnu.org; 2 May 2021 09:35:56 +0000 Original-Received: from localhost ([127.0.0.1]:41838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ld8W3-000721-Mr for submit@debbugs.gnu.org; Sun, 02 May 2021 05:35:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ld8W1-00071u-Ui for 47895@debbugs.gnu.org; Sun, 02 May 2021 05:35:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58489) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ld8Vw-0004z1-MH; Sun, 02 May 2021 05:35:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3194 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ld8Vv-0007nV-TT; Sun, 02 May 2021 05:35:48 -0400 In-Reply-To: <87bla2ji7v.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 25 Apr 2021 21:07:48 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205417 Archived-At: > From: Lars Ingebrigtsen > Cc: 47895@debbugs.gnu.org > Date: Sun, 25 Apr 2021 21:07:48 +0200 > > > We access a different frame of the GIF image, so that would mean > > regenerating the pixmap for the image, no? > > It does, but why does that happen before redisplay has decided to > display the image? Because image-animate-timeout calls image-metadata (via image-multi-frame-p), which calls lookup_image, which regenerates the pixmap. > >> I'd keep interpreting that the same -- that is, count down, even if the > >> image isn't displayed. > > > > But then if and when the image becomes visible, it won't show the > > animation, because it already reached the LIMIT. Right? > > Yes. I think that's fine -- you've asked for X repetitions, and you get > X repetitions, whether it's shown or not. But no repetitions were actually displayed yet, so won't this be confusing? Shouldn't we start counting only when the image is actually visible? > > Animation doesn't work in redisplay, it works in this code I pointed > > to. > > The code just alters some elements in the image plist. It's unexpected > that this should lead to Emacs doing a lot of work -- unless it's > actually displaying the image. It's computing the image, see above.