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 08:08:59 -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> <87zhat1js9.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="74736"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , tomas@tuxteam.de, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 30 14:33:57 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 1jU8O5-000JJu-Ko for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 14:33:57 +0200 Original-Received: from localhost ([::1]:43398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU8O4-0002IR-NE for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 08:33:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38718) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU8Ma-0001Mf-Bh for emacs-devel@gnu.org; Thu, 30 Apr 2020 08:32:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jU8MZ-0006fV-Kb for emacs-devel@gnu.org; Thu, 30 Apr 2020 08:32:23 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:29065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jU7zz-0008T4-BB; Thu, 30 Apr 2020 08:09:03 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 34BC680063; Thu, 30 Apr 2020 08:09:02 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 919D480D7C; Thu, 30 Apr 2020 08:09:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1588248540; bh=3+MLyEV8LSshRNQueBwIs4vvRtdpDXXWqb8UXnPYcfg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lsQa/3loUbcdlwiaOVaLatrQzFV5ZzdapDQiWMoFnWFXox8Xa1Rofif0/3J8OohUL QBEVEkYbSnGG6kQXlzcrHql09AkWE/jnqZJZ3ExCbqe+K6W1x/srgMa1CjLM4pxvGk RzOddKxVvBkzfHbWUrxtjSkbD05RF8IhnyL7nQD2IVoMdPc7ikeLsSAgCXSeU7FABr oYLWg3nO8YRDE/uUvKbhecVlMOBXkFOJ/3ycdwQzSu4gyiasbQSVmvsROz9S3Kry/e 5n1nUaDXOXjqK85ydQlGbhy5+AvmeAEvMMJwFipIE2agTRHFKN4I8L8dgG5F5BJd7c /yiAqWFNpQF6Q== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 468FC12053C; Thu, 30 Apr 2020 08:09:00 -0400 (EDT) In-Reply-To: <87zhat1js9.fsf@yahoo.com> (Po Lu's message of "Thu, 30 Apr 2020 16:04:38 +0800") 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 08:03:38 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:248225 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. So for rendering of the canvas code we don't need >> to know which part of the canvas cover which characters, we just render >> the glyph matrix into a pixmap, render the canvas into another pixmap >> and then combine them onto the screen. > > That's what I'm trying to do right now, but so far keeping track of > exactly where each canvas is displayed on the screen seems to be > difficult. I was thinking of having just one canvas per (Emacs) window. > I'd appreciate some suggestions, thanks. I can help with type system and compiler design. But I have no practical experience with graphical APIs, sadly. Stefan