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

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

Issue 65493004: increase coverage of SkPath.cpp, remove unused code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove dead code Created 7 years, 1 month 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 | Annotate | Revision Log
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 #ifndef SkPath_DEFINED 10 #ifndef SkPath_DEFINED
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 private: 883 private:
884 const SkPoint* fPts; 884 const SkPoint* fPts;
885 const uint8_t* fVerbs; 885 const uint8_t* fVerbs;
886 const uint8_t* fVerbStop; 886 const uint8_t* fVerbStop;
887 const SkScalar* fConicWeights; 887 const SkScalar* fConicWeights;
888 SkPoint fMoveTo; 888 SkPoint fMoveTo;
889 SkPoint fLastPt; 889 SkPoint fLastPt;
890 }; 890 };
891 891
892 /**
893 * Returns true if the point { x, y } is contained by the path, taking into
894 * account the FillType.
895 */
896 bool contains(SkScalar x, SkScalar y) const;
reed1 2013/11/13 18:37:52 This guy was written partly to optimize the code i
caryclark 2013/11/13 18:52:37 I can put it back. It isn't called today within Sk
reed1 2013/11/13 18:58:58 Well, it was called, until you removed the GM that
897
898 void dump(bool forceClose, const char title[] = NULL) const; 892 void dump(bool forceClose, const char title[] = NULL) const;
899 void dump() const; 893 void dump() const;
900 894
901 /** 895 /**
902 * Write the path to the buffer, and return the number of bytes written. 896 * Write the path to the buffer, and return the number of bytes written.
903 * If buffer is NULL, it still returns the number of bytes. 897 * If buffer is NULL, it still returns the number of bytes.
904 */ 898 */
905 size_t writeToMemory(void* buffer) const; 899 size_t writeToMemory(void* buffer) const;
906 /** 900 /**
907 * Initializes the path from the buffer 901 * Initializes the path from the buffer
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 959
966 /** Sets all fields other than fPathRef to the values in 'that'. 960 /** Sets all fields other than fPathRef to the values in 'that'.
967 * Assumes the caller has already set fPathRef. 961 * Assumes the caller has already set fPathRef.
968 * Doesn't change fGenerationID or fSourcePath on Android. 962 * Doesn't change fGenerationID or fSourcePath on Android.
969 */ 963 */
970 void copyFields(const SkPath& that); 964 void copyFields(const SkPath& that);
971 965
972 friend class Iter; 966 friend class Iter;
973 967
974 friend class SkPathStroker; 968 friend class SkPathStroker;
975 /* Append the first contour of path, ignoring path's initial point. If no
976 moveTo() call has been made for this contour, the first point is
977 automatically set to (0,0).
978 */
979 void pathTo(const SkPath& path);
980 969
981 /* Append, in reverse order, the first contour of path, ignoring path's 970 /* Append, in reverse order, the first contour of path, ignoring path's
982 last point. If no moveTo() call has been made for this contour, the 971 last point. If no moveTo() call has been made for this contour, the
983 first point is automatically set to (0,0). 972 first point is automatically set to (0,0).
984 */ 973 */
985 void reversePathTo(const SkPath&); 974 void reversePathTo(const SkPath&);
986 975
987 // called before we add points for lineTo, quadTo, cubicTo, checking to see 976 // called before we add points for lineTo, quadTo, cubicTo, checking to see
988 // if we need to inject a leading moveTo first 977 // if we need to inject a leading moveTo first
989 // 978 //
(...skipping 22 matching lines...) Expand all
1012 void setBounds(const SkRect& rect) { 1001 void setBounds(const SkRect& rect) {
1013 fPathRef->setBounds(rect); 1002 fPathRef->setBounds(rect);
1014 } 1003 }
1015 1004
1016 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO O 1005 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO O
1017 friend class SkPathRef; // just for SerializationOffsets 1006 friend class SkPathRef; // just for SerializationOffsets
1018 #endif 1007 #endif
1019 friend class SkAutoPathBoundsUpdate; 1008 friend class SkAutoPathBoundsUpdate;
1020 friend class SkAutoDisableOvalCheck; 1009 friend class SkAutoDisableOvalCheck;
1021 friend class SkAutoDisableDirectionCheck; 1010 friend class SkAutoDisableDirectionCheck;
1022 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo 1011 friend class SkBench_AddPathTest; // perf test reversePathTo
1012 friend class PathTest_Private; // unit test reversePathTo
1023 }; 1013 };
1024 1014
1025 #endif 1015 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/core/SkPath.cpp » ('j') | tests/PathTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698