| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "SkBoundaryPatch.h" | 8 #include "SkBoundaryPatch.h" |
| 9 | 9 |
| 10 SK_DEFINE_INST_COUNT(SkBoundary) | |
| 11 | |
| 12 SkBoundaryPatch::SkBoundaryPatch() : fBoundary(NULL) {} | 10 SkBoundaryPatch::SkBoundaryPatch() : fBoundary(NULL) {} |
| 13 | 11 |
| 14 SkBoundaryPatch::~SkBoundaryPatch() { | 12 SkBoundaryPatch::~SkBoundaryPatch() { |
| 15 SkSafeUnref(fBoundary); | 13 SkSafeUnref(fBoundary); |
| 16 } | 14 } |
| 17 | 15 |
| 18 SkBoundary* SkBoundaryPatch::setBoundary(SkBoundary* b) { | 16 SkBoundary* SkBoundaryPatch::setBoundary(SkBoundary* b) { |
| 19 SkRefCnt_SafeAssign(fBoundary, b); | 17 SkRefCnt_SafeAssign(fBoundary, b); |
| 20 return b; | 18 return b; |
| 21 } | 19 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 SkPoint SkCubicBoundary::eval(Edge e, SkScalar t) { | 70 SkPoint SkCubicBoundary::eval(Edge e, SkScalar t) { |
| 73 SkASSERT((unsigned)e < 4); | 71 SkASSERT((unsigned)e < 4); |
| 74 | 72 |
| 75 // ensure our 4th cubic wraps to the start of the first | 73 // ensure our 4th cubic wraps to the start of the first |
| 76 fPts[12] = fPts[0]; | 74 fPts[12] = fPts[0]; |
| 77 | 75 |
| 78 SkPoint loc; | 76 SkPoint loc; |
| 79 SkEvalCubicAt(&fPts[e * 3], t, &loc, NULL, NULL); | 77 SkEvalCubicAt(&fPts[e * 3], t, &loc, NULL, NULL); |
| 80 return loc; | 78 return loc; |
| 81 } | 79 } |
| OLD | NEW |