mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-22 21:40:27 +01:00
[pattern] Do not recompute the inverse if setting an identical matrix.
More micro-optimisation.
This commit is contained in:
parent
2c277ddbea
commit
9d2189afbd
1 changed files with 3 additions and 0 deletions
|
|
@ -1055,6 +1055,9 @@ cairo_pattern_set_matrix (cairo_pattern_t *pattern,
|
|||
if (pattern->status)
|
||||
return;
|
||||
|
||||
if (memcmp (&pattern->matrix, matrix, sizeof (cairo_matrix_t)) == 0)
|
||||
return;
|
||||
|
||||
pattern->matrix = *matrix;
|
||||
|
||||
inverse = *matrix;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue