From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs canvas support Date: Thu, 30 Apr 2020 10:37:03 -0400 Message-ID: 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> <831ro5xezy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="77402"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 30 16:38:10 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 1jUAKH-000K3f-5X for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 16:38:09 +0200 Original-Received: from localhost ([::1]:58966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUAKG-0003u0-22 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 10:38:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34020) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUAJK-0002XR-F3 for emacs-devel@gnu.org; Thu, 30 Apr 2020 10:37:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUAJJ-0007dx-P0 for emacs-devel@gnu.org; Thu, 30 Apr 2020 10:37:09 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUAJI-0007dd-Cm; Thu, 30 Apr 2020 10:37:08 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A92258145D; Thu, 30 Apr 2020 10:37:06 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0E32D80D7C; Thu, 30 Apr 2020 10:37:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1588257425; bh=EF+lMYPHYyhiN3QbPkz2Un4GnCsc1HEDwicwFGbFfg4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CNtYzv1ZvhKNaEUxVwk2ICEWGINiU4B3wB5m1qMYdiM/7k5N59hj65FbWHRlxYZOk j3+LhntbXUola3GlVJKluckrpzZanRVjl7Rlz3/HSAYC9edT/HTt5moYgczWMIijaf KP6gYhPb/IEMBQi0Lj3aA/jcFuq2JtNXeBbYSsDOsjd1iFbiVo0FQ7/5Sw27Gl5ZKp gn/w5H9Og6kzOHd1MYUfGLcvSLPsV0LsqTdxWupYSV0trVybMD6QSVOkCpvWZlP7At yDJcgM9Sn8S/X+u1UlW2Eibp4TOxr+v7J2ujmKLkXvZpJ1ntcluDc8LFWxQ47u6i44 pjNjsLRclCX6Q== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BF2EB1206C2; Thu, 30 Apr 2020 10:37:04 -0400 (EDT) In-Reply-To: <831ro5xezy.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 30 Apr 2020 16:46:57 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/30 10:26:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:248241 Archived-At: >> I think it would make more sense to treat the overlaid canvas as >> a completely separate pixmap: when we get an request to redraw >> a particular area of the screen, we'd ask the current redisplay code to >> redraw the corresponding text content and then we'd ask the canvas code >> to draw on top of it. > > Unfortunately, most redisplay cycles don't start from a request to > redraw a particular area of the screen. I don't think it makes a big difference. Upon redisplay, the glyph-matrix layer will compute which parts of the window needs updates in the that layer (exactly like it currently does), and the canvas will do its own computation of which part of it needs updating (presumably this will be handled by the external canvas library such as Cairo's rather than by Emacs's own code) and then the compositing layer will figure out how to combine those two changes. IIUC libraries like Cairo already provide functionality to do compositing of layers, so that would take care of that part as well. Stefan