diff options
author | reed <reed@google.com> | 2015-02-07 12:18:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-07 12:18:41 -0800 |
commit | 01d3319b67b1ad404006a0026803efc1573f4570 (patch) | |
tree | c350a7e529a518fa74befb485332bb767257bf35 /src/core/SkEdgeBuilder.cpp | |
parent | 5cc0f6c1ac6636efaf4da775f464a0288fef04e7 (diff) |
Faster edge re-sort
For now, disable dropping trailing edges
This reverts commit 0692c5f2c1df7d1b66c62025200dd666f9ecd311.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/882733004
Diffstat (limited to 'src/core/SkEdgeBuilder.cpp')
-rw-r--r-- | src/core/SkEdgeBuilder.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp index 8dcc47a6ce..00811203b4 100644 --- a/src/core/SkEdgeBuilder.cpp +++ b/src/core/SkEdgeBuilder.cpp @@ -79,8 +79,8 @@ static void setShiftedClip(SkRect* dst, const SkIRect& src, int shift) { SkIntToScalar(src.fBottom >> shift)); } -int SkEdgeBuilder::buildPoly(const SkPath& path, const SkIRect* iclip, - int shiftUp) { +int SkEdgeBuilder::buildPoly(const SkPath& path, const SkIRect* iclip, int shiftUp, + bool clipToTheRight) { SkPath::Iter iter(path, true); SkPoint pts[4]; SkPath::Verb verb; @@ -115,7 +115,7 @@ int SkEdgeBuilder::buildPoly(const SkPath& path, const SkIRect* iclip, break; case SkPath::kLine_Verb: { SkPoint lines[SkLineClipper::kMaxPoints]; - int lineCount = SkLineClipper::ClipLine(pts, clip, lines); + int lineCount = SkLineClipper::ClipLine(pts, clip, lines, clipToTheRight); SkASSERT(lineCount <= SkLineClipper::kMaxClippedLineSegments); for (int i = 0; i < lineCount; i++) { if (edge->setLine(lines[i], lines[i + 1], shiftUp)) { @@ -161,14 +161,14 @@ static void handle_quad(SkEdgeBuilder* builder, const SkPoint pts[3]) { } } -int SkEdgeBuilder::build(const SkPath& path, const SkIRect* iclip, - int shiftUp) { +int SkEdgeBuilder::build(const SkPath& path, const SkIRect* iclip, int shiftUp, + bool clipToTheRight) { fAlloc.reset(); fList.reset(); fShiftUp = shiftUp; if (SkPath::kLine_SegmentMask == path.getSegmentMasks()) { - return this->buildPoly(path, iclip, shiftUp); + return this->buildPoly(path, iclip, shiftUp, clipToTheRight); } SkAutoConicToQuads quadder; @@ -192,7 +192,7 @@ int SkEdgeBuilder::build(const SkPath& path, const SkIRect* iclip, break; case SkPath::kLine_Verb: { SkPoint lines[SkLineClipper::kMaxPoints]; - int lineCount = SkLineClipper::ClipLine(pts, clip, lines); + int lineCount = SkLineClipper::ClipLine(pts, clip, lines, clipToTheRight); for (int i = 0; i < lineCount; i++) { this->addLine(&lines[i]); } |