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

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

Issue 953383002: fuzzer fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix up width and height in initializer Created 5 years, 9 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 | « samplecode/SampleTextOnPath.cpp ('k') | src/core/SkStroke.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkErrorInternals.h" 9 #include "SkErrorInternals.h"
10 #include "SkGeometry.h" 10 #include "SkGeometry.h"
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 SkPathRef::Editor ed(&fPathRef, count+close, count); 856 SkPathRef::Editor ed(&fPathRef, count+close, count);
857 857
858 ed.growForVerb(kMove_Verb)->set(pts[0].fX, pts[0].fY); 858 ed.growForVerb(kMove_Verb)->set(pts[0].fX, pts[0].fY);
859 if (count > 1) { 859 if (count > 1) {
860 SkPoint* p = ed.growForRepeatedVerb(kLine_Verb, count - 1); 860 SkPoint* p = ed.growForRepeatedVerb(kLine_Verb, count - 1);
861 memcpy(p, &pts[1], (count-1) * sizeof(SkPoint)); 861 memcpy(p, &pts[1], (count-1) * sizeof(SkPoint));
862 } 862 }
863 863
864 if (close) { 864 if (close) {
865 ed.growForVerb(kClose_Verb); 865 ed.growForVerb(kClose_Verb);
866 fLastMoveToIndex ^= ~fLastMoveToIndex >> (8 * sizeof(fLastMoveToIndex) - 1);
866 } 867 }
867 868
868 DIRTY_AFTER_EDIT; 869 DIRTY_AFTER_EDIT;
869 SkDEBUGCODE(this->validate();) 870 SkDEBUGCODE(this->validate();)
870 } 871 }
871 872
872 #include "SkGeometry.h" 873 #include "SkGeometry.h"
873 874
874 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, 875 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
875 SkPoint* pt) { 876 SkPoint* pt) {
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 switch (this->getFillType()) { 2792 switch (this->getFillType()) {
2792 case SkPath::kEvenOdd_FillType: 2793 case SkPath::kEvenOdd_FillType:
2793 case SkPath::kInverseEvenOdd_FillType: 2794 case SkPath::kInverseEvenOdd_FillType:
2794 w &= 1; 2795 w &= 1;
2795 break; 2796 break;
2796 default: 2797 default:
2797 break; 2798 break;
2798 } 2799 }
2799 return SkToBool(w); 2800 return SkToBool(w);
2800 } 2801 }
OLDNEW
« no previous file with comments | « samplecode/SampleTextOnPath.cpp ('k') | src/core/SkStroke.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698