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 1917223006: Fix warnings that were exposed when running with SK_DEBUG enable on an optimized release build. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | 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 "SkAddIntersections.h" 7 #include "SkAddIntersections.h"
8 #include "SkOpCoincidence.h" 8 #include "SkOpCoincidence.h"
9 #include "SkOpEdgeBuilder.h" 9 #include "SkOpEdgeBuilder.h"
10 #include "SkPathOpsCommon.h" 10 #include "SkPathOpsCommon.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 if (sortable) { 106 if (sortable) {
107 segment = angle->segment(); 107 segment = angle->segment();
108 sumWinding = segment->updateWindingReverse(angle); 108 sumWinding = segment->updateWindingReverse(angle);
109 } 109 }
110 SkOpSegment* first = nullptr; 110 SkOpSegment* first = nullptr;
111 const SkOpAngle* firstAngle = angle; 111 const SkOpAngle* firstAngle = angle;
112 while ((angle = angle->next()) != firstAngle) { 112 while ((angle = angle->next()) != firstAngle) {
113 segment = angle->segment(); 113 segment = angle->segment();
114 SkOpSpanBase* start = angle->start(); 114 SkOpSpanBase* start = angle->start();
115 SkOpSpanBase* end = angle->end(); 115 SkOpSpanBase* end = angle->end();
116 int maxWinding; 116 int maxWinding SK_INIT_TO_AVOID_WARNING;
117 if (sortable) { 117 if (sortable) {
118 segment->setUpWinding(start, end, &maxWinding, &sumWinding); 118 segment->setUpWinding(start, end, &maxWinding, &sumWinding);
119 } 119 }
120 if (!segment->done(angle)) { 120 if (!segment->done(angle)) {
121 if (!first && (sortable || start->starter(end)->windSum() != SK_ MinS32)) { 121 if (!first && (sortable || start->starter(end)->windSum() != SK_ MinS32)) {
122 first = segment; 122 first = segment;
123 *startPtr = start; 123 *startPtr = start;
124 *endPtr = end; 124 *endPtr = end;
125 } 125 }
126 // OPTIMIZATION: should this also add to the chase? 126 // OPTIMIZATION: should this also add to the chase?
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 if (!coincidence->apply()) { 529 if (!coincidence->apply()) {
530 return false; 530 return false;
531 } 531 }
532 } 532 }
533 #if DEBUG_ACTIVE_SPANS 533 #if DEBUG_ACTIVE_SPANS
534 coincidence->debugShowCoincidence(); 534 coincidence->debugShowCoincidence();
535 DebugShowActiveSpans(contourList); 535 DebugShowActiveSpans(contourList);
536 #endif 536 #endif
537 return true; 537 return true;
538 } 538 }
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698