[cairo] [PATCH] Rely less on fast double-precision FPUs
Behdad Esfahbod
behdad at behdad.org
Tue Jun 1 11:19:05 PDT 2010
On 06/01/2010 01:59 PM, Jonathan Morton wrote:
> cairo_bool_t
> _cairo_matrix_is_translation (const cairo_matrix_t *matrix)
> {
> + cairo_matrix_t tmp;
> + tmp.xx = matrix->xx;
> + tmp.xy = matrix->xy;
> + tmp.yx = matrix->yx;
> + tmp.yy = matrix->yy;
> + tmp.x0 = tmp.y0 = 0;
> + return _cairo_matrix_is_identity(&tmp);
Or just compare the first 4*sizeof(double) bytes.
behdad
More information about the cairo
mailing list