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

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

Issue 2250573003: fix fuzz bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: another fuzz fix Created 4 years, 4 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 | « no previous file | src/pathops/SkPathOpsTSect.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 2015 Google Inc. 2 * Copyright 2015 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 "SkOpCoincidence.h" 7 #include "SkOpCoincidence.h"
8 #include "SkOpSegment.h" 8 #include "SkOpSegment.h"
9 #include "SkPathOpsTSect.h" 9 #include "SkPathOpsTSect.h"
10 10
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 if (oeExisting && (oeExisting == os || oeExisting->contains(osExisting ? osE xisting : os))) { 687 if (oeExisting && (oeExisting == os || oeExisting->contains(osExisting ? osE xisting : os))) {
688 return false; 688 return false;
689 } 689 }
690 // extra line in debug code 690 // extra line in debug code
691 this->debugValidate(); 691 this->debugValidate();
692 if (!cs || !os) { 692 if (!cs || !os) {
693 SkOpPtT* csWritable = cs ? const_cast<SkOpPtT*>(cs) 693 SkOpPtT* csWritable = cs ? const_cast<SkOpPtT*>(cs)
694 : coinSeg->addT(coinTs, SkOpSegment::kNoAliasMatch, nullptr); 694 : coinSeg->addT(coinTs, SkOpSegment::kNoAliasMatch, nullptr);
695 SkOpPtT* osWritable = os ? const_cast<SkOpPtT*>(os) 695 SkOpPtT* osWritable = os ? const_cast<SkOpPtT*>(os)
696 : oppSeg->addT(oppTs, SkOpSegment::kNoAliasMatch, nullptr); 696 : oppSeg->addT(oppTs, SkOpSegment::kNoAliasMatch, nullptr);
697 if (!osWritable) { 697 if (!csWritable || !osWritable) {
698 return false; 698 return false;
699 } 699 }
700 csWritable->span()->addOppAndMerge(osWritable->span()); 700 csWritable->span()->addOppAndMerge(osWritable->span());
701 cs = csWritable; 701 cs = csWritable;
702 os = osWritable; 702 os = osWritable;
703 if ((ce && ce->deleted()) || (oe && oe->deleted())) { 703 if ((ce && ce->deleted()) || (oe && oe->deleted())) {
704 return false; 704 return false;
705 } 705 }
706 } 706 }
707 if (!ce || !oe) { 707 if (!ce || !oe) {
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 this->release(fHead, coin); 1472 this->release(fHead, coin);
1473 } 1473 }
1474 } while ((coin = coin->next())); 1474 } while ((coin = coin->next()));
1475 } 1475 }
1476 1476
1477 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S kOpPtT* testS, 1477 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S kOpPtT* testS,
1478 const SkOpPtT* testE) const { 1478 const SkOpPtT* testE) const {
1479 return testS->segment()->testForCoincidence(testS, testE, testS->span(), 1479 return testS->segment()->testForCoincidence(testS, testE, testS->span(),
1480 testE->span(), outer->coinPtTStart()->segment()); 1480 testE->span(), outer->coinPtTStart()->segment());
1481 } 1481 }
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkPathOpsTSect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698