[cairo-bugs] [Bug 4846] Performance problems for GTK+/Cairo on
MacOS X
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Oct 26 06:01:30 PDT 2005
Please do not reply to this email: if you want to comment on the bug, go to
the URL shown below and enter yourcomments there.
https://bugs.freedesktop.org/show_bug.cgi?id=4846
------- Additional Comments From bogdanni at hotmail.com 2005-10-26 06:01 -------
Doing this fixes it for me (I don't understand why yet). The interface gets drawn fast and correctly.
Notice it consistently rounds away from 0 for both positive and negative half-way cases. The C99
"round" function should work as well.
Is this the correct behavior?
cairo_fixed_t
_cairo_fixed_from_double (double d)
{
if (d < 0.)
return (cairo_fixed_t) (d * 65536 - .5);
else
return (cairo_fixed_t) (d * 65536 + .5);
}
No clue yet why the original breaks. It may have to do with the fact that "d * 65536 + .5" is generated
as a FMA (fused multiply-add) instruction which doesn't do an intermediate rounding operation.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the cairo-bugs
mailing list