OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBuffer.h" | 8 #include "SkBuffer.h" |
9 #include "SkOnce.h" | 9 #include "SkOnce.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
11 #include "SkPathRef.h" | 11 #include "SkPathRef.h" |
12 | 12 |
13 SK_DEFINE_INST_COUNT(SkPathRef); | |
14 | |
15 ////////////////////////////////////////////////////////////////////////////// | 13 ////////////////////////////////////////////////////////////////////////////// |
16 SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef, | 14 SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef, |
17 int incReserveVerbs, | 15 int incReserveVerbs, |
18 int incReservePoints) | 16 int incReservePoints) |
19 { | 17 { |
20 if ((*pathRef)->unique()) { | 18 if ((*pathRef)->unique()) { |
21 (*pathRef)->incReserve(incReserveVerbs, incReservePoints); | 19 (*pathRef)->incReserve(incReserveVerbs, incReservePoints); |
22 } else { | 20 } else { |
23 SkPathRef* copy = SkNEW(SkPathRef); | 21 SkPathRef* copy = SkNEW(SkPathRef); |
24 copy->copy(**pathRef, incReserveVerbs, incReservePoints); | 22 copy->copy(**pathRef, incReserveVerbs, incReservePoints); |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero && | 364 fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero && |
367 fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero)); | 365 fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero)); |
368 if (!fPoints[i].isFinite()) { | 366 if (!fPoints[i].isFinite()) { |
369 isFinite = false; | 367 isFinite = false; |
370 } | 368 } |
371 } | 369 } |
372 SkASSERT(SkToBool(fIsFinite) == isFinite); | 370 SkASSERT(SkToBool(fIsFinite) == isFinite); |
373 } | 371 } |
374 } | 372 } |
375 #endif | 373 #endif |
OLD | NEW |