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.devel Subject: Re: master 5141234acf: Refactor the webp cache code to allow usage by gif_load, too Date: Mon, 11 Apr 2022 16:29:33 +0300 Message-ID: <83mtgr694y.fsf@gnu.org> References: <164967696186.12152.11548736665906939483@vcs2.savannah.gnu.org> <20220411113602.7A114C0581E@vcs2.savannah.gnu.org> <87bkx73jfz.fsf@yahoo.com> <83r16369xx.fsf@gnu.org> <875ynf21n0.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 11 15:30:50 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ndu82-0002Ad-Br for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Apr 2022 15:30:50 +0200 Original-Received: from localhost ([::1]:49382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndu80-00066H-Ro for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Apr 2022 09:30:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndu6m-0003m8-6z for emacs-devel@gnu.org; Mon, 11 Apr 2022 09:29:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndu6l-0000Jl-R3; Mon, 11 Apr 2022 09:29:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Olw4aPxi/4ZlIXFAqc7gbdW/uL3wvHwausC+ZCPZo60=; b=a+TXEeYlP49X Bm/cpjULEi0F58y31tMz/eqcd8SZaor3MDocr8i4EndGfnguIY6G9K4dy7Yzh22b3aCgtNuL6/ecx iTyIF38tWtpQmGauArsRLlfHVlYDw+b8YFloXJtpqdg/epivj3B88qlQCv1Jygme4fdiup+wgDkTi waaWIefNs2pn3d0VoeoNyWOQ2wgKMrlgmycG54FqmgXlu8QUc3iXPWjVBfFx+2oI6vG/0fdCUxtUZ 8bioVP973AwS10DyeN3Jhhbw7CKPC/DrW4LVuVMlJAXcbTUd/FO9sBKNMgobWMvg7tKgqKk1JTiAe S3QhTslFZuisYu5IgSL0Qw==; Original-Received: from [87.69.77.57] (port=1675 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndu6l-0007ax-8Q; Mon, 11 Apr 2022 09:29:31 -0400 In-Reply-To: <875ynf21n0.fsf@yahoo.com> (message from Po Lu on Mon, 11 Apr 2022 21:25:07 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288196 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org, larsi@gnus.org > Date: Mon, 11 Apr 2022 21:25:07 +0800 > > Eli Zaretskii writes: > > >> From: Po Lu > >> Cc: Lars Ingebrigtsen > >> Date: Mon, 11 Apr 2022 20:15:12 +0800 > >> > >> > + cache->spec = spec; > >> > >> I think this should be marked, since I don't see what protects the spec > >> from garbage collection otherwise. > > > > 'spec' here is img->spec, right? > > Right, but the animation cache can persist after img is gone, right? It can? Then how does this work: struct anim_cache* cache = anim_get_animation_cache (img->spec); We pass img->spec to look it up in the cache, don't we? And we use EQ to look it up, right?