Add kRequiresManualMSAAResolve to GrInternalSurfaceFlags
We will use this flag to check whether a proxy needs manual msaa
resolve, and if so, install a render task to do just that when it is
dirty and about to be read from.
For the time being, we are leaving GrRenderTarget::getResovleType in
place. This will allow us to assert that requiresManualMSAAResolve
works as expected. Long term, we plan to delete the former in favor of
the latter.
Bug: skia:
Change-Id: I155fa2a6d876edd339232c7c8208015d5da2c8ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234436
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 683d84c..734b227 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -845,9 +845,9 @@
return sk_sp<GrTextureProxy>((renderable == GrRenderable::kYes)
? new GrTextureRenderTargetProxy(
- std::move(callback), lazyType, format, desc, renderTargetSampleCnt, origin,
- mipMapped, mipMapsStatus, texSwizzle, outSwizzle, fit, budgeted, isProtected,
- surfaceFlags)
+ *this->caps(), std::move(callback), lazyType, format, desc,
+ renderTargetSampleCnt, origin, mipMapped, mipMapsStatus, texSwizzle, outSwizzle,
+ fit, budgeted, isProtected, surfaceFlags)
: new GrTextureProxy(
std::move(callback), lazyType, format, desc, origin, mipMapped, mipMapsStatus,
texSwizzle, fit, budgeted, isProtected, surfaceFlags));
@@ -883,7 +883,7 @@
// actual VkImage to texture from.
SkASSERT(!wrapsVkSecondaryCB);
return sk_sp<GrRenderTargetProxy>(new GrTextureRenderTargetProxy(
- std::move(callback), lazyType, format, desc, sampleCnt, origin,
+ *this->caps(), std::move(callback), lazyType, format, desc, sampleCnt, origin,
textureInfo->fMipMapped, mipMapsStatus, texSwizzle, outSwizzle, fit, budgeted,
isProtected, surfaceFlags));
}
@@ -919,7 +919,7 @@
return sk_sp<GrTextureProxy>((GrRenderable::kYes == renderable)
? new GrTextureRenderTargetProxy(
- std::move(callback), LazyInstantiationType::kSingleUse, format, desc,
+ caps, std::move(callback), LazyInstantiationType::kSingleUse, format, desc,
renderTargetSampleCnt, origin, GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated,
texSwizzle, outSwizzle, SkBackingFit::kApprox, SkBudgeted::kYes, isProtected,
surfaceFlags)