diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-19 15:51:12 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-19 15:51:12 +0000 |
commit | 99bd7d817471ec903a7fe364b4e1d4477b1372b5 (patch) | |
tree | 52a028ab2777dd935f4bb766a61665298e9dd6af /tests | |
parent | 7b1715215a7bdd9bb5d75c8ea676b2b586493dea (diff) |
Try out SkMatrix::Concat.
This should RVO to the same as doing it on the stack with setConcat.
BUG=skia:
R=reed@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/293693002
git-svn-id: http://skia.googlecode.com/svn/trunk@14782 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MatrixTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp index 9e39d5b22b..ab406fb65d 100644 --- a/tests/MatrixTest.cpp +++ b/tests/MatrixTest.cpp @@ -785,3 +785,16 @@ DEF_TEST(Matrix, reporter) { test_matrix_decomposition(reporter); test_matrix_homogeneous(reporter); } + +DEF_TEST(Matrix_Concat, r) { + SkMatrix a; + a.setTranslate(10, 20); + + SkMatrix b; + b.setScale(3, 5); + + SkMatrix expected; + expected.setConcat(a,b); + + REPORTER_ASSERT(r, expected == SkMatrix::Concat(a, b)); +} |