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#67794: 30.0.50; mouse-face is not respected on SVG images Date: Tue, 19 Dec 2023 15:40:47 +0200 Message-ID: <835y0uia3k.fsf@gnu.org> References: <838r5yroyp.fsf@gnu.org> <87v8920xlb.fsf@ledu-giraud.fr> <835y12rle4.fsf@gnu.org> <87bkatgnj6.fsf@ledu-giraud.fr> <83plz9qgsb.fsf@gnu.org> <877clh868o.fsf@ledu-giraud.fr> <83jzphqeto.fsf@gnu.org> <87frzzai4h.fsf@ledu-giraud.fr> <87il4v8iim.fsf@ledu-giraud.fr> <87msu6tl80.fsf@ledu-giraud.fr> <83cyv2ibtr.fsf@gnu.org> <87il4utjg0.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12346"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 67794@debbugs.gnu.org, alan@idiocy.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 19 14:42:10 2023 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 1rFaMM-0002zu-2g for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Dec 2023 14:42:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFaMC-0006B7-Uz; Tue, 19 Dec 2023 08:42:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFaMB-0006At-Lr for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 08:41:59 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rFaMB-0008E7-7U for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 08:41:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFaMD-0006UR-OQ for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 08:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Dec 2023 13:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67794 X-GNU-PR-Package: emacs Original-Received: via spool by 67794-submit@debbugs.gnu.org id=B67794.170299327724886 (code B ref 67794); Tue, 19 Dec 2023 13:42:01 +0000 Original-Received: (at 67794) by debbugs.gnu.org; 19 Dec 2023 13:41:17 +0000 Original-Received: from localhost ([127.0.0.1]:34647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFaLU-0006TK-TG for submit@debbugs.gnu.org; Tue, 19 Dec 2023 08:41:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFaLS-0006T4-PX for 67794@debbugs.gnu.org; Tue, 19 Dec 2023 08:41:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFaLK-0008B4-Do; Tue, 19 Dec 2023 08:41:06 -0500 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=S0q1wF/TIrxpJ2vfftJ/DM3MfU94D6C6716FPcHO5LI=; b=d5YpRkJ470Ah tM8c9ZYpgU0VB1DoezA2HRl+/izcdYu7IOZBpVPZN6EKBdIwzP/yJoBo7/WBrhc5XwHChRMhlZE30 jTUWFmzvFfdcXEtpoJKdWTJLQJgaLs5eZFL01/d8W/wW7WeP/fiQhHHSTCSiVUeFqth5FlqHLtYnM V3bF71ASXvvw8r4paoTMVK5BV0F4GiIbJrIyf7yQNDros8hkw4STLyZO5tS6q1O+vK+gXHINDhFpS 6I5P+jnINfmmPKRCCYgs3wbwg10rGc+2me5RAEUvkmi26cFe8qtbSVSgQUXJEXWqes8sqFO4IQ3O+ T/WL3SB+t176b5NAR95+XQ==; In-Reply-To: <87il4utjg0.fsf@ledu-giraud.fr> (message from Manuel Giraud on Tue, 19 Dec 2023 14:23:27 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276519 Archived-At: > From: Manuel Giraud > Cc: alan@idiocy.org, gerd.moellmann@gmail.com, 67794@debbugs.gnu.org > Date: Tue, 19 Dec 2023 14:23:27 +0100 > > Eli Zaretskii writes: > > >> From: Manuel Giraud > >> Cc: Eli Zaretskii , gerd.moellmann@gmail.com, > >> 67794@debbugs.gnu.org > >> Date: Tue, 19 Dec 2023 13:45:03 +0100 > >> > >> > I believe that we need to do some final set-up for the image under > >> > X/GTK/whatever and it looks as though this is all that's needed: > >> > > >> > id = lookup_image (f, s->img->spec, hlinfo->mouse_face_face_id); > >> > s->img = IMAGE_FROM_ID (f, id); > >> > prepare_image_for_display (f, s->img); <------ > >> > > >> > Under X we need to send the image to the X server, and under Cairo it > >> > does some other stuff. That's what prepare_image_for_display does. It > >> > does nothing under NS, so the image worked fine under GNUstep. > >> > >> Thank you Alan! That does the trick. So here is an updated version of > >> the patch that works with XRender (i'll test with cairo). > > > > With this change, if you move the mouse pointer on and off the image > > several times, what happens to the Emacs memory footprint? > > Specifically, how many times is memory allocated for the SVG image, > > and if it's allocated each time, does it ever get deallocated? > > I didn't measure this memory footprint but AFAIU lookup_image uses the > image cache so an image is allocated once (for one foreground/background > combination). And I think that there is an eviction timeout in the > image cache, no? I know the theory, thank you, but I wanted to make sure there isn't something that doesn't meet the eye here. Before we install this, we had better be sure we understand the consequences, since we have never before done anything like that in mouse-highlight implementation. OK?