Make GrSurfaceProxy derive from GrNonAtomicRef and remove GrIORefProxy.

Also, expose GrNonAtomicRef's ref count. Since it's non-atomic and not
thread-safe it seems fine.

Change-Id: I5cf48e60d32094354955b2614cfeebbb4c1ecf2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238059
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index 0be59a3..62d4bf1 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -355,7 +355,7 @@
         // At this point 'fAtlasProxy' should be instantiated and have:
         //    1 ref from the 'fAtlasProxy' sk_sp
         //    9 refs from the 9 AtlasedRectOps
-        SkASSERT(10 == fAtlasProxy->priv().getProxyRefCnt());
+        SkASSERT(10 == fAtlasProxy->refCnt());
         // The backing GrSurface should have only 1 though bc there is only one proxy
         SkASSERT(1 == fAtlasProxy->testingOnly_getBackingRefCnt());
         auto rtc = resourceProvider->makeRenderTargetContext(fAtlasProxy, GrColorType::kRGBA_8888,
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index a4a3286..b7f1125 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -147,7 +147,7 @@
                        GrTextureProxy* proxy,
                        int32_t expectedProxyRefs,
                        int32_t expectedBackingRefs) {
-    int32_t actualProxyRefs = proxy->priv().getProxyRefCnt();
+    int32_t actualProxyRefs = proxy->refCnt();
     int32_t actualBackingRefs = proxy->testingOnly_getBackingRefCnt();
 
     SkASSERT(actualProxyRefs == expectedProxyRefs);
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index 4629557..b5cf20e 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -23,7 +23,7 @@
                        GrTextureProxy* proxy,
                        int32_t expectedProxyRefs,
                        int32_t expectedBackingRefs) {
-    int32_t actualProxyRefs = proxy->priv().getProxyRefCnt();
+    int32_t actualProxyRefs = proxy->refCnt();
     int32_t actualBackingRefs = proxy->testingOnly_getBackingRefCnt();
 
     SkASSERT(actualProxyRefs == expectedProxyRefs);