[webkit-dev] Implement Geometry Interfaces
krit at webkit.org
Thu Jun 12 23:42:44 PDT 2014
On Jun 13, 2014, at 8:36 AM, Filip Pizlo <fpizlo at apple.com> wrote:
I am not sure. What do you have in mind? How could it look like?
>> On Jun 12, 2014, at 10:45 PM, Dirk Schulze <krit at webkit.org> wrote:
>>> On Jun 13, 2014, at 1:54 AM, Benjamin Poulain <benjamin at webkit.org> wrote:
>>>> On 6/12/14, 11:24 AM, Dirk Schulze wrote:
>>>> I would like to implement the Geometry Interfaces spec in WebKit. The spec defines a couple of interfaces like DOMPoint, DOMRect, DOMQuad and DOMMatrix. These interfaces are more or less specified versions of proprietary interfaces like WebKitPoint or WebKitCSSMatrix as well as old APIs like SVGPoint, SVGRect or SVGMatrix that get unified between HTML/CSS and SVG. The specification progressed fast and is going to LC within the next weeks. I am going to start with DOMPoint/DOMPointReadOnly and DOMRect/DOMRectReadOnly and get to the other interfaces one by one. With the exception of DOMMatrix, all interfaces are implemented behind a runtime flag in Mozilla Gecko. DOMMatrix will be implemented in Gecko soon.
>>>> These interfaces will be used by other specifications like CSS OM View or SVG. I am going to implement these APIs behind a compiler flag called GEOMETRY. I would like to enable the compiler flag by default for better testing. Production builds should disable the compiler flag. I will pull out stable APIs from the flag when appropriate.
>>> This is such a weird idea.
>>> Wouldn't those type suffer the same fate as WebKitCSSMatrix: being inefficient on a large scale?
>> The performance problems of WebKitCSSMatrix can be found in two areas:
>> * Even if the transformations are purely 2D, all matrix operations happen in 3D. This can be addressed.
>> * All transformations return a new WebKitCSSMatrix which allocates more memory. DOMMatrix addressed this with in-place transformation where the matrix itself is transformed. DOMMatrix is still compatible to WebKitCSSMatrix and SVGMatrix.
>> * DOMMatrix supports Float32Array and Float64Array as interchange format to make its use in JS even faster.
>> I don’t think that any of the interfaces can be described as “primitive”. They rather seem specific for the designed purpose.
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
More information about the webkit-dev