From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs canvas support Date: Sat, 02 May 2020 09:51:24 +0300 Message-ID: <834ksyvngz.fsf@gnu.org> References: <83o8raziis.fsf@gnu.org> <877dxy1smz.fsf@yahoo.com> <87o8rae0ao.fsf@randomsample> <83lfmexmfp.fsf@gnu.org> <20200429171619.GB20842@tuxteam.de> <83imhixkva.fsf@gnu.org> <20200429185128.GA27164@tuxteam.de> <83ees6xggr.fsf@gnu.org> <20200429190854.GC27164@tuxteam.de> <83a72uxffz.fsf@gnu.org> <20200429195930.GA29703@tuxteam.de> <87zhat1js9.fsf@yahoo.com> <83y2qdw01y.fsf@gnu.org> <87k11v1bjo.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="111002"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 08:52:04 2020 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 1jUm0K-000Smr-J8 for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 08:52:04 +0200 Original-Received: from localhost ([::1]:54544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUm0J-0006F8-Kt for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 02:52:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUlzr-0005VY-C9 for emacs-devel@gnu.org; Sat, 02 May 2020 02:51:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51380) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUlzq-0002HI-GU; Sat, 02 May 2020 02:51:34 -0400 Original-Received: from [176.228.60.248] (port=4811 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUlzq-0005FV-0G; Sat, 02 May 2020 02:51:34 -0400 In-Reply-To: <87k11v1bjo.fsf@yahoo.com> (message from Po Lu on Sat, 02 May 2020 07:27:07 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:248380 Archived-At: > From: Po Lu > Cc: tomas@tuxteam.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Sat, 02 May 2020 07:27:07 +0800 > > Eli Zaretskii writes: > > > I think the information needs to be recorded in the glyph structure > > that represents a canvas. > > I have a canvas field inside `struct glyph' that points to the canvas > object. It is not a good idea to have pointers in the glyph structure. (Yes, xwidget uses that, but don't take example from that, please.) A glyph should be self-describing from the metrics POV. If you need additional information (beyond the basic metrics), use the example of images and faces: we cache the objects and record their cache ID in the glyph. > What I'm trying to do right now is track the position of the > canvases on-screen, so I can draw them separately from redisplay. My suggestion is not to "draw separately from redisplay". I don't see how this could work, unless you also modify extensively how the second phase of redisplay, the one entered via update_frame and update_window, works.