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

Side by Side Diff: tests/PathTest.cpp

Issue 1432503003: Comments Style: s/skbug.com/bug.skia.org/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 5 years, 1 month 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/ImageTest.cpp ('k') | tests/ReadPixelsTest.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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 SkPath dent; 1292 SkPath dent;
1293 dent.moveTo(0, 0); 1293 dent.moveTo(0, 0);
1294 dent.lineTo(100*SK_Scalar1, 100*SK_Scalar1); 1294 dent.lineTo(100*SK_Scalar1, 100*SK_Scalar1);
1295 dent.lineTo(0, 100*SK_Scalar1); 1295 dent.lineTo(0, 100*SK_Scalar1);
1296 dent.lineTo(-50*SK_Scalar1, 200*SK_Scalar1); 1296 dent.lineTo(-50*SK_Scalar1, 200*SK_Scalar1);
1297 dent.lineTo(-200*SK_Scalar1, 100*SK_Scalar1); 1297 dent.lineTo(-200*SK_Scalar1, 100*SK_Scalar1);
1298 dent.close(); 1298 dent.close();
1299 check_convexity(reporter, dent, SkPath::kConcave_Convexity); 1299 check_convexity(reporter, dent, SkPath::kConcave_Convexity);
1300 check_direction(reporter, dent, SkPathPriv::kCW_FirstDirection); 1300 check_direction(reporter, dent, SkPathPriv::kCW_FirstDirection);
1301 1301
1302 // http://skbug.com/2235 1302 // https://bug.skia.org/2235
1303 SkPath strokedSin; 1303 SkPath strokedSin;
1304 for (int i = 0; i < 2000; i++) { 1304 for (int i = 0; i < 2000; i++) {
1305 SkScalar x = SkIntToScalar(i) / 2; 1305 SkScalar x = SkIntToScalar(i) / 2;
1306 SkScalar y = 500 - (x + SkScalarSin(x / 100) * 40) / 3; 1306 SkScalar y = 500 - (x + SkScalarSin(x / 100) * 40) / 3;
1307 if (0 == i) { 1307 if (0 == i) {
1308 strokedSin.moveTo(x, y); 1308 strokedSin.moveTo(x, y);
1309 } else { 1309 } else {
1310 strokedSin.lineTo(x, y); 1310 strokedSin.lineTo(x, y);
1311 } 1311 }
1312 } 1312 }
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 // outside the diagonal edge 1719 // outside the diagonal edge
1720 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH( SkIntToScalar(10), 1720 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH( SkIntToScalar(10),
1721 SkIntToScalar(200), 1721 SkIntToScalar(200),
1722 SkIntToScalar(20), 1722 SkIntToScalar(20),
1723 SkIntToScalar(5)))); 1723 SkIntToScalar(5))));
1724 1724
1725 1725
1726 // Test that multiple move commands do not cause asserts. 1726 // Test that multiple move commands do not cause asserts.
1727 1727
1728 // At the time of writing, this would not modify cached convexity. This caus ed an assert while 1728 // At the time of writing, this would not modify cached convexity. This caus ed an assert while
1729 // checking conservative containment again. http://skbug.com/1460 1729 // checking conservative containment again. https://bug.skia.org/1460
1730 path.moveTo(SkIntToScalar(100), SkIntToScalar(100)); 1730 path.moveTo(SkIntToScalar(100), SkIntToScalar(100));
1731 #if 0 1731 #if 0
1732 REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(S kIntToScalar(50), 0, 1732 REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(S kIntToScalar(50), 0,
1733 S kIntToScalar(10), 1733 S kIntToScalar(10),
1734 S kIntToScalar(10)))); 1734 S kIntToScalar(10))));
1735 #endif 1735 #endif
1736 1736
1737 // Same as above path and first test but with an extra moveTo. 1737 // Same as above path and first test but with an extra moveTo.
1738 path.reset(); 1738 path.reset();
1739 path.moveTo(100, 100); 1739 path.moveTo(100, 100);
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
3941 PathTest_Private::TestPathTo(reporter); 3941 PathTest_Private::TestPathTo(reporter);
3942 PathRefTest_Private::TestPathRef(reporter); 3942 PathRefTest_Private::TestPathRef(reporter);
3943 PathTest_Private::TestPathrefListeners(reporter); 3943 PathTest_Private::TestPathrefListeners(reporter);
3944 test_dump(reporter); 3944 test_dump(reporter);
3945 test_path_crbug389050(reporter); 3945 test_path_crbug389050(reporter);
3946 test_path_crbugskia2820(reporter); 3946 test_path_crbugskia2820(reporter);
3947 test_skbug_3469(reporter); 3947 test_skbug_3469(reporter);
3948 test_skbug_3239(reporter); 3948 test_skbug_3239(reporter);
3949 test_bounds_crbug_513799(reporter); 3949 test_bounds_crbug_513799(reporter);
3950 } 3950 }
OLDNEW
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698