diff options
author | Herb Derby <herb@google.com> | 2017-03-07 11:11:47 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-07 17:56:41 +0000 |
commit | c3cc5fa6de0a8237d9241dbf3e6c0786a9040069 (patch) | |
tree | 62f9d4a1aec2b8edb89ef2dc962d126e560f7703 /src/pathops/SkPathOpsWinding.cpp | |
parent | 5c7780e350f44c3415ba17304dd50a21da74e051 (diff) |
Move from SkChunkAlloc to SkArenaAlloc for PathOps
Attempt two. Remove ~SkOpContour because it is handled by the SkArenaAlloc.
Change-Id: Id3049db97aebcc1009d403a031f2fac219f58f2f
Reviewed-on: https://skia-review.googlesource.com/9381
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/pathops/SkPathOpsWinding.cpp')
-rw-r--r-- | src/pathops/SkPathOpsWinding.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pathops/SkPathOpsWinding.cpp b/src/pathops/SkPathOpsWinding.cpp index 7a61fd56b0..724e6f47bc 100644 --- a/src/pathops/SkPathOpsWinding.cpp +++ b/src/pathops/SkPathOpsWinding.cpp @@ -101,7 +101,7 @@ struct SkOpRayHit { }; void SkOpContour::rayCheck(const SkOpRayHit& base, SkOpRayDir dir, SkOpRayHit** hits, - SkChunkAlloc* allocator) { + SkArenaAlloc* allocator) { // if the bounds extreme is outside the best, we're done SkScalar baseXY = pt_xy(base.fPt, dir); SkScalar boundsXY = rect_side(fBounds, dir); @@ -116,7 +116,7 @@ void SkOpContour::rayCheck(const SkOpRayHit& base, SkOpRayDir dir, SkOpRayHit** } void SkOpSegment::rayCheck(const SkOpRayHit& base, SkOpRayDir dir, SkOpRayHit** hits, - SkChunkAlloc* allocator) { + SkArenaAlloc* allocator) { if (!sideways_overlap(fBounds, base.fPt, dir)) { return; } @@ -233,7 +233,8 @@ static double get_t_guess(int tTry, int* dirOffset) { } bool SkOpSpan::sortableTop(SkOpContour* contourHead) { - SkChunkAlloc allocator(1024); + char storage[1024]; + SkArenaAlloc allocator(storage); int dirOffset; double t = get_t_guess(fTopTTry++, &dirOffset); SkOpRayHit hitBase; |