Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now also put the guard flag
SK_SUPPORT_LEGACY_AAA in SkUserConfig.h. Previously, SkAnalyticEdge.cpp doesn't
get that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I134bb76cebd6fffa712f438076668765321bba3b
Reviewed-on: https://skia-review.googlesource.com/6992
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 8797c4d..a1dabc2 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1822,7 +1822,12 @@
             }
             break;
         case 'A':
-            gSkUseAnalyticAA = !gSkUseAnalyticAA.load();
+            if (gSkUseAnalyticAA.load() && !gSkForceAnalyticAA.load()) {
+                gSkForceAnalyticAA = true;
+            } else {
+                gSkUseAnalyticAA = !gSkUseAnalyticAA.load();
+                gSkForceAnalyticAA = false;
+            }
             this->inval(nullptr);
             this->updateTitle();
             break;
@@ -2176,7 +2181,11 @@
     title.prepend(gDeviceTypePrefix[fDeviceType]);
 
     if (gSkUseAnalyticAA) {
-        title.prepend("<AAA> ");
+        if (gSkForceAnalyticAA) {
+            title.prepend("<FAAA> ");
+        } else {
+            title.prepend("<AAA> ");
+        }
     }
     if (fTilingMode != kNo_Tiling) {
         title.prependf("<T: %s> ", gTilingInfo[fTilingMode].label);