The linear-gradient test is failing on my PowerBook G4. The failure occurs in some of the diagonal gradients. It difference seems to stem from some of the floating point calculations in _cairo_image_data_set_linear(). The "factor" result from this function is different between my two machines, while the input values seem identical.
In the inner loop: b = 0x0p+0 qx_device = 0x1.1p+4 d = 0x1.47ae147ae147bp-6 qy_device = 0x1.01p+8 ty = 0x1.699999999999ap+2 double qy = b * qx_device + d * qy_device + ty; PPC gives: qy = -0x1.051eb851eb858p-1 x86 gives: qy = -0x1.051eb851eb854p-1 Those are what I get using fprintf's %a, which I think should give me sufficient precision to compare.
Created attachment 2969 [details] linear-gradient-image-diff.png
Created attachment 2971 [details] [review] Patch Owen suggested I try changing the rounding when converting double to int, and that worked to make the output consistent. This patch changes cairo-pattern.c to use the _cairo_fixed_to_double / _cairo_double_to_fixed instead of multiplying and casting itself. I think this change seems reasonable, and since it fixes test failures on my Mac, even better. However, this patch does affect the output on x86, and so the output of the following tests will need to be updated when applied: gradient-alpha linear-gradient text-pattern
2005-08-21 Billy Biggs <vektor@dumbterm.net> Fix for bug #4172: * src/cairo-pattern.c: (_cairo_pattern_shader_gaussian), (_cairo_image_data_set_linear), (_cairo_image_data_set_radial): Use _cairo_fixed_to_double and _cairo_double_to_fixed when converting between double and 16.16 fixed point. These functions round nicely, and solve some inconsistencies in rendering between my PPC and x86 machines. Thanks to Owen Taylor for suggesting the fix. * test/gradient-alpha-ref.png: * test/linear-gradient-ref.png: * test/text-pattern-ref.png: The above change does affect linear gradients slightly, but it seems worth it. Update the reference images to follow.
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.