Revert "Revert "Redefine the meaning of sample counts in GPU backend.""

Fixes gpu config default samples to be 1 and updates config parsing test accordingly.

This reverts commit c1ce2f7966babaae0deb150f93f1227ee5af9285.

Bug: skia:
Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f
Reviewed-on: https://skia-review.googlesource.com/102147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index ec05243..193b321 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -322,12 +322,16 @@
     }
 
     bool willBeRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
-    if (willBeRT && !caps->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
+    if (willBeRT && !caps->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 1)) {
         return nullptr;
     }
 
     // We currently do not support multisampled textures
-    if (!willBeRT && desc.fSampleCnt > 0) {
+    if (!willBeRT && desc.fSampleCnt > 1) {
+        return nullptr;
+    }
+
+    if (willBeRT && !caps->getSampleCount(desc.fSampleCnt, desc.fConfig)) {
         return nullptr;
     }
 
@@ -505,7 +509,7 @@
     desc.fWidth = -1;
     desc.fHeight = -1;
     desc.fConfig = config;
-    desc.fSampleCnt = 0;
+    desc.fSampleCnt = 1;
 
     return this->createLazyProxy(std::move(callback), desc, GrMipMapped::kNo,
                                  SkBackingFit::kApprox, SkBudgeted::kYes);