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

Side by Side Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 257393004: Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whitespace change Created 6 years, 7 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 8
9 #include "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 data->fStage = DegenerateTestData::kLine; 196 data->fStage = DegenerateTestData::kLine;
197 } 197 }
198 break; 198 break;
199 case DegenerateTestData::kLine: 199 case DegenerateTestData::kLine:
200 if (SkScalarAbs(data->fLineNormal.dot(pt) + data->fLineC) > kClose) { 200 if (SkScalarAbs(data->fLineNormal.dot(pt) + data->fLineC) > kClose) {
201 data->fStage = DegenerateTestData::kNonDegenerate; 201 data->fStage = DegenerateTestData::kNonDegenerate;
202 } 202 }
203 case DegenerateTestData::kNonDegenerate: 203 case DegenerateTestData::kNonDegenerate:
204 break; 204 break;
205 default: 205 default:
206 GrCrash("Unexpected degenerate test stage."); 206 SkFAIL("Unexpected degenerate test stage.");
207 } 207 }
208 } 208 }
209 209
210 static inline bool get_direction(const SkPath& path, const SkMatrix& m, SkPath:: Direction* dir) { 210 static inline bool get_direction(const SkPath& path, const SkMatrix& m, SkPath:: Direction* dir) {
211 if (!path.cheapComputeDirection(dir)) { 211 if (!path.cheapComputeDirection(dir)) {
212 return false; 212 return false;
213 } 213 }
214 // check whether m reverses the orientation 214 // check whether m reverses the orientation
215 SkASSERT(!m.hasPerspective()); 215 SkASSERT(!m.hasPerspective());
216 SkScalar det2x2 = SkScalarMul(m.get(SkMatrix::kMScaleX), m.get(SkMatrix::kMS caleY)) - 216 SkScalar det2x2 = SkScalarMul(m.get(SkMatrix::kMScaleX), m.get(SkMatrix::kMS caleY)) -
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 vOffset, // start vertex 708 vOffset, // start vertex
709 0, // start index 709 0, // start index
710 draw.fVertexCnt, 710 draw.fVertexCnt,
711 draw.fIndexCnt, 711 draw.fIndexCnt,
712 &devBounds); 712 &devBounds);
713 vOffset += draw.fVertexCnt; 713 vOffset += draw.fVertexCnt;
714 } 714 }
715 715
716 return true; 716 return true;
717 } 717 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698