Delete GrBackendSurface's GrPixelConfig
This member variable is no longer used
TBR=bsalomon@google.com
Bug: skia:6718
Change-Id: I84680c8c3bc36eefa603f5be7f3c15b496a79948
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229478
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index cc76aa2..6051cc1 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -428,12 +428,6 @@
return caps->areColorTypeAndFormatCompatible(grCT, format);
}
-
-static bool validate_backend_format_and_colortype(const GrCaps* caps,
- GrColorType colorType,
- const GrBackendFormat& format) {
- return caps->areColorTypeAndFormatCompatible(colorType, format);
-}
#endif
sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrBackendFormat& format,
@@ -456,7 +450,8 @@
SkASSERT(GrCaps::AreConfigsCompatible(desc.fConfig,
caps->getConfigFromBackendFormat(format, colorType)));
- SkASSERT(validate_backend_format_and_colortype(caps, colorType, format));
+ SkASSERT(caps->areColorTypeAndFormatCompatible(colorType, format));
+
if (GrMipMapped::kYes == mipMapped) {
// SkMipMap doesn't include the base level in the level count so we have to add 1
int mipCount = SkMipMap::ComputeLevelCount(desc.fWidth, desc.fHeight) + 1;
@@ -544,13 +539,7 @@
const GrCaps* caps = this->caps();
- SkASSERT(GrCaps::AreConfigsCompatible(backendTex.config(),
- caps->getConfigFromBackendFormat(
- backendTex.getBackendFormat(),
- grColorType)));
-
- SkASSERT(validate_backend_format_and_colortype(caps, grColorType,
- backendTex.getBackendFormat()));
+ SkASSERT(caps->areColorTypeAndFormatCompatible(grColorType, backendTex.getBackendFormat()));
GrResourceProvider* resourceProvider = direct->priv().resourceProvider();
@@ -590,11 +579,7 @@
const GrCaps* caps = this->caps();
- SkASSERT(GrCaps::AreConfigsCompatible(backendTex.config(),
- caps->getConfigFromBackendFormat(
- backendTex.getBackendFormat(),
- colorType)));
- SkASSERT(validate_backend_format_and_colortype(caps, colorType, backendTex.getBackendFormat()));
+ SkASSERT(caps->areColorTypeAndFormatCompatible(colorType, backendTex.getBackendFormat()));
GrResourceProvider* resourceProvider = direct->priv().resourceProvider();
@@ -639,11 +624,9 @@
return nullptr;
}
-#ifdef SK_DEBUG
- GrPixelConfig testConfig =
- this->caps()->validateBackendRenderTarget(backendRT, grColorType);
- SkASSERT(testConfig != kUnknown_GrPixelConfig);
-#endif
+ const GrCaps* caps = this->caps();
+
+ SkASSERT(caps->areColorTypeAndFormatCompatible(grColorType, backendRT.getBackendFormat()));
GrResourceProvider* resourceProvider = direct->priv().resourceProvider();
@@ -661,8 +644,8 @@
// Make sure we match how we created the proxy with SkBudgeted::kNo
SkASSERT(GrBudgetedType::kBudgeted != rt->resourcePriv().budgetedType());
- GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(rt->backendFormat(), grColorType);
- GrSwizzle outSwizzle = this->caps()->getOutputSwizzle(rt->backendFormat(), grColorType);
+ GrSwizzle texSwizzle = caps->getTextureSwizzle(rt->backendFormat(), grColorType);
+ GrSwizzle outSwizzle = caps->getOutputSwizzle(rt->backendFormat(), grColorType);
return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(std::move(rt), origin, texSwizzle,
outSwizzle));
@@ -683,13 +666,7 @@
const GrCaps* caps = this->caps();
- SkASSERT(GrCaps::AreConfigsCompatible(backendTex.config(),
- caps->getConfigFromBackendFormat(
- backendTex.getBackendFormat(),
- grColorType)));
-
- SkASSERT(validate_backend_format_and_colortype(caps, grColorType,
- backendTex.getBackendFormat()));
+ SkASSERT(caps->areColorTypeAndFormatCompatible(grColorType, backendTex.getBackendFormat()));
GrResourceProvider* resourceProvider = direct->priv().resourceProvider();