aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScan_Path.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-01-30 10:16:31 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-30 10:16:31 -0800
commit02a6bfaaaa077dc3738cec3713a50cc4293ac7ec (patch)
tree5addd851940c9f76f759f861881f41127145bdd7 /src/core/SkScan_Path.cpp
parent70e6d6074a482fb791b9a147f471670be54a0d95 (diff)
Revert of batch merge new edges (patchset #1 id:1 of https://codereview.chromium.org/1647223002/ )
Reason for revert: Breaks the roll. Original issue's description: > batch merge new edges > > Find where newly introduced edges go in the edge list once, > then stitch all of them into the edge list. > > R=reed@google.com > BUG=573166 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1647223002 > > Committed: https://skia.googlesource.com/skia/+/ae658e15477df86d1a864feb48d0274af2784f40 TBR=reed@google.com,caryclark@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=573166 Review URL: https://codereview.chromium.org/1654593002
Diffstat (limited to 'src/core/SkScan_Path.cpp')
-rw-r--r--src/core/SkScan_Path.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp
index 1df956d394..804148db36 100644
--- a/src/core/SkScan_Path.cpp
+++ b/src/core/SkScan_Path.cpp
@@ -61,21 +61,7 @@ static void backward_insert_edge_based_on_x(SkEdge* edge SkDECLAREPARAM(int, cur
}
}
-#ifndef SK_SUPPORT_LEGACY_INSERT_NEW_EDGES
-// Start from the right side, searching backwards for the point to begin the new edge list
-// insertion, marching forwards from here. The implementation could have started from the left
-// of the prior insertion, and search to the right, or with some additional caching, binary
-// search the starting point. More work could be done to determine optimal new edge insertion.
-static SkEdge* backward_insert_start(SkEdge* prev, SkFixed x) {
- while (prev->fX > x) {
- prev = prev->fPrev;
- }
- return prev;
-}
-#endif
-
static void insert_new_edges(SkEdge* newEdge, int curr_y) {
-#ifdef SK_SUPPORT_LEGACY_INSERT_NEW_EDGES
SkASSERT(newEdge->fFirstY >= curr_y);
while (newEdge->fFirstY == curr_y) {
@@ -84,37 +70,6 @@ static void insert_new_edges(SkEdge* newEdge, int curr_y) {
newEdge = next;
}
}
-#else
- if (newEdge->fFirstY != curr_y) {
- return;
- }
- SkEdge* prev = newEdge->fPrev;
- if (prev->fX <= newEdge->fX) {
- return;
- }
- // find first x pos to insert
- SkEdge* start = backward_insert_start(prev, newEdge->fX);
- // insert the lot, fixing up the links as we go
- do {
- SkEdge* next = newEdge->fNext;
- do {
- if (start->fNext == newEdge) {
- goto nextEdge;
- }
- SkEdge* after = start->fNext;
- if (after->fX >= newEdge->fX) {
- break;
- }
- start = after;
- } while (true);
- remove_edge(newEdge);
- insert_edge_after(newEdge, start);
-nextEdge:
- start = newEdge;
- newEdge = next;
- } while (newEdge->fFirstY == curr_y);
-#endif
-}
#ifdef SK_DEBUG
static void validate_edges_for_y(const SkEdge* edge, int curr_y) {