Remove GrPixelConfig from validateSurfaceParams
This wasn't even used... Bug: skia:6718 Change-Id: I6543fd11b1f0d9136088fda8c6962aebc16ae5cb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264858 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
3155f7fc0d
commit
9a48bebe6a
@ -284,8 +284,8 @@ bool GrCaps::canCopySurface(const GrSurfaceProxy* dst, const GrSurfaceProxy* src
|
||||
}
|
||||
|
||||
bool GrCaps::validateSurfaceParams(const SkISize& dimensions, const GrBackendFormat& format,
|
||||
GrPixelConfig config, GrRenderable renderable,
|
||||
int renderTargetSampleCnt, GrMipMapped mipped) const {
|
||||
GrRenderable renderable, int renderTargetSampleCnt,
|
||||
GrMipMapped mipped) const {
|
||||
if (!this->isFormatTexturable(format)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -386,9 +386,8 @@ public:
|
||||
return {};
|
||||
}
|
||||
|
||||
bool validateSurfaceParams(const SkISize&, const GrBackendFormat&, GrPixelConfig,
|
||||
GrRenderable renderable, int renderTargetSampleCnt,
|
||||
GrMipMapped) const;
|
||||
bool validateSurfaceParams(const SkISize&, const GrBackendFormat&, GrRenderable renderable,
|
||||
int renderTargetSampleCnt, GrMipMapped) const;
|
||||
|
||||
bool areColorTypeAndFormatCompatible(GrColorType grCT,
|
||||
const GrBackendFormat& format) const {
|
||||
|
@ -156,8 +156,8 @@ sk_sp<GrTexture> GrGpu::createTextureCommon(const GrSurfaceDesc& desc,
|
||||
}
|
||||
|
||||
GrMipMapped mipMapped = mipLevelCount > 1 ? GrMipMapped::kYes : GrMipMapped::kNo;
|
||||
if (!this->caps()->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig,
|
||||
renderable, renderTargetSampleCnt, mipMapped)) {
|
||||
if (!this->caps()->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, mipMapped)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -470,7 +470,7 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrBackendFormat& format
|
||||
}
|
||||
}
|
||||
|
||||
if (!caps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig, renderable,
|
||||
if (!caps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, mipMapped)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc,
|
||||
}
|
||||
|
||||
GrMipMapped mipMapped = mipLevelCount > 1 ? GrMipMapped::kYes : GrMipMapped::kNo;
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig, renderable,
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, mipMapped)) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -126,8 +126,8 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc,
|
||||
if (this->isAbandoned()) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig,
|
||||
renderable, renderTargetSampleCnt, GrMipMapped::kNo)) {
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, GrMipMapped::kNo)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig, renderable,
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, mipMapped)) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -233,7 +233,7 @@ sk_sp<GrTexture> GrResourceProvider::createApproxTexture(const GrSurfaceDesc& de
|
||||
// textures should be created through the createCompressedTexture function.
|
||||
SkASSERT(!this->caps()->isFormatCompressed(format));
|
||||
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig, renderable,
|
||||
if (!fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, GrMipMapped::kNo)) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -262,8 +262,8 @@ sk_sp<GrTexture> GrResourceProvider::refScratchTexture(const GrSurfaceDesc& desc
|
||||
ASSERT_SINGLE_OWNER
|
||||
SkASSERT(!this->isAbandoned());
|
||||
SkASSERT(!this->caps()->isFormatCompressed(format));
|
||||
SkASSERT(fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, desc.fConfig,
|
||||
renderable, renderTargetSampleCnt, GrMipMapped::kNo));
|
||||
SkASSERT(fCaps->validateSurfaceParams({desc.fWidth, desc.fHeight}, format, renderable,
|
||||
renderTargetSampleCnt, GrMipMapped::kNo));
|
||||
|
||||
// We could make initial clears work with scratch textures but it is a rare case so we just opt
|
||||
// to fall back to making a new texture.
|
||||
|
Loading…
Reference in New Issue
Block a user