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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkParse.h" | 10 #include "SkParse.h" |
(...skipping 3359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3370 ed.resetToSize(0, 0, 0); | 3370 ed.resetToSize(0, 0, 0); |
3371 } | 3371 } |
3372 | 3372 |
3373 { | 3373 { |
3374 SkScalar* weights = NULL; | 3374 SkScalar* weights = NULL; |
3375 ed.growForRepeatedVerb(SkPath::kConic_Verb, kRepeatCnt, &weights); | 3375 ed.growForRepeatedVerb(SkPath::kConic_Verb, kRepeatCnt, &weights); |
3376 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); | 3376 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); |
3377 REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints()); | 3377 REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints()); |
3378 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countWeights()); | 3378 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countWeights()); |
3379 REPORTER_ASSERT(reporter, SkPath::kConic_SegmentMask == pathRef->get
SegmentMasks()); | 3379 REPORTER_ASSERT(reporter, SkPath::kConic_SegmentMask == pathRef->get
SegmentMasks()); |
3380 REPORTER_ASSERT(reporter, NULL != weights); | 3380 REPORTER_ASSERT(reporter, weights); |
3381 for (int i = 0; i < kRepeatCnt; ++i) { | 3381 for (int i = 0; i < kRepeatCnt; ++i) { |
3382 REPORTER_ASSERT(reporter, SkPath::kConic_Verb == pathRef->atVerb
(i)); | 3382 REPORTER_ASSERT(reporter, SkPath::kConic_Verb == pathRef->atVerb
(i)); |
3383 } | 3383 } |
3384 ed.resetToSize(0, 0, 0); | 3384 ed.resetToSize(0, 0, 0); |
3385 } | 3385 } |
3386 | 3386 |
3387 { | 3387 { |
3388 ed.growForRepeatedVerb(SkPath::kCubic_Verb, kRepeatCnt); | 3388 ed.growForRepeatedVerb(SkPath::kCubic_Verb, kRepeatCnt); |
3389 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); | 3389 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); |
3390 REPORTER_ASSERT(reporter, 3*kRepeatCnt == pathRef->countPoints()); | 3390 REPORTER_ASSERT(reporter, 3*kRepeatCnt == pathRef->countPoints()); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3601 test_addEmptyPath(reporter, SkPath::kExtend_AddPathMode); | 3601 test_addEmptyPath(reporter, SkPath::kExtend_AddPathMode); |
3602 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); | 3602 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); |
3603 test_conicTo_special_case(reporter); | 3603 test_conicTo_special_case(reporter); |
3604 test_get_point(reporter); | 3604 test_get_point(reporter); |
3605 test_contains(reporter); | 3605 test_contains(reporter); |
3606 PathTest_Private::TestPathTo(reporter); | 3606 PathTest_Private::TestPathTo(reporter); |
3607 PathRefTest_Private::TestPathRef(reporter); | 3607 PathRefTest_Private::TestPathRef(reporter); |
3608 test_dump(reporter); | 3608 test_dump(reporter); |
3609 test_path_crbugskia2820(reporter); | 3609 test_path_crbugskia2820(reporter); |
3610 } | 3610 } |
OLD | NEW |