[PATCH xserver 0/3] Fix O(n*m) performance cliff in miarc

Keith Packard keithp at keithp.com
Thu Mar 2 21:29:48 UTC 2017


Adam Jackson <ajax at redhat.com> writes:

> I assume this is meant in the same sense that The Onion is America's
> Finest News Source.

Not entirely? In reality, getting arcs to do anything like what the spec
suggested took a huge amount of time. With Bob's closed-form solution
for the quartic, it's probably even possible to draw exactly what the
protocol specifies, but would have required a rather large number of
bits (I think I estimated 256 bit math?). Of course, dashes are
impossible to draw precisely...

Once we really sat back to look at X arcs and realized that they were
both computationally expensive and useless, we got disillusioned and
wandered off to do other things.

If we were doing this today, we would do what cairo does -- approximate
conics with splines and use piece-wise pen/path interpolation for wide
figures. I'm not sure what to do about the evolute though; it was so
satisfying to draw the first ones, and ignoring them as cairo does just
seems like a cop-out.

That whole 'if it looks good, it is good' took another twenty five years
to really sink in.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170302/efaa3f84/attachment.sig>


More information about the xorg-devel mailing list