aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxyPriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrSurfaceProxyPriv.h')
-rw-r--r--src/gpu/GrSurfaceProxyPriv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxyPriv.h b/src/gpu/GrSurfaceProxyPriv.h
index ea4d9b63a3..b10cb345f7 100644
--- a/src/gpu/GrSurfaceProxyPriv.h
+++ b/src/gpu/GrSurfaceProxyPriv.h
@@ -15,13 +15,21 @@
data members or virtual methods. */
class GrSurfaceProxyPriv {
public:
+ // This should only be called after a successful call to instantiate
+ GrSurface* peekSurface() const {
+ SkASSERT(fProxy->fTarget);
+ return fProxy->fTarget;
+ }
+
// If the proxy is already instantiated, return its backing GrTexture; if not,
// return null
GrTexture* peekTexture() const {
return fProxy->fTarget ? fProxy->fTarget->asTexture() : nullptr;
}
+ // This should only be called after a successful call to instantiate
GrRenderTarget* peekRenderTarget() const {
+ SkASSERT(fProxy->fTarget && fProxy->fTarget->asRenderTarget());
return fProxy->fTarget ? fProxy->fTarget->asRenderTarget() : nullptr;
}