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

Side by Side Diff: include/core/SkPath.h

Issue 1330623003: more zero-length changes for svg compatibility (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove inline from hasOnlyMoveTo() Created 5 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
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 #ifndef SkPath_DEFINED 8 #ifndef SkPath_DEFINED
9 #define SkPath_DEFINED 9 #define SkPath_DEFINED
10 10
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 void reversePathTo(const SkPath&); 969 void reversePathTo(const SkPath&);
970 970
971 // called before we add points for lineTo, quadTo, cubicTo, checking to see 971 // called before we add points for lineTo, quadTo, cubicTo, checking to see
972 // if we need to inject a leading moveTo first 972 // if we need to inject a leading moveTo first
973 // 973 //
974 // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) 974 // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0)
975 // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(previou s moveTo) 975 // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(previou s moveTo)
976 // 976 //
977 inline void injectMoveToIfNeeded(); 977 inline void injectMoveToIfNeeded();
978 978
979 inline bool hasOnlyMoveTos() const; 979 bool hasOnlyMoveTos() const;
reed1 2015/09/03 19:07:27 Not part of this CL, but do you know why we comput
caryclark 2015/09/03 19:37:57 I didn't know this function existed! Certainly mak
980 980
981 Convexity internalGetConvexity() const; 981 Convexity internalGetConvexity() const;
982 982
983 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, 983 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts,
984 bool* isClosed, Direction* direction) const; 984 bool* isClosed, Direction* direction) const;
985 985
986 /** Returns if the path can return a bound at no cost (true) or will have to 986 /** Returns if the path can return a bound at no cost (true) or will have to
987 perform some computation (false). 987 perform some computation (false).
988 */ 988 */
989 bool hasComputedBounds() const { 989 bool hasComputedBounds() const {
990 SkDEBUGCODE(this->validate();) 990 SkDEBUGCODE(this->validate();)
991 return fPathRef->hasComputedBounds(); 991 return fPathRef->hasComputedBounds();
992 } 992 }
993 993
994 994
995 // 'rect' needs to be sorted 995 // 'rect' needs to be sorted
996 void setBounds(const SkRect& rect) { 996 void setBounds(const SkRect& rect) {
997 SkPathRef::Editor ed(&fPathRef); 997 SkPathRef::Editor ed(&fPathRef);
998 998
999 ed.setBounds(rect); 999 ed.setBounds(rect);
1000 } 1000 }
1001 1001
1002 void setPt(int index, SkScalar x, SkScalar y); 1002 void setPt(int index, SkScalar x, SkScalar y);
1003 1003
1004 friend class SkAutoPathBoundsUpdate; 1004 friend class SkAutoPathBoundsUpdate;
1005 friend class SkAutoDisableOvalCheck; 1005 friend class SkAutoDisableOvalCheck;
1006 friend class SkAutoDisableDirectionCheck; 1006 friend class SkAutoDisableDirectionCheck;
1007 friend class SkBench_AddPathTest; // perf test reversePathTo 1007 friend class SkBench_AddPathTest; // perf test reversePathTo
1008 friend class SkCanvas; // hasOnlyMoveTos
1008 friend class PathTest_Private; // unit test reversePathTo 1009 friend class PathTest_Private; // unit test reversePathTo
1009 }; 1010 };
1010 1011
1011 #endif 1012 #endif
OLDNEW
« no previous file with comments | « gm/strokes.cpp ('k') | src/core/SkCanvas.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698