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

Side by Side Diff: src/pathops/SkPathOpsCommon.cpp

Issue 19543005: turn off debugging printfs (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove unused code Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkOpSegment.cpp ('k') | src/pathops/SkPathOpsCubic.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 2012 Google Inc. 2 * Copyright 2012 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 #include "SkOpEdgeBuilder.h" 7 #include "SkOpEdgeBuilder.h"
8 #include "SkPathOpsCommon.h" 8 #include "SkPathOpsCommon.h"
9 #include "SkPathWriter.h" 9 #include "SkPathWriter.h"
10 #include "SkTSort.h" 10 #include "SkTSort.h"
11 11
12 static int contourRangeCheckY(const SkTArray<SkOpContour*, true>& contourList, S kOpSegment** currentPtr, 12 static int contourRangeCheckY(const SkTArray<SkOpContour*, true>& contourList, S kOpSegment** currentPtr,
13 int* indexPtr, int* endIndexPtr, double* bestHit, SkScalar* bestDx, 13 int* indexPtr, int* endIndexPtr, double* bestHit, SkScalar* bestDx,
14 bool* tryAgain, double* midPtr, bool opp) { 14 bool* tryAgain, double* midPtr, bool opp) {
15 const int index = *indexPtr; 15 const int index = *indexPtr;
16 const int endIndex = *endIndexPtr; 16 const int endIndex = *endIndexPtr;
17 const double mid = *midPtr; 17 const double mid = *midPtr;
18 const SkOpSegment* current = *currentPtr; 18 const SkOpSegment* current = *currentPtr;
19 double tAtMid = current->tAtMid(index, endIndex, mid); 19 double tAtMid = current->tAtMid(index, endIndex, mid);
20 SkPoint basePt = current->xyAtT(tAtMid); 20 SkPoint basePt = current->ptAtT(tAtMid);
21 int contourCount = contourList.count(); 21 int contourCount = contourList.count();
22 SkScalar bestY = SK_ScalarMin; 22 SkScalar bestY = SK_ScalarMin;
23 SkOpSegment* bestSeg = NULL; 23 SkOpSegment* bestSeg = NULL;
24 int bestTIndex = 0; 24 int bestTIndex = 0;
25 bool bestOpp; 25 bool bestOpp;
26 bool hitSomething = false; 26 bool hitSomething = false;
27 for (int cTest = 0; cTest < contourCount; ++cTest) { 27 for (int cTest = 0; cTest < contourCount; ++cTest) {
28 SkOpContour* contour = contourList[cTest]; 28 SkOpContour* contour = contourList[cTest];
29 bool testOpp = contour->operand() ^ current->operand() ^ opp; 29 bool testOpp = contour->operand() ^ current->operand() ^ opp;
30 if (basePt.fY < contour->bounds().fTop) { 30 if (basePt.fY < contour->bounds().fTop) {
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 } 585 }
586 } 586 }
587 } while (rIndex < count); 587 } while (rIndex < count);
588 #if DEBUG_ASSEMBLE 588 #if DEBUG_ASSEMBLE
589 for (rIndex = 0; rIndex < count; ++rIndex) { 589 for (rIndex = 0; rIndex < count; ++rIndex) {
590 SkASSERT(sLink[rIndex] == SK_MaxS32); 590 SkASSERT(sLink[rIndex] == SK_MaxS32);
591 SkASSERT(eLink[rIndex] == SK_MaxS32); 591 SkASSERT(eLink[rIndex] == SK_MaxS32);
592 } 592 }
593 #endif 593 #endif
594 } 594 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpSegment.cpp ('k') | src/pathops/SkPathOpsCubic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698