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

Unified Diff: src/core/SkScan_Path.cpp

Issue 943053004: Remove SK_USE_LEGACY_AA_COVERAGE guarded code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/core/SkScan_AntiPath.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_Path.cpp
diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp
index fd04609c218d7cb13f704ddc5e9ff885c20d2050..d51cb5619a2cae308a316fe3d82c22423604411f 100644
--- a/src/core/SkScan_Path.cpp
+++ b/src/core/SkScan_Path.cpp
@@ -17,10 +17,6 @@
#include "SkTemplates.h"
#include "SkTSort.h"
-#ifdef SK_USE_LEGACY_AA_COVERAGE
- #define SK_USE_STD_SORT_FOR_EDGES
-#endif
-
#define kEDGE_HEAD_Y SK_MinS32
#define kEDGE_TAIL_Y SK_MaxS32
@@ -368,27 +364,6 @@ static void PrePostInverseBlitterProc(SkBlitter* blitter, int y, bool isStart) {
#pragma warning ( pop )
#endif
-#ifdef SK_USE_STD_SORT_FOR_EDGES
-extern "C" {
- static int edge_compare(const void* a, const void* b) {
- const SkEdge* edgea = *(const SkEdge**)a;
- const SkEdge* edgeb = *(const SkEdge**)b;
-
- int valuea = edgea->fFirstY;
- int valueb = edgeb->fFirstY;
-
- if (valuea == valueb) {
- valuea = edgea->fX;
- valueb = edgeb->fX;
- }
-
- // this overflows if valuea >>> valueb or vice-versa
- // return valuea - valueb;
- // do perform the slower but safe compares
- return (valuea < valueb) ? -1 : (valuea > valueb);
- }
-}
-#else
static bool operator<(const SkEdge& a, const SkEdge& b) {
int valuea = a.fFirstY;
int valueb = b.fFirstY;
@@ -400,14 +375,9 @@ static bool operator<(const SkEdge& a, const SkEdge& b) {
return valuea < valueb;
}
-#endif
static SkEdge* sort_edges(SkEdge* list[], int count, SkEdge** last) {
-#ifdef SK_USE_STD_SORT_FOR_EDGES
- qsort(list, count, sizeof(SkEdge*), edge_compare);
-#else
SkTQSort(list, list + count - 1);
-#endif
// now make the edges linked in sorted order
for (int i = 1; i < count; i++) {
« no previous file with comments | « src/core/SkScan_AntiPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698