W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: API for matrix manipulation

From: Chris Marrin <cmarrin@apple.com>
Date: Fri, 18 Mar 2011 13:50:13 -0700
Cc: Joćo Eiras <joao.eiras@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Message-id: <C214010E-E6D3-46DC-AA4E-12E7846CF056@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Mar 15, 2011, at 5:08 PM, Tab Atkins Jr. wrote:

> On Tue, Mar 15, 2011 at 5:00 PM, Chris Marrin <cmarrin@apple.com> wrote:
>> I think it would be nice to unify the classes somehow. But that might be difficult since SVG and CSS are (necessarily) separate specs. But maybe one of the API gurus has a solution?
> We just discussed this on Monday at the FXTF telcon.  Sounds like
> people are, in general, okay with just using a 4x4 matrix, though
> there are some possible implementation issues with devices that can't
> do 3d at all.  (It was suggested that they can simply do a 2d
> projection, which is simple.)

I don't think there are implementation issues other than performance related ones. As you say, you can always flatten a 3D matrix for use in a purely 2D renderer. We do this in the WebKit implementation in some cases. But doing 4x4 matrix math can be expensive, especially on less capable hardware,. So it would probably be valuable to have a set of 2D affine calls on any future 4x4 class, so an implementation can easily optimize by knowing they can get away with doing a subset of the math if all the operands are 2D affine matrices. But that's just a bit of extra API.

Received on Friday, 18 March 2011 20:50:50 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:30 UTC