[webkit-dev] Path::createEllipse() - why not leverage port paths?

Nikolas Zimmermann zimmermann at physik.rwth-aachen.de
Sun Sep 19 02:28:10 PDT 2010


Am 19.09.2010 um 09:41 schrieb Dirk Schulze:

> Am Sonntag, den 19.09.2010, 09:32 +0200 schrieb Dirk Schulze:
>> The main reason is DumpRenderTree.
> Let me rephrase it: The only reason why we still use this logic is
> DumpRenderTree.
>
>> If we use the Path::createEllipse
>> logic of the different platforms, we end up with different LayoutTest
>> results on SVG between platform, since we create them by traversing  
>> the
>> path data of the certain platform.
> Just an examples: IIRC CoreGraphics uses cubic or qudratic curves to
> draw an ellipse, Cairo uses arc and scales the path context to  
> create an
> ellipse, not sure what Skia or Qt are doing internally, but because of
> the traversing of the path data, we definitely end up with different
> results on DRT.

That's part of the reason, why I proposed to use a cross-platform  
version of dumping the path data strings.
We should utilize the SVGPathByteStream, which already contains a  
representation of the _parsed_ path data to dump the DRT data.
There will always be differences, across platforms, when asking the  
underlying graphics system for the path segments. What we really want  
to see in the dumps
is the parsed path data that gets passed to the graphics systems.

To summarize: Let's go for platform specific variants of  
Path::createCircle/Path::createEllipse, but change the DRT dumps.
For primitive shapes, we shouldn't dump any path data _at all_ (eg.  
circle / ellipse / rect etc) but instead just dump "RenderPath {rect}  
x=0, y=0, width=50, height=50".
That would make our DRT dumps much easier to read.

Andreas, interessted to work on that?

Cheers,
Niko


More information about the webkit-dev mailing list