[Webkit-unassigned] [Bug 41159] Come up with a more efficient way to represent Path segments

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 24 07:49:51 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=41159





--- Comment #2 from Nikolas Zimmermann <zimmermann at kde.org>  2010-06-24 07:49:51 PST ---
If you want to apply the patch to test it. Grab patch, svn-apply FunPatch.diff
cd WebCore/test; qmake-mac; make; Builds/dataStream. That will give you:

<snippet>
Dumping size information of our primitive types:
BoolByte: 1
FloatByte: 4
UnsignedShortByte: 2

Serializing path data into bytes...
 -> moveTo(10.1, -99.9)
 -> lineTo(1.17549e-38, 3.40282e+38)
 -> arcTo(1, 2, 3, 4, 5, 0, 1)

Generating bytestream...
Dumping byte stream with 46 entries: 0x00 0x00 0x9a 0x99 0x21 0x41 0xcd 0xcc 0xc7 0xc2 0x01 0x00 0x00 0x00 0x80 0x00 0xff 0xff 0x7f 0x7f 0x02 0x00 0x00 0x00 0x80 0x3f 0x00 0x00 0x00 0x40 0x00 0x00 0x40 0x40 0x00 0x00 0x80 0x40 0x00 0x00 0xa0 0x40 0x00 0x01 0x03 0x00

Parsing bytestream...
 -> moveTo(10.1, -99.9)
 -> lineTo(1.17549e-38, 3.40282e+38)
 -> arcTo(1, 2, 3, 4, 5, 0, 1)
 -> end()
</snippet>

That's my plan for optimizing the memory-use. To convert the parsed "d" attribute of a SVGPathElement, into a bytestream, and not building any SVGPathSeg datastructure. SVGPathSeg can easily be build from this bytestream, if and only if needed (of course the other direction is easily possible as well).

What do you think?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list