mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-21 02:50:17 +01:00
[trace] Replace an open coded test for matrix identity.
The code has a _matrix_is_identity() function we can use instead of open coding the same test.
This commit is contained in:
parent
70ea9e3ce1
commit
2b0e070f6a
1 changed files with 1 additions and 4 deletions
|
|
@ -2320,7 +2320,6 @@ cairo_identity_matrix (cairo_t *cr)
|
||||||
return DLCALL (cairo_identity_matrix, cr);
|
return DLCALL (cairo_identity_matrix, cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cairo_new_path (cairo_t *cr)
|
cairo_new_path (cairo_t *cr)
|
||||||
{
|
{
|
||||||
|
|
@ -2817,9 +2816,7 @@ cairo_set_scaled_font (cairo_t *cr, const cairo_scaled_font_t *scaled_font)
|
||||||
static void
|
static void
|
||||||
_emit_matrix (const cairo_matrix_t *m)
|
_emit_matrix (const cairo_matrix_t *m)
|
||||||
{
|
{
|
||||||
if (m->xx == 1.0 && m->yx == 0.0 &&
|
if (_matrix_is_identity(m))
|
||||||
m->xy == 0.0 && m->yy == 1.0 &&
|
|
||||||
m->x0 == 0.0 && m->y0 == 0.0)
|
|
||||||
{
|
{
|
||||||
_trace_printf ("identity");
|
_trace_printf ("identity");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue