Implement support for framebufferOnly render targets.

This reflects Dawn and Metal functionality.
Implement a FramebufferOnly flag on GrSurface and GrBackendRenderTarget.
Forward the state from GrBackendRenderTarget to GrSurface.
Check the GrSurface flag in GrGpu::readPixels() and GrGpu::writePixels()
and early-return.

Change-Id: I27d3c9c912b366791bfd0e1db49638d8925742f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262802
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index a6b0e9e..6b5d3f0 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -32,7 +32,9 @@
         , fMipMapped(mipMapped)
         , fMipMapsStatus(mipMapsStatus) SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
         , fProxyProvider(nullptr)
-        , fDeferredUploader(nullptr) {}
+        , fDeferredUploader(nullptr) {
+    SkASSERT(!(fSurfaceFlags & GrInternalSurfaceFlags::kFramebufferOnly));
+}
 
 // Lazy-callback version
 GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback,
@@ -52,7 +54,9 @@
         , fMipMapped(mipMapped)
         , fMipMapsStatus(mipMapsStatus) SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
         , fProxyProvider(nullptr)
-        , fDeferredUploader(nullptr) {}
+        , fDeferredUploader(nullptr) {
+    SkASSERT(!(fSurfaceFlags & GrInternalSurfaceFlags::kFramebufferOnly));
+}
 
 // Wrapped version
 GrTextureProxy::GrTextureProxy(sk_sp<GrSurface> surf,