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

Unified Diff: src/pathops/SkOpAngle.h

Issue 272153002: fix bugs found by computing flat clips in 800K skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix maybe-uninitialized error in unbuntu Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkIntersections.cpp ('k') | src/pathops/SkOpAngle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpAngle.h
diff --git a/src/pathops/SkOpAngle.h b/src/pathops/SkOpAngle.h
index e5669133e45486df9ab4deea0df39c58b26d6e97..63d378d73ce6190485ceefb32d9e1597249bf824 100644
--- a/src/pathops/SkOpAngle.h
+++ b/src/pathops/SkOpAngle.h
@@ -7,6 +7,7 @@
#ifndef SkOpAngle_DEFINED
#define SkOpAngle_DEFINED
+#include "SkChunkAlloc.h"
#include "SkLineParameters.h"
class SkOpSegment;
@@ -81,13 +82,19 @@ public:
void debugSameAs(const SkOpAngle* compare) const;
#endif
void dump() const;
- void dumpFromTo(const SkOpSegment* fromSeg, int from, int to) const;
+ void dumpLoop() const;
+ void dumpTo(const SkOpSegment* fromSeg, const SkOpAngle* ) const;
#if DEBUG_ANGLE
+ int debugID() const { return fID; }
+
void setID(int id) {
fID = id;
}
+#else
+ int debugID() const { return 0; }
#endif
+
#if DEBUG_VALIDATE
void debugValidateLoop() const;
#endif
@@ -121,6 +128,7 @@ private:
SkDVector fSweep[2];
int fStart;
int fEnd;
+ int fComputedEnd;
int fSectorMask;
int8_t fSectorStart; // in 32nds of a circle
int8_t fSectorEnd;
@@ -131,11 +139,7 @@ private:
bool fComputeSector;
bool fComputedSector;
-#if DEBUG_SORT
- void debugOne(bool showFunc) const; // available to testing only
-#endif
#if DEBUG_ANGLE
- int debugID() const { return fID; }
int fID;
#endif
#if DEBUG_VALIDATE
@@ -143,9 +147,23 @@ private:
#else
void debugValidateNext() const {}
#endif
- void dumpLoop() const; // utility to be called by user from debugger
+ void dumpOne(bool showFunc) const; // available to testing only
void dumpPartials() const; // utility to be called by user from debugger
friend class PathOpsAngleTester;
};
+class SkOpAngleSet {
+public:
+ SkOpAngleSet();
+ ~SkOpAngleSet();
+ SkOpAngle& push_back();
+ void reset();
+private:
+ void dump() const; // utility to be called by user from debugger
+#if DEBUG_ANGLE
+ int fCount;
+#endif
+ SkChunkAlloc* fAngles;
+};
+
#endif
« no previous file with comments | « src/pathops/SkIntersections.cpp ('k') | src/pathops/SkOpAngle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698