Rename GLRTFBOIDIs0 to WrapsSwapchainSurface and use for Metal.
This provides a way to indicate that a Metal RenderTarget, and in
particular a RenderTargetProxy, is framebufferOnly, so it can be
restricted to certain operations.
Bug: skia:9573
TBR: bsalomon@google.com
Change-Id: I733fae2fce402c375534889346255afe28a57944
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255783
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp
index 6675884..ddd19a1 100644
--- a/src/gpu/GrTextureRenderTargetProxy.cpp
+++ b/src/gpu/GrTextureRenderTargetProxy.cpp
@@ -89,8 +89,8 @@
}
void GrTextureRenderTargetProxy::initSurfaceFlags(const GrCaps& caps) {
- // FBO 0 should never be wrapped as a texture render target.
- SkASSERT(!this->rtPriv().glRTFBOIDIs0());
+ // A swapchain surface should never be wrapped as a texture render target.
+ SkASSERT(!this->rtPriv().wrapsSwapchainSurface());
if (this->numSamples() > 1 && !caps.msaaResolvesAutomatically()) {
// MSAA texture-render-targets always require manual resolve if we are not using a
// multisampled-render-to-texture extension.