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

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

Issue 517023003: Add dirty_after_edit to SkPath::moveTo. Add commented out test case that triggers assert. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 6 years, 3 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 | tests/PathTest.cpp » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #include "SkBuffer.h" 10 #include "SkBuffer.h"
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 void SkPath::moveTo(SkScalar x, SkScalar y) { 665 void SkPath::moveTo(SkScalar x, SkScalar y) {
666 SkDEBUGCODE(this->validate();) 666 SkDEBUGCODE(this->validate();)
667 667
668 SkPathRef::Editor ed(&fPathRef); 668 SkPathRef::Editor ed(&fPathRef);
669 669
670 // remember our index 670 // remember our index
671 fLastMoveToIndex = fPathRef->countPoints(); 671 fLastMoveToIndex = fPathRef->countPoints();
672 672
673 ed.growForVerb(kMove_Verb)->set(x, y); 673 ed.growForVerb(kMove_Verb)->set(x, y);
674
675 DIRTY_AFTER_EDIT;
674 } 676 }
675 677
676 void SkPath::rMoveTo(SkScalar x, SkScalar y) { 678 void SkPath::rMoveTo(SkScalar x, SkScalar y) {
677 SkPoint pt; 679 SkPoint pt;
678 this->getLastPt(&pt); 680 this->getLastPt(&pt);
679 this->moveTo(pt.fX + x, pt.fY + y); 681 this->moveTo(pt.fX + x, pt.fY + y);
680 } 682 }
681 683
682 void SkPath::injectMoveToIfNeeded() { 684 void SkPath::injectMoveToIfNeeded() {
683 if (fLastMoveToIndex < 0) { 685 if (fLastMoveToIndex < 0) {
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 switch (this->getFillType()) { 2794 switch (this->getFillType()) {
2793 case SkPath::kEvenOdd_FillType: 2795 case SkPath::kEvenOdd_FillType:
2794 case SkPath::kInverseEvenOdd_FillType: 2796 case SkPath::kInverseEvenOdd_FillType:
2795 w &= 1; 2797 w &= 1;
2796 break; 2798 break;
2797 default: 2799 default:
2798 break; 2800 break;
2799 } 2801 }
2800 return SkToBool(w); 2802 return SkToBool(w);
2801 } 2803 }
OLDNEW
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698