On Jun 6, 2014, at 6:52 AM, Rik Cabanier <caban...@gmail.com> wrote:

> 
> 
> 
> On Thu, Jun 5, 2014 at 9:40 PM, Dirk Schulze <dschu...@adobe.com> wrote:
> 
> On Jun 6, 2014, at 6:27 AM, Robert O'Callahan <rob...@ocallahan.org> wrote:
> 
> > On Fri, Jun 6, 2014 at 4:22 PM, Dirk Schulze <dschu...@adobe.com> wrote:
> > What about
> >
> >         DOMMatrix(1,0,0,1,0,0) or
> >         DOMMatrix(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)
> >
> > Do we check the values and determine if the matrix is identity or not? If 
> > we do, then authors could write DOMMatrix(other.a, other.b, other.c, 
> > other.d, other.e, other.f) and check any kind of matrix after transforming 
> > for identity. In this case, a real isIdentity check wouldn’t be worst IMO.
> >
> > I would lean towards just setting isIdentity to false for that case, but I 
> > could go either way. If authors try really hard to shoot themselves in the 
> > foot, they can.
> >
> > Rob
> 
> Just as comparison: Gecko checks for IsIdentity 75 times (exclusive the 
> definitions in matrix and matrix4x4). Every time the values are simply 
> checked for 0 and 1. Means Gecko is shooting itself in the foot quite often 
> :P. (In WebKit it is about ~70 times as well.)
> 
> The question is not that 'isIdentity' is bad. Benoit's issue was that 
> checking for 'isIdentity' after doing transformations might cause jittery 
> results (ie switch to true or false depending on the conditions).
> Quickle scanning mozilla's codebase, our current definition of 'isIdentity' 
> would return the correct result in all cases. 
> 

Just take the first result of many:

static PathInterpolationResult
CanInterpolate(const SVGPathDataAndInfo& aStart,
               const SVGPathDataAndInfo& aEnd)
{
  if (aStart.IsIdentity()) {
    return eCanInterpolate;
  }
…

Where can you guarantee that you don’t see jittering? aStart could be modified.

Greetings,
Dirk
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to