Revert "Rename GrStencilAttachment class to generic GrAttachment"

This reverts commit 6113d50ec48be049c13a6e4bbea191df93e68674.

Reason for revert: Breaking MSAN bot

Original change's description:
> Rename GrStencilAttachment class to generic GrAttachment
>
> Additional this adds a UsageFlags member to the new GrAttachment
> class.
>
> Bug: skia:10727
> Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com

Change-Id: I2ee2a1fcabd75bc24d3b7c3f76d971a3adb370a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10727
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324276
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index 93d91af..19cf88e 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -12,7 +12,6 @@
 #include "include/private/GrSingleOwner.h"
 #include "src/core/SkConvertPixels.h"
 #include "src/core/SkMathPriv.h"
-#include "src/gpu/GrAttachment.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrDataUtils.h"
 #include "src/gpu/GrGpu.h"
@@ -24,6 +23,7 @@
 #include "src/gpu/GrRenderTarget.h"
 #include "src/gpu/GrResourceCache.h"
 #include "src/gpu/GrSemaphore.h"
+#include "src/gpu/GrStencilAttachment.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/SkGr.h"
 
@@ -491,7 +491,7 @@
 
 bool GrResourceProvider::attachStencilAttachment(GrRenderTarget* rt, int numStencilSamples) {
     SkASSERT(rt);
-    GrAttachment* stencil = rt->getStencilAttachment();
+    GrStencilAttachment* stencil = rt->getStencilAttachment();
     if (stencil && stencil->numSamples() == numStencilSamples) {
         return true;
     }
@@ -505,13 +505,13 @@
             height = SkNextPow2(height);
         }
 #endif
-        GrAttachment::ComputeSharedAttachmentUniqueKey(
-                rt->dimensions(), GrAttachment::UsageFlags::kStencil, numStencilSamples, &sbKey);
-        auto stencil = this->findByUniqueKey<GrAttachment>(sbKey);
+        GrStencilAttachment::ComputeSharedStencilAttachmentKey(
+                rt->dimensions(), numStencilSamples, &sbKey);
+        auto stencil = this->findByUniqueKey<GrStencilAttachment>(sbKey);
         if (!stencil) {
             // Need to try and create a new stencil
-            stencil = this->gpu()->makeStencilAttachmentForRenderTarget(rt, rt->dimensions(),
-                                                                        numStencilSamples);
+            stencil.reset(this->gpu()->createStencilAttachmentForRenderTarget(
+                    rt, rt->dimensions(), numStencilSamples));
             if (!stencil) {
                 return false;
             }
@@ -520,7 +520,7 @@
         rt->attachStencilAttachment(std::move(stencil));
     }
 
-    if (GrAttachment* stencil = rt->getStencilAttachment()) {
+    if (GrStencilAttachment* stencil = rt->getStencilAttachment()) {
         return stencil->numSamples() == numStencilSamples;
     }
     return false;