Swap GrSurfaceProxy over to being held via sk_sp
This CL:
replaces GrProxyRef with sk_sp
streamlines GrIORefProxy to be more like SkRefCntBase (i.e., move the fTarget pointer to GrSurfaceProxy)
Change-Id: I17d515100bb2d9104eed64269bd3bf75c1ebbbb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221997
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 6a9fd26..4a66daf 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -76,8 +76,8 @@
return false;
}
- SkASSERT(!fTarget->asRenderTarget());
- SkASSERT(fTarget->asTexture());
+ SkASSERT(!this->peekRenderTarget());
+ SkASSERT(this->peekTexture());
return true;
}
@@ -102,7 +102,7 @@
void GrTextureProxyPriv::scheduleUpload(GrOpFlushState* flushState) {
// The texture proxy's contents may already have been uploaded or instantiation may have failed
- if (fTextureProxy->fDeferredUploader && fTextureProxy->fTarget) {
+ if (fTextureProxy->fDeferredUploader && fTextureProxy->isInstantiated()) {
fTextureProxy->fDeferredUploader->scheduleUpload(flushState, fTextureProxy);
}
}