| OLD | NEW |
| 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 <cmath> | 8 #include <cmath> |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkGeometry.h" | 10 #include "SkGeometry.h" |
| (...skipping 3989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4000 REPORTER_ASSERT(reporter, p.contains(pts[i + 3].fX, pts[i + 3].fY)); | 4000 REPORTER_ASSERT(reporter, p.contains(pts[i + 3].fX, pts[i + 3].fY)); |
| 4001 REPORTER_ASSERT(reporter, p.contains(pts[i + 6].fX, pts[i + 6].fY)); | 4001 REPORTER_ASSERT(reporter, p.contains(pts[i + 6].fX, pts[i + 6].fY)); |
| 4002 } | 4002 } |
| 4003 } | 4003 } |
| 4004 | 4004 |
| 4005 class PathRefTest_Private { | 4005 class PathRefTest_Private { |
| 4006 public: | 4006 public: |
| 4007 static void TestPathRef(skiatest::Reporter* reporter) { | 4007 static void TestPathRef(skiatest::Reporter* reporter) { |
| 4008 static const int kRepeatCnt = 10; | 4008 static const int kRepeatCnt = 10; |
| 4009 | 4009 |
| 4010 SkAutoTUnref<SkPathRef> pathRef(new SkPathRef); | 4010 sk_sp<SkPathRef> pathRef(new SkPathRef); |
| 4011 | 4011 |
| 4012 SkPathRef::Editor ed(&pathRef); | 4012 SkPathRef::Editor ed(&pathRef); |
| 4013 | 4013 |
| 4014 { | 4014 { |
| 4015 ed.growForRepeatedVerb(SkPath::kMove_Verb, kRepeatCnt); | 4015 ed.growForRepeatedVerb(SkPath::kMove_Verb, kRepeatCnt); |
| 4016 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); | 4016 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); |
| 4017 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints()); | 4017 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints()); |
| 4018 REPORTER_ASSERT(reporter, 0 == pathRef->getSegmentMasks()); | 4018 REPORTER_ASSERT(reporter, 0 == pathRef->getSegmentMasks()); |
| 4019 for (int i = 0; i < kRepeatCnt; ++i) { | 4019 for (int i = 0; i < kRepeatCnt; ++i) { |
| 4020 REPORTER_ASSERT(reporter, SkPath::kMove_Verb == pathRef->atVerb(
i)); | 4020 REPORTER_ASSERT(reporter, SkPath::kMove_Verb == pathRef->atVerb(
i)); |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4442 PathRefTest_Private::TestPathRef(reporter); | 4442 PathRefTest_Private::TestPathRef(reporter); |
| 4443 PathTest_Private::TestPathrefListeners(reporter); | 4443 PathTest_Private::TestPathrefListeners(reporter); |
| 4444 test_dump(reporter); | 4444 test_dump(reporter); |
| 4445 test_path_crbug389050(reporter); | 4445 test_path_crbug389050(reporter); |
| 4446 test_path_crbugskia2820(reporter); | 4446 test_path_crbugskia2820(reporter); |
| 4447 test_skbug_3469(reporter); | 4447 test_skbug_3469(reporter); |
| 4448 test_skbug_3239(reporter); | 4448 test_skbug_3239(reporter); |
| 4449 test_bounds_crbug_513799(reporter); | 4449 test_bounds_crbug_513799(reporter); |
| 4450 test_fuzz_crbug_638223(); | 4450 test_fuzz_crbug_638223(); |
| 4451 } | 4451 } |
| OLD | NEW |