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

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

Issue 2061833005: disallow -4 pointer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 2013 Google Inc. 2 * Copyright 2013 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 7
8 #include "SkBuffer.h" 8 #include "SkBuffer.h"
9 #include "SkOnce.h" 9 #include "SkOnce.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 612 }
613 613
614 SkPathRef::Iter::Iter(const SkPathRef& path) { 614 SkPathRef::Iter::Iter(const SkPathRef& path) {
615 this->setPathRef(path); 615 this->setPathRef(path);
616 } 616 }
617 617
618 void SkPathRef::Iter::setPathRef(const SkPathRef& path) { 618 void SkPathRef::Iter::setPathRef(const SkPathRef& path) {
619 fPts = path.points(); 619 fPts = path.points();
620 fVerbs = path.verbs(); 620 fVerbs = path.verbs();
621 fVerbStop = path.verbsMemBegin(); 621 fVerbStop = path.verbsMemBegin();
622 fConicWeights = path.conicWeights() - 1; // begin one behind 622 fConicWeights = path.conicWeights();
623 if (fConicWeights) {
624 fConicWeights -= 1; // begin one behind
625 }
623 } 626 }
624 627
625 uint8_t SkPathRef::Iter::next(SkPoint pts[4]) { 628 uint8_t SkPathRef::Iter::next(SkPoint pts[4]) {
626 SkASSERT(pts); 629 SkASSERT(pts);
627 if (fVerbs == fVerbStop) { 630 if (fVerbs == fVerbStop) {
628 return (uint8_t) SkPath::kDone_Verb; 631 return (uint8_t) SkPath::kDone_Verb;
629 } 632 }
630 633
631 // fVerbs points one beyond next verb so decrement first. 634 // fVerbs points one beyond next verb so decrement first.
632 unsigned verb = *(--fVerbs); 635 unsigned verb = *(--fVerbs);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 break; 752 break;
750 default: 753 default:
751 SkDEBUGFAIL("Unknown Verb"); 754 SkDEBUGFAIL("Unknown Verb");
752 break; 755 break;
753 } 756 }
754 } 757 }
755 SkASSERT(mask == fSegmentMask); 758 SkASSERT(mask == fSegmentMask);
756 #endif // SK_DEBUG_PATH 759 #endif // SK_DEBUG_PATH
757 } 760 }
758 #endif 761 #endif
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