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

Side by Side Diff: tests/MatrixTest.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « tests/ImageFilterTest.cpp ('k') | tests/MemsetTest.cpp » ('j') | 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 REPORTER_ASSERT(reporter, buffer[6] == g); 86 REPORTER_ASSERT(reporter, buffer[6] == g);
87 REPORTER_ASSERT(reporter, buffer[7] == h); 87 REPORTER_ASSERT(reporter, buffer[7] == h);
88 REPORTER_ASSERT(reporter, buffer[8] == i); 88 REPORTER_ASSERT(reporter, buffer[8] == i);
89 } 89 }
90 90
91 static void test_set9(skiatest::Reporter* reporter) { 91 static void test_set9(skiatest::Reporter* reporter) {
92 92
93 SkMatrix m; 93 SkMatrix m;
94 m.reset(); 94 m.reset();
95 assert9(reporter, m, 1, 0, 0, 0, 1, 0, 0, 0, 1); 95 assert9(reporter, m, 1, 0, 0, 0, 1, 0, 0, 0, 1);
96 96
97 m.setScale(2, 3); 97 m.setScale(2, 3);
98 assert9(reporter, m, 2, 0, 0, 0, 3, 0, 0, 0, 1); 98 assert9(reporter, m, 2, 0, 0, 0, 3, 0, 0, 0, 1);
99 99
100 m.postTranslate(4, 5); 100 m.postTranslate(4, 5);
101 assert9(reporter, m, 2, 0, 4, 0, 3, 5, 0, 0, 1); 101 assert9(reporter, m, 2, 0, 4, 0, 3, 5, 0, 0, 1);
102 102
103 SkScalar buffer[9]; 103 SkScalar buffer[9];
104 sk_bzero(buffer, sizeof(buffer)); 104 sk_bzero(buffer, sizeof(buffer));
105 buffer[SkMatrix::kMScaleX] = 1; 105 buffer[SkMatrix::kMScaleX] = 1;
106 buffer[SkMatrix::kMScaleY] = 1; 106 buffer[SkMatrix::kMScaleY] = 1;
107 buffer[SkMatrix::kMPersp2] = 1; 107 buffer[SkMatrix::kMPersp2] = 1;
108 REPORTER_ASSERT(reporter, !m.isIdentity()); 108 REPORTER_ASSERT(reporter, !m.isIdentity());
109 m.set9(buffer); 109 m.set9(buffer);
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 a.setTranslate(10, 20); 946 a.setTranslate(10, 20);
947 947
948 SkMatrix b; 948 SkMatrix b;
949 b.setScale(3, 5); 949 b.setScale(3, 5);
950 950
951 SkMatrix expected; 951 SkMatrix expected;
952 expected.setConcat(a,b); 952 expected.setConcat(a,b);
953 953
954 REPORTER_ASSERT(r, expected == SkMatrix::Concat(a, b)); 954 REPORTER_ASSERT(r, expected == SkMatrix::Concat(a, b));
955 } 955 }
OLDNEW
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/MemsetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698