From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: SVG hack for display engine Date: Sat, 20 Nov 2021 19:44:49 +0000 Message-ID: References: <83k0h818zw.fsf@gnu.org> <83mtm2zyf6.fsf@gnu.org> <83pmqxyj3j.fsf@gnu.org> <83czmxyaio.fsf@gnu.org> <837dd5y0qg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18590"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Alexander Adolf , Emacs Devel To: Anand Tamariya Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 20 20:46:31 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 1moWJi-0004ZJ-84 for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Nov 2021 20:46:30 +0100 Original-Received: from localhost ([::1]:49622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moWJg-00033z-Gf for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Nov 2021 14:46:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moWIH-0002Fs-Ia for emacs-devel@gnu.org; Sat, 20 Nov 2021 14:45:01 -0500 Original-Received: from outbound.soverin.net ([116.202.126.228]:53497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moWIE-0003OW-Uk; Sat, 20 Nov 2021 14:45:01 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 88C0BD1; Sat, 20 Nov 2021 19:44:51 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1637437490; bh=F1z7nw9CAAuP5Lb3JVY+E3VIl7cathCuf4vQA2oywF8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jTWNKjfm/RYZzrlrAYLrA1xc4IcYmsmf+Dza07QP2B4N20wrFyJEpvITXiYupawlN juhmgkCnY4nePPzSCZgG5nqMhhPXuR5CJUW4PaTcwdL3ETZLeag1TdfErKC3G3aUa7 /eCK/SIPalzv5mlTz/0WcCjPGjOoFwMopalgW4tS+OLeubLjFdfwqZghOEYuFSFjtN 5kXz8xH+QIQlYRw136SlBOoNkW+T009kPndYmrfBgP+0C6BMZ/gqe9XjhF5hCMAMxk WYTJ8Qy4JIWMI8kuljWF6D8aWYLCdZYqdHiH9CQkP2yZhsWsxWyzi1TpGRI8PslOA2 IBbCcf4U+sivQ== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1moWI5-000SFO-14; Sat, 20 Nov 2021 19:44:49 +0000 Mail-Followup-To: Alan Third , Anand Tamariya , Eli Zaretskii , Alexander Adolf , Emacs Devel Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=116.202.126.228; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:279811 Archived-At: On Fri, Nov 19, 2021 at 07:02:20AM +0530, Anand Tamariya wrote: > > > - svg-render (svg x y width height) > > > svg is a Lisp DOM object as returned by (dom-node). This should use > > librsvg to generate a bitmap image of > > > svg of size (width x height) and superimpose it at position (x, y) on > > the current bitmap being displayed by > > > Emacs. > > *The current image API takes either a filename or XML string for SVG. This > > can be avoided if svg is a > Lisp DOM.* Edit: (dom-node) is defined in > > dom.el . > > > Can you visualize the amount of string serialization, deserialization and > SVG parsing happening in a draw or move operation with live feedback? Do > you see it performing well for even a moderately sized SVG? > > Without direct SVG support in the display engine ie. a way for a developer > to tell the display engine to use a particular SVG in a DOM form during > it's normal display cycle, any such implementation will remain a hack - it > works but it could be much better. I'm curious. I can't see any functionality in librsvg for loading an SVG DOM directly without doing a round-trip into a string. Am I missing something? Does this idea rely on using some Cairo functionality? -- Alan Third