From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Emacs canvas support Date: Thu, 30 Apr 2020 15:52:56 +0200 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> <834kt1xfm7.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="87170"; 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:15: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 1jU9xu-000MUz-2d for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 16:15:02 +0200 Original-Received: from localhost ([::1]:44000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU9xs-0001Hx-Vb for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 10:15:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52038) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU9cf-0007sm-Nv for emacs-devel@gnu.org; Thu, 30 Apr 2020 09:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jU9cd-0004wJ-3J for emacs-devel@gnu.org; Thu, 30 Apr 2020 09:53:05 -0400 Original-Received: from mail-db8eur05olkn2048.outbound.protection.outlook.com ([40.92.89.48]:24929 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jU9cc-0004vq-FQ; Thu, 30 Apr 2020 09:53:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d1YigQHlXiAZJJP5k4in0SRmED+GO5qwic8b/KuZBctpxb3oJnwQvXwVshA5E0nT5F1IcBYKAZkD2PWI04SbSRenZaRmzW1uSL82kzk0a9vv89zUyCwmKufeZIKoeg0ENFGQAFkGDO11Pt1hrcGdJ0VzrfiCiU06yPZmeGQp2TEfECLf9/+qB5PVAYDwK5x6D7kUOQ5PaetvND9+b4jsuZxP4rM9dy3RBDTzd6z/0ivIZwWpzG8gcSHMZ3pBe+ACIWW998ZOmoLNiPvQkngC1XZe8U838HXnFAInWIKOUw+7O6KT/wHjRJg0pR+Sg8nOfsb5yPG/LFfuB+kH+PeHMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QyEsPh3LJymHqI/NWbdAWjJSZtSA2I/qxoXwSwvt64M=; b=HjRjJRbz7y93tEgcClYT8ymBhKGyQdhWScPNpAOTUJEGMkxM2rr0+iMLLDbGWKnmyz7MYIGASHe41WbI1DZjvSj3myg6d6wkFtmxtW+uQrU1+B+XMrrTqr6aCymN+kyH4YZdQC/XJ0QlEoyWiJesF0Lr4v6i5SnucsrToEZ7XteQGo6W3s91nj2ZA0HA4KbSb9zDN4eLMUO8AZHsKjEJ+e6WxrebTQqrcGEQEGwoxAa1By0msX7c9LHfoWF5CPU+mMfHRBtHOkvp5MWVugyol4mt4o7dUREALrPDlOr7X+mAFbDmUTe/ukAtCQpNg2fCi0ka45+uMw6XSYTQHi40KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=live.com; dmarc=pass action=none header.from=live.com; dkim=pass header.d=live.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QyEsPh3LJymHqI/NWbdAWjJSZtSA2I/qxoXwSwvt64M=; b=N2Sxbryiu/Vnb+kEfXXaAZAeEdVIcl7U+bHnKJ2wiSnjD6E0gBHggA24E7vx3nvTmKRKoc7jQr2bn6CD1mqWy+SPr5N0jhsgjsJsOmMugdW2TqA/xN3EqrOEDDhjx34XIPbtJeMXst8Wshn5X6rsLCdbTnNxZ63td5rZFOevmP8pG6uPcnQy5jb14eb9vVQcsFyOeoWyzpADE8oJIuFhkVih8KMm06Wo/gkep3sfnmZ9yfyZQ79Sm85FUFFQaBqt1TgN2KYr9s5Tb89pBrNdjUYi4BX+3bFxc5d/kvwb7VeoZzogNMGulQ2+KN9ZXlSNul6IsEwu89d9iuJV0LPrHQ== Original-Received: from DB8EUR05FT014.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::47) by DB8EUR05HT005.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.15; Thu, 30 Apr 2020 13:52:57 +0000 Original-Received: from AM0PR06MB6420.eurprd06.prod.outlook.com (2a01:111:e400:fc0f::40) by DB8EUR05FT014.mail.protection.outlook.com (2a01:111:e400:fc0f::247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.24 via Frontend Transport; Thu, 30 Apr 2020 13:52:57 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:B1460D914608BEE272E649A0114FED77C07A8FB24A3A5D0494B179112606E373; UpperCasedChecksum:751D70F3DAA040AB591C0CA1F455BA3C480CC67CE02F8BDAA8D78E6038C0EB84; SizeAsReceived:7820; Count:48 Original-Received: from AM0PR06MB6420.eurprd06.prod.outlook.com ([fe80::849f:536a:6aab:16]) by AM0PR06MB6420.eurprd06.prod.outlook.com ([fe80::849f:536a:6aab:16%5]) with mapi id 15.20.2937.020; Thu, 30 Apr 2020 13:52:57 +0000 In-Reply-To: <834kt1xfm7.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 30 Apr 2020 16:33:36 +0300") X-ClientProxiedBy: AM6PR0202CA0065.eurprd02.prod.outlook.com (2603:10a6:20b:3a::42) To AM0PR06MB6420.eurprd06.prod.outlook.com (2603:10a6:208:1a2::19) X-Microsoft-Original-Message-ID: <87pnbpqdvr.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR0202CA0065.eurprd02.prod.outlook.com (2603:10a6:20b:3a::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Thu, 30 Apr 2020 13:52:57 +0000 X-Microsoft-Original-Message-ID: <87pnbpqdvr.fsf@live.com> X-TMN: [swoGMATUkgm3gumMGk/zg39vKvZ8VQNI] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 0a12dd94-b790-42a3-0ad8-08d7ed0dc9cd X-MS-TrafficTypeDiagnostic: DB8EUR05HT005: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WzJQLPlTD/M38qPgZhz7SzKmDdbdu6FY+i6sENjKGdrcdSGFadpkkT2xKHjUDZKV8eYC7bbBVWQ2AAAocWa9Fz1HN98ibPqxhAgVIQwOQuP8tacH8Ey50QnfHlqfY1XRxaka8x4IaKaWw0P8+my0VGQuM+RLkPz2CDjHRr45ojtR4yxAKhuoRySd9aWT8bh7YcD0+NgN3+EFJ3qNnAJHrw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR06MB6420.eurprd06.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: AOFOIU0qF3ZD901RFWQwvXtixzrHu9mg9/hfUlQ47YNx66iqzPlC6I15n4+wqSgWzQNgDtfeP4RwApnwr72dXXBIVyT/1JorSVYmJtb6hDXkePCipVtzlzI7s3qR26IrJWZJbSq7P9IjEqLwLFQBQA== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a12dd94-b790-42a3-0ad8-08d7ed0dc9cd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 13:52:57.5714 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR05HT005 Received-SPF: pass client-ip=40.92.89.48; envelope-from=arthur.miller@live.com; helo=EUR05-DB8-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/30 09:52:58 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Received-From: 40.92.89.48 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:248237 Archived-At: Eli Zaretskii writes: >> Date: Wed, 29 Apr 2020 21:59:30 +0200 >> From: tomas@tuxteam.de >> Cc: emacs-devel@gnu.org >> >> > The current display engine works by screen lines, so if we want to >> > keep it, we must use the existing framework. >> >> Now imagine there's a (graphical) line going from (text) display >> line 3 to 7. You are not implying that we have to segment that >> into four chunks, one per text line? > > That's one way, but it's ugly and complicated. > >> >> > When a portion of a >> > window is exposed, we redraw all the glyphs in the exposed area(s), >> > and we find the glyphs that need to be redrawn by comparing their >> > coordinates with those of the exposed rectangle(s). >> >> ... but rather that we intersect the exposed area(s) with each [1] >> of the graphical objects and redraw that (be it before or after the >> text)? > > Yes, but we examine what you call "objects" by screen lines. > >> [1] conceptually; in reality we'll need some index structure >> to avoid looking at most of the graphical objects. Quad- >> trees, whatever. > > We don't use them now. A typical window is not large enough to make > that a worthy complication. If you used exactly same functionality as now, but would call it twice, or N number of times, as a chain of render hooks, and then let every callback in chain draw it's own buffer, wouldn't that solve the issue with relatively small effort in changes? If user had pre-render hook, and say created an image and put it in first char in temp buffer and then add that buffer as pre-render hook, then the render engine just need to be modified to act when any of buffers in render chain changes, instead of just current buffer. But when it comes to rendering functionality, it would stay same, just call whatever you already have now for the buffer drawing, on each render hook and it's associated buffer and let them draw over each other; like in z-buffer. Is it too difficult to implement? It would draw over some portions of screen twice or more times, but who cares. I don't think it is a big issue in an application like Emacs, it is not like Emacs is drawing millions of polygons at 120 FPS.