[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] WebKitCSSMatrix and WebGL
On Dec 11, 2010, at 10:45 AM, Vladimir Vukicevic wrote:
> ----- Original Message -----
>> On 08/12/2010, at 3:45 AM, Chris Marrin wrote:
>>> I've opened a bug for it, if you want to track it:
>> Is there any possibility of popping in a few more mathematically
>> common and intensive functions like intersections? I'm not asking for
>> a complete 3D engine as a library, only for a few functions that are
>> very nearly as common as multiply, dot and cross. :)
> Is there a benchmark somewhere that compares the performance of doing the math in JS vs. doing it using WebKitCSSMatrix?
Not a benchmark, but I've done informal testing. In J3DI I can turn on and off CSSMatrix and the native copy operation. I called the normal matrix operations many times per frame to get the percentage of the matrix ops where they are significant. Using CSSMatrix without copy gave moderate speedup, maybe 30%. But using copy without CSSMatrix almost doubled performance! The test I didn't do was to make CSSMatrix mutable so a new matrix didn't have to be created for each operation. I'm willing to bet that doing copy + native, mutable CSSMatrix would at least triple performance from today's best effort. But that's just a guess.
One thing we're talking about here is trying to add a Matrix class which would be the base class of SVGMatrix and CSSMatrix. That would give us the opportunity to make it mutable without breaking anything, and would allow CSS and SVG to play better together. But we're just throwing around ideas.
You are currently subscribed to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: