diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-22 18:29:02 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-30 17:14:27 +0000 |
commit | 9d2189afbd2aa1413f620a4d35016ef3be3fc0e9 (patch) | |
tree | fe7e1c06800ea7e99bb51365452f9e017782fda1 /src/cairo-pattern.c | |
parent | 2c277ddbea42222130b8b1c2a2b4934503b40188 (diff) |
[pattern] Do not recompute the inverse if setting an identical matrix.
More micro-optimisation.
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r-- | src/cairo-pattern.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index 81fa62ad..064eeb6c 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -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; |