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.devel Subject: Re: SVG hack for display engine Date: Thu, 18 Nov 2021 13:21:35 +0200 Message-ID: <83czmxyaio.fsf@gnu.org> References: <83zgq41cra.fsf@gnu.org> <83k0h818zw.fsf@gnu.org> <83mtm2zyf6.fsf@gnu.org> <83pmqxyj3j.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alexander.adolf@condition-alpha.com, emacs-devel@gnu.org To: Anand Tamariya Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 18 12:22:42 2021 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 1mnfV4-0002ck-2Z for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Nov 2021 12:22:42 +0100 Original-Received: from localhost ([::1]:60302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnfV2-0003Nv-Th for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Nov 2021 06:22:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnfU2-0002Sb-5p for emacs-devel@gnu.org; Thu, 18 Nov 2021 06:21:38 -0500 Original-Received: from [2001:470:142:3::e] (port=45156 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnfU1-0004ow-TL; Thu, 18 Nov 2021 06:21:37 -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=KpikE0r2MTWyFDhhpysXM5n5+fCJ2g+62KXT8axBDyI=; b=PZb5Nyly85Cd 3ZBSUmbstdO8mxUFOAGL5M2pfdvQHiMZ20DLW+yR0RzxPUUR6fsYYF6ZXbK23GdrPQb/7aq+dDQh0 8bPu+9vZWEMLQyJwrcnhSd3Jv9t/i+ZdlzHc9i86n95F03e8MVd4Gfm6B0oUwAQBDRtNgGQCidyqg 1M5IsfSFuer50HeE/iZWeL0wHAMvihbxhsGE2v4rQJZbkP0GI261sd1RLia7Gj7p+ZyICrDmZWRwF t7jwL4XCyvOShCcO+fCDVteKMs8K6F7jkdnPVWUwu53dNu7cjE26HoIIvhEuQqnLKEbV1hheQ4Mlr RMbkvBUD7FwmB22lACKZZg==; Original-Received: from [87.69.77.57] (port=3518 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnfU1-00077O-I2; Thu, 18 Nov 2021 06:21:37 -0500 In-Reply-To: (message from Anand Tamariya on Thu, 18 Nov 2021 15:43:01 +0530) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:279673 Archived-At: > From: Anand Tamariya > Date: Thu, 18 Nov 2021 15:43:01 +0530 > Cc: Alexander Adolf , Emacs Devel > > . does this mean you expect the display engine to tell that > display-svg-hook which parts of the display were redrawn? > > No, that won't be necessary. After change hooks and other APIs are enough to derive change and context > information. In my experience, the characters around the point are usually the most relevant. But that's not generally true. Redisplay has its own criteria to decide which parts need to be redrawn, and those criteria are not necessarily trivial to guess from buffer contents alone, because redisplay has access to all kinds of information recorded specifically for that purpose, and not exposed to Lisp. > . what is the "required information" to be passed to > display-svg-hook, and how will it be generated from the information > that exists in the display engine? > > "required information" in my sentence above refers to the parameters of (svg-render) API viz. svg x y width > height. display-svg-hook can be a no-arg function. What are X, Y, WIDTH and HEIGHT here? And how will those hooks or svg-render know what to display an where on the screen?