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

Side by Side Diff: tests/PathTest.cpp

Issue 864713002: remove dead SkPersp macros (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/MatrixTest.cpp ('k') | tests/RoundRectTest.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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkParse.h" 10 #include "SkParse.h"
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 REPORTER_ASSERT(reporter, kPtCount == count); 2200 REPORTER_ASSERT(reporter, kPtCount == count);
2201 for (int i = 0; i < count; ++i) { 2201 for (int i = 0; i < count; ++i) {
2202 SkPoint newPt = SkPoint::Make(pts[i].fX * 2, pts[i].fY * 3); 2202 SkPoint newPt = SkPoint::Make(pts[i].fX * 2, pts[i].fY * 3);
2203 REPORTER_ASSERT(reporter, newPt == pts1[i]); 2203 REPORTER_ASSERT(reporter, newPt == pts1[i]);
2204 } 2204 }
2205 } 2205 }
2206 2206
2207 { 2207 {
2208 SkMatrix matrix; 2208 SkMatrix matrix;
2209 matrix.reset(); 2209 matrix.reset();
2210 matrix.setPerspX(SkScalarToPersp(4)); 2210 matrix.setPerspX(4);
2211 2211
2212 SkPath p1; 2212 SkPath p1;
2213 p1.moveTo(SkPoint::Make(0, 0)); 2213 p1.moveTo(SkPoint::Make(0, 0));
2214 2214
2215 p.transform(matrix, &p1); 2215 p.transform(matrix, &p1);
2216 REPORTER_ASSERT(reporter, matrix.invert(&matrix)); 2216 REPORTER_ASSERT(reporter, matrix.invert(&matrix));
2217 p1.transform(matrix, NULL); 2217 p1.transform(matrix, NULL);
2218 SkRect pBounds = p.getBounds(); 2218 SkRect pBounds = p.getBounds();
2219 SkRect p1Bounds = p1.getBounds(); 2219 SkRect p1Bounds = p1.getBounds();
2220 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fLeft, p1Bounds.fL eft)); 2220 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fLeft, p1Bounds.fL eft));
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); 3755 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode);
3756 test_conicTo_special_case(reporter); 3756 test_conicTo_special_case(reporter);
3757 test_get_point(reporter); 3757 test_get_point(reporter);
3758 test_contains(reporter); 3758 test_contains(reporter);
3759 PathTest_Private::TestPathTo(reporter); 3759 PathTest_Private::TestPathTo(reporter);
3760 PathRefTest_Private::TestPathRef(reporter); 3760 PathRefTest_Private::TestPathRef(reporter);
3761 test_dump(reporter); 3761 test_dump(reporter);
3762 test_path_crbugskia2820(reporter); 3762 test_path_crbugskia2820(reporter);
3763 test_skbug_3239(reporter); 3763 test_skbug_3239(reporter);
3764 } 3764 }
OLDNEW
« no previous file with comments | « tests/MatrixTest.cpp ('k') | tests/RoundRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698