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

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

Issue 18029006: Remove SK_DEBUG_PATH_REF (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkPath.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 #ifndef SkPath_DEFINED 10 #ifndef SkPath_DEFINED
(...skipping 12 matching lines...) Expand all
23 #define GEN_ID_PTR_INC(ptr) 23 #define GEN_ID_PTR_INC(ptr)
24 #endif 24 #endif
25 25
26 class SkReader32; 26 class SkReader32;
27 class SkWriter32; 27 class SkWriter32;
28 class SkAutoPathBoundsUpdate; 28 class SkAutoPathBoundsUpdate;
29 class SkString; 29 class SkString;
30 class SkPathRef; 30 class SkPathRef;
31 class SkRRect; 31 class SkRRect;
32 32
33 #ifndef SK_DEBUG_PATH_REF
34 #define SK_DEBUG_PATH_REF 0
35 #endif
36
37 /** \class SkPath 33 /** \class SkPath
38 34
39 The SkPath class encapsulates compound (multiple contour) geometric paths 35 The SkPath class encapsulates compound (multiple contour) geometric paths
40 consisting of straight line segments, quadratic curves, and cubic curves. 36 consisting of straight line segments, quadratic curves, and cubic curves.
41 */ 37 */
42 class SK_API SkPath { 38 class SK_API SkPath {
43 public: 39 public:
44 SK_DECLARE_INST_COUNT_ROOT(SkPath); 40 SK_DECLARE_INST_COUNT_ROOT(SkPath);
45 41
46 SkPath(); 42 SkPath();
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 private: 934 private:
939 enum SerializationOffsets { 935 enum SerializationOffsets {
940 kDirection_SerializationShift = 26, // requires 2 bits 936 kDirection_SerializationShift = 26, // requires 2 bits
941 kIsFinite_SerializationShift = 25, // requires 1 bit 937 kIsFinite_SerializationShift = 25, // requires 1 bit
942 kIsOval_SerializationShift = 24, // requires 1 bit 938 kIsOval_SerializationShift = 24, // requires 1 bit
943 kConvexity_SerializationShift = 16, // requires 2 bits 939 kConvexity_SerializationShift = 16, // requires 2 bits
944 kFillType_SerializationShift = 8, // requires 2 bits 940 kFillType_SerializationShift = 8, // requires 2 bits
945 kSegmentMask_SerializationShift = 0 // requires 4 bits 941 kSegmentMask_SerializationShift = 0 // requires 4 bits
946 }; 942 };
947 943
948 #if SK_DEBUG_PATH_REF
949 public:
950 /** Debugging wrapper for SkAutoTUnref<SkPathRef> used to track owners (SkPa ths)
951 of SkPathRefs */
952 class PathRefDebugRef {
953 public:
954 PathRefDebugRef(SkPathRef* pr, SkPath* owner);
955 ~PathRefDebugRef();
956 void reset(SkPathRef* ref);
957 void swap(PathRefDebugRef* other);
958 SkPathRef* get() const;
959 SkAutoTUnref<SkPathRef>::BlockRefType *operator->() const;
960 operator SkPathRef*();
961 private:
962 SkAutoTUnref<SkPathRef> fPathRef;
963 SkPath* fOwner;
964 };
965
966 private:
967 PathRefDebugRef fPathRef;
968 #else
969 SkAutoTUnref<SkPathRef> fPathRef; 944 SkAutoTUnref<SkPathRef> fPathRef;
970 #endif
971 945
972 mutable SkRect fBounds; 946 mutable SkRect fBounds;
973 int fLastMoveToIndex; 947 int fLastMoveToIndex;
974 uint8_t fFillType; 948 uint8_t fFillType;
975 uint8_t fSegmentMask; 949 uint8_t fSegmentMask;
976 mutable uint8_t fBoundsIsDirty; 950 mutable uint8_t fBoundsIsDirty;
977 mutable uint8_t fConvexity; 951 mutable uint8_t fConvexity;
978 mutable uint8_t fDirection; 952 mutable uint8_t fDirection;
979 mutable SkBool8 fIsFinite; // only meaningful if bounds are valid 953 mutable SkBool8 fIsFinite; // only meaningful if bounds are valid
980 mutable SkBool8 fIsOval; 954 mutable SkBool8 fIsOval;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, 1003 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts,
1030 bool* isClosed, Direction* direction) const; 1004 bool* isClosed, Direction* direction) const;
1031 1005
1032 friend class SkAutoPathBoundsUpdate; 1006 friend class SkAutoPathBoundsUpdate;
1033 friend class SkAutoDisableOvalCheck; 1007 friend class SkAutoDisableOvalCheck;
1034 friend class SkAutoDisableDirectionCheck; 1008 friend class SkAutoDisableDirectionCheck;
1035 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo 1009 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo
1036 }; 1010 };
1037 1011
1038 #endif 1012 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698