[webkit-dev] Use of 'inf' values in WebKit renderer classes

W. James MacLean wjmaclean at chromium.org
Mon Jan 31 10:28:21 PST 2011

I'm trying to understand how float 'inf' values are used in WebKit

I'm particularly interested in a case where a very large coordinate for a
rect, which gets converted to 'inf' since its true value is too large to fit
in a float, is retained. The value of 'inf' can't really be used for further
computation (other than perhaps to detect its 'inf'-ness), and can cause
problems when passed to lower lever graphics libraries (e.g. Skia, I'm not
sure how CG handles 'inf').

If we really wanted to retain 'inf' values that are usable in computation
(e.g. values that could be mapped from infinity back to a finite point, such
as a vanishing point for a set of parallel 3-D lines), then don't we need to
keep a homogenous/projective representation for them? I can appreciate how
keeping an extra coordinate for all points might be undesirable since it
requires additional overhead that is only rarely used.

I guess I'm trying to understand how plain 'inf' values *are actually used*
in WebKit, so I can understand why we retain them.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110131/5db0f1c7/attachment.html>

More information about the webkit-dev mailing list