diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-10-15 14:47:00 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-11-03 11:50:53 +0100 |
commit | 7dad257209972b86efa327892073cf0d293a5afe (patch) | |
tree | 6905fdca34399d288780562439cf2ceaab5d52dc /src/core/type_conversion.h | |
parent | 5605236909880eaa68a07147b65e6c2a2c5be210 (diff) |
Optimize the QMatrix4x4 after a conversion from SkMatrix44
This avoids using a General matrix for tile transformations which are
usually only translations in our case.
Change-Id: Ic947d7ef9b78de6d5d16ea718cc03255e38a8097
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r-- | src/core/type_conversion.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h index 8d33b5ffa..9d9cdd675 100644 --- a/src/core/type_conversion.h +++ b/src/core/type_conversion.h @@ -121,11 +121,13 @@ inline QColor toQt(const SkColor &c) inline QMatrix4x4 toQt(const SkMatrix44 &m) { - return QMatrix4x4( + QMatrix4x4 qtMatrix( m.get(0, 0), m.get(0, 1), m.get(0, 2), m.get(0, 3), m.get(1, 0), m.get(1, 1), m.get(1, 2), m.get(1, 3), m.get(2, 0), m.get(2, 1), m.get(2, 2), m.get(2, 3), m.get(3, 0), m.get(3, 1), m.get(3, 2), m.get(3, 3)); + qtMatrix.optimize(); + return qtMatrix; } inline QDateTime toQt(base::Time time) |