Make render task targets be just a proxy.
Change-Id: I09548cc22b13bc0b9b5f77cf1f20c1505a529c51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrTextureResolveRenderTask.cpp b/src/gpu/GrTextureResolveRenderTask.cpp
index f1b1a35..fd13d65 100644
--- a/src/gpu/GrTextureResolveRenderTask.cpp
+++ b/src/gpu/GrTextureResolveRenderTask.cpp
@@ -55,9 +55,8 @@
// manipulate the resolve proxies.
auto fakeOp = alloc->curOp();
SkASSERT(fResolves.count() == this->numTargets());
- for (const GrSurfaceProxyView& target : fTargets) {
- alloc->addInterval(target.proxy(), fakeOp, fakeOp,
- GrResourceAllocator::ActualUse::kYes);
+ for (const sk_sp<GrSurfaceProxy>& target : fTargets) {
+ alloc->addInterval(target.get(), fakeOp, fakeOp, GrResourceAllocator::ActualUse::kYes);
}
alloc->incOps();
}
@@ -68,7 +67,7 @@
for (int i = 0; i < fResolves.count(); ++i) {
const Resolve& resolve = fResolves[i];
if (GrSurfaceProxy::ResolveFlags::kMSAA & resolve.fFlags) {
- GrSurfaceProxy* proxy = this->target(i).proxy();
+ GrSurfaceProxy* proxy = this->target(i);
// peekRenderTarget might be null if there was an instantiation error.
if (GrRenderTarget* renderTarget = proxy->peekRenderTarget()) {
flushState->gpu()->resolveRenderTarget(renderTarget, resolve.fMSAAResolveRect);
@@ -80,7 +79,7 @@
const Resolve& resolve = fResolves[i];
if (GrSurfaceProxy::ResolveFlags::kMipMaps & resolve.fFlags) {
// peekTexture might be null if there was an instantiation error.
- GrTexture* texture = this->target(i).proxy()->peekTexture();
+ GrTexture* texture = this->target(i)->peekTexture();
if (texture && texture->mipmapsAreDirty()) {
flushState->gpu()->regenerateMipMapLevels(texture);
SkASSERT(!texture->mipmapsAreDirty());