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

Unified Diff: src/pathops/SkOpEdgeBuilder.h

Issue 1029993002: Revert of pathops version two (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpEdgeBuilder.h
diff --git a/src/pathops/SkOpEdgeBuilder.h b/src/pathops/SkOpEdgeBuilder.h
index 3ecc915833137b173547b18dee07ee0171ea30f4..fd0744572d9bc256df276bc5feb1acc136b61a9d 100644
--- a/src/pathops/SkOpEdgeBuilder.h
+++ b/src/pathops/SkOpEdgeBuilder.h
@@ -9,25 +9,20 @@
#include "SkOpContour.h"
#include "SkPathWriter.h"
+#include "SkTArray.h"
class SkOpEdgeBuilder {
public:
- SkOpEdgeBuilder(const SkPathWriter& path, SkOpContour* contours2, SkChunkAlloc* allocator,
- SkOpGlobalState* globalState)
- : fAllocator(allocator) // FIXME: replace with const, tune this
- , fGlobalState(globalState)
- , fPath(path.nativePath())
- , fContoursHead(contours2)
+ SkOpEdgeBuilder(const SkPathWriter& path, SkTArray<SkOpContour>& contours)
+ : fPath(path.nativePath())
+ , fContours(contours)
, fAllowOpenContours(true) {
init();
}
- SkOpEdgeBuilder(const SkPath& path, SkOpContour* contours2, SkChunkAlloc* allocator,
- SkOpGlobalState* globalState)
- : fAllocator(allocator)
- , fGlobalState(globalState)
- , fPath(&path)
- , fContoursHead(contours2)
+ SkOpEdgeBuilder(const SkPath& path, SkTArray<SkOpContour>& contours)
+ : fPath(&path)
+ , fContours(contours)
, fAllowOpenContours(false) {
init();
}
@@ -35,19 +30,13 @@
void addOperand(const SkPath& path);
void complete() {
- if (fCurrentContour && fCurrentContour->count()) {
+ if (fCurrentContour && fCurrentContour->segments().count()) {
fCurrentContour->complete();
fCurrentContour = NULL;
}
}
- int count() const;
- bool finish(SkChunkAlloc* );
-
- const SkOpContour* head() const {
- return fContoursHead;
- }
-
+ bool finish();
void init();
bool unparseable() const { return fUnparseable; }
SkPathOpsMask xorMask() const { return fXorMask[fOperand]; }
@@ -56,15 +45,13 @@
void closeContour(const SkPoint& curveEnd, const SkPoint& curveStart);
bool close();
int preFetch();
- bool walk(SkChunkAlloc* );
+ bool walk();
- SkChunkAlloc* fAllocator;
- SkOpGlobalState* fGlobalState;
const SkPath* fPath;
- SkTDArray<SkPoint> fPathPts;
- SkTDArray<uint8_t> fPathVerbs;
+ SkTArray<SkPoint, true> fPathPts;
+ SkTArray<uint8_t, true> fPathVerbs;
SkOpContour* fCurrentContour;
- SkOpContour* fContoursHead;
+ SkTArray<SkOpContour>& fContours;
SkPathOpsMask fXorMask[2];
int fSecondHalf;
bool fOperand;
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698