Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1086)

Side by Side Diff: tests/MatrixTest.cpp

Issue 293693002: Try out SkMatrix::Concat. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move to header Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/record/SkRecordDraw.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkMath.h" 8 #include "SkMath.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 #include "SkMatrixUtils.h" 10 #include "SkMatrixUtils.h"
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 mat.set(SkMatrix::kMSkewX, SK_ScalarNaN); 778 mat.set(SkMatrix::kMSkewX, SK_ScalarNaN);
779 mat2.set(SkMatrix::kMSkewX, SK_ScalarNaN); 779 mat2.set(SkMatrix::kMSkewX, SK_ScalarNaN);
780 REPORTER_ASSERT(reporter, !are_equal(reporter, mat, mat2)); 780 REPORTER_ASSERT(reporter, !are_equal(reporter, mat, mat2));
781 781
782 test_matrix_min_max_stretch(reporter); 782 test_matrix_min_max_stretch(reporter);
783 test_matrix_is_similarity(reporter); 783 test_matrix_is_similarity(reporter);
784 test_matrix_recttorect(reporter); 784 test_matrix_recttorect(reporter);
785 test_matrix_decomposition(reporter); 785 test_matrix_decomposition(reporter);
786 test_matrix_homogeneous(reporter); 786 test_matrix_homogeneous(reporter);
787 } 787 }
788
789 DEF_TEST(Matrix_Concat, r) {
790 SkMatrix a;
791 a.setTranslate(10, 20);
792
793 SkMatrix b;
794 b.setScale(3, 5);
795
796 SkMatrix expected;
797 expected.setConcat(a,b);
798
799 REPORTER_ASSERT(r, expected == SkMatrix::Concat(a, b));
800 }
OLDNEW
« no previous file with comments | « src/record/SkRecordDraw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698