aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrSurfaceProxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/GrSurfaceProxy.h')
-rw-r--r--include/private/GrSurfaceProxy.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 9363b8280b..6f2a751239 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -17,6 +17,7 @@ class GrCaps;
class GrRenderTargetOpList;
class GrRenderTargetProxy;
class GrSurfaceContext;
+class GrSurfaceProxyPriv;
class GrTextureOpList;
class GrTextureProvider;
class GrTextureProxy;
@@ -98,6 +99,14 @@ protected:
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 @@ public:
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 @@ protected:
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