From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Image transformations Date: Thu, 13 Jun 2019 23:26:26 +0100 Message-ID: <20190613222626.GA12971@breton.holly.idiocy.org> References: <9A21DE14-BB5F-426E-BBB2-19C87930E733@gnu.org> <20190611200233.GA80199@breton.holly.idiocy.org> <83imta95z0.fsf@gnu.org> <20190612220746.GA89208@breton.holly.idiocy.org> <834l4u11dr.fsf@gnu.org> <20190613165804.GB11266@breton.holly.idiocy.org> <83d0jhz9za.fsf@gnu.org> <20190613192724.GA11945@breton.holly.idiocy.org> <83zhmlxo6d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="55780"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.12.0 (2019-05-25) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 14 00:27:05 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbYBV-000EHM-89 for ged-emacs-devel@m.gmane.org; Fri, 14 Jun 2019 00:27:05 +0200 Original-Received: from localhost ([::1]:46138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbYBU-0004eU-5N for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2019 18:27:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44121) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbYBK-0004e5-3w for emacs-devel@gnu.org; Thu, 13 Jun 2019 18:26:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbYBI-0003GB-51 for emacs-devel@gnu.org; Thu, 13 Jun 2019 18:26:53 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36690) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbYBC-0002vJ-1I; Thu, 13 Jun 2019 18:26:46 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id u8so352033wmm.1; Thu, 13 Jun 2019 15:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=wmBNh5UTBRoj/MdmqwJbIDuy0hRJSk2Z5d/bsS1Zo6U=; b=UPKsl84ggE8yOYd3d1g45ci7O2GGD9jIjkRoJNq0NBCHBGE9MU0Pg8yXxk0bxo8tcn 5evzas4lK9K89qW8Tg3ZgxxIJwrT+LQm4uYa1AQVlhhWkKPk7m1rv5I3jFn7gFbhVyuQ sRRMVNPkmsXzsK0SjGRouWp30B0L934DPAuGIfvAYV+g7WPZagPBxz13GyrBktwgdQSF yeCB6EgwBC4cc4qO4q3+/JdgKdcZSEbUJpRbcH9EOP1Pp2yH3zg3SZl/jrvL6O6AkJxa GnT0uInwUVPxl53MvHppYqqPkEmtDtkqIw48XAYHqK/eBBN5Nrh3fuxfSgCvvA41+9Be ybnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=wmBNh5UTBRoj/MdmqwJbIDuy0hRJSk2Z5d/bsS1Zo6U=; b=BVX468EZrwzTNiY32qcBdmYjkov/48cXjNFvOsp/98n/+ut2pJ2x0h+k1UNVrEh5WX 8P2iwekV3wF4YULj8cIqwaGF6aKqIaO7aIUi/pKbNXXBf+Y5JXL3MUKULsWH28ZdbPS0 qqHT5zjQmBhDcQYxspjnqUqgxYtv8wWwdqu1txB4QtJGEjIm8YsR7mKTuTyyTXEvpXwD eeK6ojpN8Bt1ixMsJWbC6bdxaZn36Qikx6F5OdbRCsqMHwEf9Daxy+DAxLQnMg0K7eHf OTR+aap2ubFvK16SmkPjFOgoAPBCnC/N1ZahA5NSKWMAWpCiixOVwgrbCFRdJMd+lfyU WPOA== X-Gm-Message-State: APjAAAW3rEiBXVjNy8BvnPqnYzVs6qv+o+lGQfRrYYUdEj7bvkQRz3tJ JMj0Ec7Xk98P4ySgcba4CQhpLE/U X-Google-Smtp-Source: APXvYqxXpFZoGageA+IlET7UwApvPGlclqo9uMmekjjkMcl/wIRnj4UabdhGp1xv00UP9fAHHD0P2A== X-Received: by 2002:a1c:b684:: with SMTP id g126mr5220188wmf.176.1560464789281; Thu, 13 Jun 2019 15:26:29 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-0518-5a78-4fbd-d772.holly.idiocy.org. [2001:8b0:3f8:8129:518:5a78:4fbd:d772]) by smtp.gmail.com with ESMTPSA id l18sm923961wrv.38.2019.06.13.15.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 15:26:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <83zhmlxo6d.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237561 Archived-At: On Thu, Jun 13, 2019 at 10:47:38PM +0300, Eli Zaretskii wrote: > > Date: Thu, 13 Jun 2019 20:27:24 +0100 > > From: Alan Third > > Cc: emacs-devel@gnu.org > > > > Or storing the basic crop and scaling information separately so you > > don’t have to worry about the matrices at all. > > I'm beginning to think we should do this on all platforms, and leave > the matrix calculation, if needed, to the terminal-specific back-ends > (xterm.c, w32term.c, etc.). It sounds like we gain nothing by > spilling XRender-specific stuff in image.c and letting all the other > platforms adapt. I think you have a fundamental misunderstanding of how the transformation matrix is being used. It’s not specific to XRender. Aside from a few short‐circuits the only XRender specific code is in image_set_transform, and XRender, NS and Cairo all have their own code in there, and use the same transformation matrix. We could even use the same matrix with ImageMagick with a bit of work. If we were to throw out that shared matrix code and put it into each backend we would be simply duplicating the code. Even using a toolkit’s built‐in crop/rotate/resize functions is probably recreating the exact same transformation matrix in the background. -- Alan Third