Switch GrConfigConversionEffect over to taking GrTextureProxies

Change-Id: Ic8be773e210e1ac05dcb9aad6c89dcd63e9e4ba2
Reviewed-on: https://skia-review.googlesource.com/7521
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 9363b82..6f2a751 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -17,6 +17,7 @@
 class GrRenderTargetOpList;
 class GrRenderTargetProxy;
 class GrSurfaceContext;
+class GrSurfaceProxyPriv;
 class GrTextureOpList;
 class GrTextureProvider;
 class GrTextureProxy;
@@ -98,6 +99,14 @@
         fPendingWrites = 0;
     }
 
+    bool internalHasPendingIO() const {
+        if (fTarget) {
+            return fTarget->internalHasPendingIO();
+        }
+
+        return SkToBool(fPendingWrites | fPendingReads);
+    }
+
     // For deferred proxies this will be null. For wrapped proxies it will point to the
     // wrapped resource.
     GrSurface* fTarget;
@@ -285,6 +294,10 @@
 
     SkDEBUGCODE(void validate(GrContext*) const;)
 
+    // Provides access to functions that aren't part of the public API.
+    GrSurfaceProxyPriv priv();
+    const GrSurfaceProxyPriv priv() const;
+
 protected:
     // Deferred version
     GrSurfaceProxy(const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budgeted)
@@ -301,6 +314,13 @@
 
     virtual ~GrSurfaceProxy();
 
+    friend class GrSurfaceProxyPriv;
+
+    // Methods made available via GrSurfaceProxyPriv
+    bool hasPendingIO() const {
+        return this->internalHasPendingIO();
+    }
+
     // For wrapped resources, 'fDesc' will always be filled in from the wrapped resource.
     const GrSurfaceDesc  fDesc;
     const SkBackingFit   fFit;      // always exact for wrapped resources