new scanconversion technique
This technique geometrically clips all segments against the clip bounds,
ensuring that we never send a value to the edgelist that might overflow in
fixedpoint.
Current disabled in SkScan_Path.cpp by a #define. There are a few minor pixel
differences between this and the old technique, as found by the gm tool, so
at the moment this new code is off by default.
git-svn-id: http://skia.googlecode.com/svn/trunk@432 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkEdgeBuilder.h b/src/core/SkEdgeBuilder.h
new file mode 100644
index 0000000..e9ed519
--- /dev/null
+++ b/src/core/SkEdgeBuilder.h
@@ -0,0 +1,31 @@
+#ifndef SkEdgeBuilder_DEFINED
+#define SkEdgeBuilder_DEFINED
+
+#include "SkChunkAlloc.h"
+#include "SkRect.h"
+#include "SkTDArray.h"
+
+class SkEdge;
+class SkEdgeClipper;
+class SkPath;
+
+class SkEdgeBuilder {
+public:
+ SkEdgeBuilder();
+
+ int build(const SkPath& path, const SkIRect* clip, int shiftUp);
+
+ SkEdge** edgeList() { return fList.begin(); }
+
+private:
+ SkChunkAlloc fAlloc;
+ SkTDArray<SkEdge*> fList;
+ int fShiftUp;
+
+ void addLine(const SkPoint pts[]);
+ void addQuad(const SkPoint pts[]);
+ void addCubic(const SkPoint pts[]);
+ void addClipper(SkEdgeClipper*);
+};
+
+#endif