Unleashing the power of QPainterPath::addEllipse()
October 13, 2010 by Andreas Kling | Comments
Up until recently, WebKit used to draw SVG circles and ellipses by breaking them down into 100-segment paths. This was done to get consistent auto-test results across different platforms and rendering libraries. Unfortunately, it wasn't very fast. With Qt 4.7's WebKit, my machine reaches a meager 17 FPS on the SVG version of The Man in Blue's benchmark which is pretty sad.
I spent some time digging into this issue and have finally landed a change upstream that makes WebKit take proper advantage of the underlying libraries - in our case by using QPainterPath::addEllipse() to compose the shapes instead of QPainterPath::lineTo(). This bumps our FPS on the aforementioned test to 51, three times faster!

New Ellipse vs. Old Ellipse. Dots mark the relevant path points.
For the specifically curious, here's the webkit.org commit: r69517
Blog Topics:
Comments
Subscribe to our newsletter
Subscribe Newsletter
Try Qt 6.2 Now!
Download the latest release here: www.qt.io/download.
Qt 6 was created to be the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
We're Hiring
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.Henkilön Qt (@theqtcompany) jakama julkaisu