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

Unified Diff: src/gpu/GrAAConvexTessellator.h

Issue 1158803002: Added GrAAFlatteningConvexPathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebased Created 5 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 | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexTessellator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexTessellator.h
diff --git a/src/gpu/GrAAConvexTessellator.h b/src/gpu/GrAAConvexTessellator.h
index 707995fadd4b80e3e85cdbf73be61fdfb29a220c..93e8d4ba61716507b1d6b1febde241bcd1ae3709 100644
--- a/src/gpu/GrAAConvexTessellator.h
+++ b/src/gpu/GrAAConvexTessellator.h
@@ -165,7 +165,7 @@ private:
// Movable points are those that can be slid along their bisector.
// Basically, a point is immovable if it is part of the original
// polygon or it results from the fusing of two bisectors.
- int addPt(const SkPoint& pt, SkScalar depth, bool movable);
+ int addPt(const SkPoint& pt, SkScalar depth, bool movable, bool isCurve);
void popLastPt();
void popFirstPtShuffle();
@@ -185,6 +185,14 @@ private:
int edgeIdx, SkScalar desiredDepth,
SkPoint* result) const;
+ void lineTo(const SkMatrix& m, SkPoint p, bool isCurve);
+
+ void quadTo(const SkMatrix& m, SkPoint pts[3]);
+
+ void cubicTo(const SkMatrix& m, SkPoint pts[4]);
+
+ void conicTo(const SkMatrix& m, SkPoint pts[3], SkScalar w);
+
void terminate(const Ring& lastRing);
// return false on failure/degenerate path
@@ -217,6 +225,11 @@ private:
// The inward facing bisector at each point in the original polygon. Only
// needed for exterior ring creation and then handed off to the initial ring.
SkTDArray<SkVector> fBisectors;
+
+ // Tracks whether a given point is interior to a curve. Such points are
+ // assumed to have shallow curvature.
+ SkTDArray<bool> fIsCurve;
+
SkPoint::Side fSide; // winding of the original polygon
// The triangulation of the points
@@ -233,10 +246,16 @@ private:
SkScalar fTargetDepth;
+ SkTDArray<SkPoint> fPointBuffer;
+
// If some goes wrong with the inset computation the tessellator will
// truncate the creation of the inset polygon. In this case the depth
// check will complain.
SkDEBUGCODE(bool fShouldCheckDepths;)
+
+ SkDEBUGCODE(SkScalar fMinCross;)
+
+ SkDEBUGCODE(SkScalar fMaxCross;)
};
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexTessellator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698