Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/core/SkPath.cpp

Issue 1620333002: Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkTypes.h ('k') | src/core/SkRegionPriv.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkCubicClipper.h" 9 #include "SkCubicClipper.h"
10 #include "SkErrorInternals.h" 10 #include "SkErrorInternals.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 break; 268 break;
269 default: 269 default:
270 SkDEBUGFAIL("unknown verb"); 270 SkDEBUGFAIL("unknown verb");
271 } 271 }
272 if (-1 != nextPt) { 272 if (-1 != nextPt) {
273 if (SkPath::kConic_Verb == verb) { 273 if (SkPath::kConic_Verb == verb) {
274 SkConic orig; 274 SkConic orig;
275 orig.set(pts, iter.conicWeight()); 275 orig.set(pts, iter.conicWeight());
276 SkPoint quadPts[5]; 276 SkPoint quadPts[5];
277 int count = orig.chopIntoQuadsPOW2(quadPts, 1); 277 int count = orig.chopIntoQuadsPOW2(quadPts, 1);
278 SkASSERT_RELEASE(2 == count); 278 SK_ALWAYSBREAK(2 == count);
279 279
280 if (!check_edge_against_rect(quadPts[0], quadPts[2], rect, direc tion)) { 280 if (!check_edge_against_rect(quadPts[0], quadPts[2], rect, direc tion)) {
281 return false; 281 return false;
282 } 282 }
283 if (!check_edge_against_rect(quadPts[2], quadPts[4], rect, direc tion)) { 283 if (!check_edge_against_rect(quadPts[2], quadPts[4], rect, direc tion)) {
284 return false; 284 return false;
285 } 285 }
286 } else { 286 } else {
287 if (!check_edge_against_rect(prevPt, pts[nextPt], rect, directio n)) { 287 if (!check_edge_against_rect(prevPt, pts[nextPt], rect, directio n)) {
288 return false; 288 return false;
(...skipping 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 } 3084 }
3085 } while (!done); 3085 } while (!done);
3086 return SkToBool(tangents.count()) ^ isInverse; 3086 return SkToBool(tangents.count()) ^ isInverse;
3087 } 3087 }
3088 3088
3089 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo int& p2, 3089 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPo int& p2,
3090 SkScalar w, SkPoint pts[], int pow2) { 3090 SkScalar w, SkPoint pts[], int pow2) {
3091 const SkConic conic(p0, p1, p2, w); 3091 const SkConic conic(p0, p1, p2, w);
3092 return conic.chopIntoQuadsPOW2(pts, pow2); 3092 return conic.chopIntoQuadsPOW2(pts, pow2);
3093 } 3093 }
OLDNEW
« no previous file with comments | « include/core/SkTypes.h ('k') | src/core/SkRegionPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698