Rename GrCaps fields and methods from MipMap to Mipmap

Change-Id: I44d151dc80aca8fc6426735ee17224cb5b8aa576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304603
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Brian Salomon 2020-07-21 10:49:25 -04:00 committed by Skia Commit-Bot
parent 5bae1b83ff
commit 69100f05bb
30 changed files with 70 additions and 70 deletions

View File

@ -78,7 +78,7 @@ protected:
DrawResult onDraw(GrRecordingContext* context, GrRenderTargetContext* renderTargetContext,
SkCanvas* canvas, SkString* errorMsg) override {
GrMipmapped mipMapped = fFilter == GrSamplerState::Filter::kMipMap &&
context->priv().caps()->mipMapSupport()
context->priv().caps()->mipmapSupport()
? GrMipmapped::kYes : GrMipmapped::kNo;
GrBitmapTextureMaker maker(context, fBitmap, GrImageTexGenPolicy::kDraw);
auto view = maker.view(mipMapped);

View File

@ -108,7 +108,7 @@ struct GrMockOptions {
};
// GrCaps options.
bool fMipMapSupport = false;
bool fMipmapSupport = false;
bool fDrawInstancedSupport = false;
bool fHalfFloatVertexAttributeSupport = false;
uint32_t fMapBufferFlags = 0;

View File

@ -16,7 +16,7 @@
#include "src/utils/SkJSONWriter.h"
GrCaps::GrCaps(const GrContextOptions& options) {
fMipMapSupport = false;
fMipmapSupport = false;
fNPOTTextureTileSupport = false;
fReuseScratchTextures = true;
fReuseScratchBuffers = true;
@ -197,7 +197,7 @@ static SkString map_flags_to_string(uint32_t flags) {
void GrCaps::dumpJSON(SkJSONWriter* writer) const {
writer->beginObject();
writer->appendBool("MIP Map Support", fMipMapSupport);
writer->appendBool("MIP Map Support", fMipmapSupport);
writer->appendBool("NPOT Texture Tile Support", fNPOTTextureTileSupport);
writer->appendBool("Reuse Scratch Textures", fReuseScratchTextures);
writer->appendBool("Reuse Scratch Buffers", fReuseScratchBuffers);
@ -313,7 +313,7 @@ bool GrCaps::validateSurfaceParams(const SkISize& dimensions, const GrBackendFor
return false;
}
if (GrMipmapped::kYes == mipped && !this->mipMapSupport()) {
if (GrMipmapped::kYes == mipped && !this->mipmapSupport()) {
return false;
}

View File

@ -45,7 +45,7 @@ public:
bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; }
/** To avoid as-yet-unnecessary complexity we don't allow any partial support of MIP Maps (e.g.
only for POT textures) */
bool mipMapSupport() const { return fMipMapSupport; }
bool mipmapSupport() const { return fMipmapSupport; }
bool gpuTracingSupport() const { return fGpuTracingSupport; }
bool oversizedStencilSupport() const { return fOversizedStencilSupport; }
@ -460,7 +460,7 @@ protected:
sk_sp<GrShaderCaps> fShaderCaps;
bool fNPOTTextureTileSupport : 1;
bool fMipMapSupport : 1;
bool fMipmapSupport : 1;
bool fReuseScratchTextures : 1;
bool fReuseScratchBuffers : 1;
bool fGpuTracingSupport : 1;

View File

@ -58,7 +58,7 @@ SkSurfaceCharacterization GrContextThreadSafeProxy::createCharacterization(
return SkSurfaceCharacterization(); // return an invalid characterization
}
if (!fCaps->mipMapSupport()) {
if (!fCaps->mipmapSupport()) {
isMipMapped = false;
}

View File

@ -551,7 +551,7 @@ bool GrGpu::transferPixelsFrom(GrSurface* surface, int left, int top, int width,
bool GrGpu::regenerateMipMapLevels(GrTexture* texture) {
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
SkASSERT(texture);
SkASSERT(this->caps()->mipMapSupport());
SkASSERT(this->caps()->mipmapSupport());
SkASSERT(texture->texturePriv().mipMapped() == GrMipmapped::kYes);
if (!texture->texturePriv().mipMapsAreDirty()) {
// This can happen when the proxy expects mipmaps to be dirty, but they are not dirty on the
@ -843,7 +843,7 @@ GrBackendTexture GrGpu::createBackendTexture(SkISize dimensions,
return {};
}
if (mipMapped == GrMipmapped::kYes && !this->caps()->mipMapSupport()) {
if (mipMapped == GrMipmapped::kYes && !this->caps()->mipmapSupport()) {
return {};
}
@ -867,7 +867,7 @@ bool GrGpu::updateBackendTexture(const GrBackendTexture& backendTexture,
}
}
if (backendTexture.hasMipmaps() && !this->caps()->mipMapSupport()) {
if (backendTexture.hasMipmaps() && !this->caps()->mipmapSupport()) {
return false;
}
@ -901,7 +901,7 @@ GrBackendTexture GrGpu::createCompressedBackendTexture(SkISize dimensions,
return {};
}
if (mipMapped == GrMipmapped::kYes && !this->caps()->mipMapSupport()) {
if (mipMapped == GrMipmapped::kYes && !this->caps()->mipmapSupport()) {
return {};
}
@ -925,7 +925,7 @@ bool GrGpu::updateCompressedBackendTexture(const GrBackendTexture& backendTextur
return false;
}
if (backendTexture.hasMipmaps() && !this->caps()->mipMapSupport()) {
if (backendTexture.hasMipmaps() && !this->caps()->mipmapSupport()) {
return false;
}

View File

@ -341,7 +341,7 @@ sk_sp<GrTextureProxy> GrProxyProvider::createNonMippedProxyFromBitmap(const SkBi
sk_sp<GrTextureProxy> GrProxyProvider::createMippedProxyFromBitmap(const SkBitmap& bitmap,
SkBudgeted budgeted) {
SkASSERT(this->caps()->mipMapSupport());
SkASSERT(this->caps()->mipmapSupport());
auto colorType = SkColorTypeToGrColorType(bitmap.colorType());
GrBackendFormat format = this->caps()->getDefaultBackendFormat(colorType, GrRenderable::kNo);

View File

@ -89,7 +89,7 @@ GrSurfaceProxyView GrTextureProducer::view(GrMipmapped mipMapped) {
const GrCaps* caps = this->context()->priv().caps();
// Sanitize the MIP map request.
if (mipMapped == GrMipmapped::kYes) {
if ((this->width() == 1 && this->height() == 1) || !caps->mipMapSupport()) {
if ((this->width() == 1 && this->height() == 1) || !caps->mipmapSupport()) {
mipMapped = GrMipmapped::kNo;
}
}

View File

@ -27,7 +27,7 @@ GrD3DCaps::GrD3DCaps(const GrContextOptions& contextOptions, IDXGIAdapter1* adap
/**************************************************************************
* GrCaps fields
**************************************************************************/
fMipMapSupport = true; // always available in Direct3D
fMipmapSupport = true; // always available in Direct3D
fNPOTTextureTileSupport = true; // available in feature level 10_0 and up
fReuseScratchTextures = true; //TODO: figure this out
fGpuTracingSupport = false; //TODO: figure this out

View File

@ -14,7 +14,7 @@
#include "src/gpu/GrStencilSettings.h"
GrDawnCaps::GrDawnCaps(const GrContextOptions& contextOptions) : INHERITED(contextOptions) {
fMipMapSupport = false; // FIXME: implement onRegenerateMipMapLevels in GrDawnGpu.
fMipmapSupport = false; // FIXME: implement onRegenerateMipMapLevels in GrDawnGpu.
fBufferMapThreshold = SK_MaxS32; // FIXME: get this from Dawn?
fShaderCaps.reset(new GrShaderCaps(contextOptions));
fMaxTextureSize = fMaxRenderTargetSize = 8192; // FIXME

View File

@ -44,7 +44,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fRGBA8888PixelsOpsAreSlow = false;
fPartialFBOReadIsSlow = false;
fBindUniformLocationSupport = false;
fMipMapLevelAndLodControlSupport = false;
fMipmapLevelAndLodControlSupport = false;
fRGBAToBGRAReadbackConversionsAreSlow = false;
fUseBufferDataNullHint = false;
fDoManualMipmapping = false;
@ -57,7 +57,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fDetachStencilFromMSAABuffersBeforeReadPixels = false;
fDontSetBaseOrMaxLevelForExternalTextures = false;
fNeverDisableColorWrites = false;
fMustSetTexParameterMinFilterToEnableMipMapping = false;
fMustSetTexParameterMinFilterToEnableMipmapping = false;
fProgramBinarySupport = false;
fProgramParameterSupport = false;
fSamplerObjectSupport = false;
@ -270,10 +270,10 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
} // no WebGL support
if (GR_IS_GR_GL(standard)) {
fMipMapLevelAndLodControlSupport = true;
fMipmapLevelAndLodControlSupport = true;
} else if (GR_IS_GR_GL_ES(standard)) {
if (version >= GR_GL_VER(3,0)) {
fMipMapLevelAndLodControlSupport = true;
fMipmapLevelAndLodControlSupport = true;
}
} // no WebGL support
@ -527,7 +527,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
if (GR_IS_GR_GL(standard)) {
fNPOTTextureTileSupport = true;
fMipMapSupport = true;
fMipmapSupport = true;
} else if (GR_IS_GR_GL_ES(standard)) {
// Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only
// ES3 has no limitations.
@ -537,13 +537,13 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
// support. The OES extension or ES 3.0 allow for MIPS on NPOT textures. So, apparently,
// does the undocumented GL_IMG_texture_npot extension. This extension does not seem to
// to alllow arbitrary wrap modes, however.
fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG_texture_npot");
fMipmapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG_texture_npot");
} else if (GR_IS_GR_WEBGL(standard)) {
// Texture access works in the WebGL 2.0 API as in the OpenGL ES 3.0 API
fNPOTTextureTileSupport = version >= GR_GL_VER(2,0);
// All mipmapping and all wrapping modes are supported for non-power-of-
// two images [in WebGL 2.0].
fMipMapSupport = fNPOTTextureTileSupport;
fMipmapSupport = fNPOTTextureTileSupport;
}
GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize);
@ -3460,7 +3460,7 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
// Using MIPs on this GPU seems to be a source of trouble.
if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) {
fMipMapSupport = false;
fMipmapSupport = false;
}
// https://b.corp.google.com/issues/143074513
@ -3569,7 +3569,7 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
// We saw this bug on a TecnoSpark 3 Pro with a PowerVR GE8300.
// GL_VERSION: "OpenGL ES 3.2 build 1.10@51309121"
// Possibly this could be more limited by driver version or HW generation.
fMustSetTexParameterMinFilterToEnableMipMapping = true;
fMustSetTexParameterMinFilterToEnableMipmapping = true;
}
#endif
@ -3589,7 +3589,7 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
// bugs on some cards/drivers that produce incorrect mip-maps for sRGB textures when using
// glGenerateMipmap. Our implementation requires mip-level sampling control. Additionally,
// it can be much slower (especially on mobile GPUs), so we opt-in only when necessary:
if (fMipMapLevelAndLodControlSupport &&
if (fMipmapLevelAndLodControlSupport &&
(contextOptions.fDoManualMipmapping ||
(kIntel_GrGLVendor == ctxInfo.vendor()) ||
(kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) ||

View File

@ -341,7 +341,7 @@ public:
/// Are textures with GL_TEXTURE_RECTANGLE type supported.
bool rectangleTextureSupport() const { return fRectangleTextureSupport; }
bool mipMapLevelAndLodControlSupport() const { return fMipMapLevelAndLodControlSupport; }
bool mipmapLevelAndLodControlSupport() const { return fMipmapLevelAndLodControlSupport; }
bool doManualMipmapping() const { return fDoManualMipmapping; }
@ -399,8 +399,8 @@ public:
bool neverDisableColorWrites() const { return fNeverDisableColorWrites; }
// Texture parameters must be used to enable MIP mapping even when a sampler object is used.
bool mustSetTexParameterMinFilterToEnableMipMapping() const {
return fMustSetTexParameterMinFilterToEnableMipMapping;
bool mustSetTexParameterMinFilterToEnableMipmapping() const {
return fMustSetTexParameterMinFilterToEnableMipmapping;
}
// Returns the observed maximum number of instances the driver can handle in a single draw call
@ -534,7 +534,7 @@ private:
bool fPartialFBOReadIsSlow : 1;
bool fBindUniformLocationSupport : 1;
bool fRectangleTextureSupport : 1;
bool fMipMapLevelAndLodControlSupport : 1;
bool fMipmapLevelAndLodControlSupport : 1;
bool fRGBAToBGRAReadbackConversionsAreSlow : 1;
bool fUseBufferDataNullHint : 1;
bool fClearTextureSupport : 1;
@ -556,7 +556,7 @@ private:
bool fDetachStencilFromMSAABuffersBeforeReadPixels : 1;
bool fDontSetBaseOrMaxLevelForExternalTextures : 1;
bool fNeverDisableColorWrites : 1;
bool fMustSetTexParameterMinFilterToEnableMipMapping : 1;
bool fMustSetTexParameterMinFilterToEnableMipmapping : 1;
int fMaxInstancesPerDrawWithoutCrashing = 0;
uint32_t fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;

View File

@ -2575,7 +2575,7 @@ void GrGLGpu::bindTexture(int unitIdx, GrSamplerState samplerState, const GrSwiz
}
if (samplerState.filter() == GrSamplerState::Filter::kMipMap) {
if (!this->caps()->mipMapSupport() ||
if (!this->caps()->mipmapSupport() ||
texture->texturePriv().mipMapped() == GrMipmapped::kNo) {
samplerState.setFilterMode(GrSamplerState::Filter::kLinear);
}
@ -2595,7 +2595,7 @@ void GrGLGpu::bindTexture(int unitIdx, GrSamplerState samplerState, const GrSwiz
GrGLTextureParameters::SamplerOverriddenState newSamplerState;
if (fSamplerObjectCache) {
fSamplerObjectCache->bindSampler(unitIdx, samplerState);
if (this->glCaps().mustSetTexParameterMinFilterToEnableMipMapping()) {
if (this->glCaps().mustSetTexParameterMinFilterToEnableMipmapping()) {
if (samplerState.filter() == GrSamplerState::Filter::kMipMap) {
const GrGLTextureParameters::SamplerOverriddenState& oldSamplerState =
texture->parameters()->samplerOverriddenState();
@ -2632,7 +2632,7 @@ void GrGLGpu::bindTexture(int unitIdx, GrSamplerState samplerState, const GrSwiz
this->setTextureUnit(unitIdx);
GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MIN_FILTER, newSamplerState.fMinFilter));
}
if (this->glCaps().mipMapLevelAndLodControlSupport()) {
if (this->glCaps().mipmapLevelAndLodControlSupport()) {
if (setAll || newSamplerState.fMinLOD != oldSamplerState.fMinLOD) {
this->setTextureUnit(unitIdx);
GL_CALL(TexParameterf(target, GR_GL_TEXTURE_MIN_LOD, newSamplerState.fMinLOD));
@ -2685,7 +2685,7 @@ void GrGLGpu::bindTexture(int unitIdx, GrSamplerState samplerState, const GrSwiz
}
}
// These are not supported in ES2 contexts
if (this->glCaps().mipMapLevelAndLodControlSupport() &&
if (this->glCaps().mipmapLevelAndLodControlSupport() &&
(texture->texturePriv().textureType() != GrTextureType::kExternal ||
!this->glCaps().dontSetBaseOrMaxLevelForExternalTextures())) {
if (newNonsamplerState.fBaseMipMapLevel != oldNonsamplerState.fBaseMipMapLevel) {
@ -3631,7 +3631,7 @@ bool GrGLGpu::onUpdateBackendTexture(const GrBackendTexture& backendTexture,
// If we have mips make sure the base level is set to 0 and the max level set to numMipLevels-1
// so that the uploads go to the right levels.
if (numMipLevels && this->glCaps().mipMapLevelAndLodControlSupport()) {
if (numMipLevels && this->glCaps().mipmapLevelAndLodControlSupport()) {
auto params = backendTexture.getGLTextureParams();
GrGLTextureParameters::NonsamplerState nonsamplerState = params->nonsamplerState();
if (params->nonsamplerState().fBaseMipMapLevel != 0) {

View File

@ -16,7 +16,7 @@ class GrMockCaps : public GrCaps {
public:
GrMockCaps(const GrContextOptions& contextOptions, const GrMockOptions& options)
: INHERITED(contextOptions), fOptions(options) {
fMipMapSupport = options.fMipMapSupport;
fMipmapSupport = options.fMipmapSupport;
fDrawInstancedSupport = options.fDrawInstancedSupport;
fHalfFloatVertexAttributeSupport = options.fHalfFloatVertexAttributeSupport;
fMapBufferFlags = options.fMapBufferFlags;

View File

@ -265,7 +265,7 @@ void GrMtlCaps::initGrCaps(const id<MTLDevice> device) {
fOversizedStencilSupport = true;
fMipMapSupport = true; // always available in Metal
fMipmapSupport = true; // always available in Metal
fNPOTTextureTileSupport = true; // always available in Metal
fReuseScratchTextures = true; // Assuming this okay

View File

@ -37,7 +37,7 @@ GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface*
/**************************************************************************
* GrCaps fields
**************************************************************************/
fMipMapSupport = true; // always available in Vulkan
fMipmapSupport = true; // always available in Vulkan
fNPOTTextureTileSupport = true; // always available in Vulkan
fReuseScratchTextures = true; //TODO: figure this out
fGpuTracingSupport = false; //TODO: figure this out

View File

@ -1428,7 +1428,7 @@ bool GrVkGpu::onRegenerateMipMapLevels(GrTexture* tex) {
const GrVkCaps& caps = this->vkCaps();
if (!caps.formatCanBeDstofBlit(vkTex->imageFormat(), false) ||
!caps.formatCanBeSrcofBlit(vkTex->imageFormat(), false) ||
!caps.mipMapSupport()) {
!caps.mipmapSupport()) {
return false;
}

View File

@ -500,7 +500,7 @@ sk_sp<SkImage> SkImage::makeTextureImage(GrContext* context,
SkASSERT(view && view->asTextureProxy());
if (mipMapped == GrMipmapped::kNo || view->asTextureProxy()->mipMapped() == mipMapped ||
!direct->priv().caps()->mipMapSupport()) {
!direct->priv().caps()->mipmapSupport()) {
return sk_ref_sp(const_cast<SkImage*>(this));
}
auto copy = GrCopyBaseMipMapToView(direct, *view, budgeted);
@ -605,7 +605,7 @@ sk_sp<SkImage> SkImage::MakeCrossContextFromPixmap(GrContext* context,
}
// If non-power-of-two mipmapping isn't supported, ignore the client's request
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
buildMips = false;
}

View File

@ -100,7 +100,7 @@ bool SkImage_GpuYUVA::setupMipmapsForPlanes(GrRecordingContext* context) const {
return false;
}
GrSurfaceProxyView newViews[4];
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
// We succeed in this case by doing nothing.
return true;
}
@ -282,7 +282,7 @@ sk_sp<SkImage> SkImage::MakeFromYUVAPixmaps(GrContext* context, SkYUVColorSpace
return nullptr;
}
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
buildMips = false;
}

View File

@ -500,7 +500,7 @@ sk_sp<SkSurface> SkSurface::MakeRenderTarget(GrRecordingContext* ctx, SkBudgeted
sampleCount = std::max(1, sampleCount);
GrMipmapped mipMapped = shouldCreateWithMips ? GrMipmapped::kYes : GrMipmapped::kNo;
if (!ctx->priv().caps()->mipMapSupport()) {
if (!ctx->priv().caps()->mipmapSupport()) {
mipMapped = GrMipmapped::kNo;
}

View File

@ -718,7 +718,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ColorTypeBackendAllocationTest, reporter, ctx
}
for (auto mipMapped : { GrMipmapped::kNo, GrMipmapped::kYes }) {
if (GrMipmapped::kYes == mipMapped && !caps->mipMapSupport()) {
if (GrMipmapped::kYes == mipMapped && !caps->mipmapSupport()) {
continue;
}
@ -903,7 +903,7 @@ DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(GLBackendAllocationTest, reporter, ctxInfo) {
for (auto mipMapped : {GrMipmapped::kNo, GrMipmapped::kYes}) {
if (GrMipmapped::kYes == mipMapped &&
(!glCaps->mipMapSupport() || target == GR_GL_TEXTURE_RECTANGLE)) {
(!glCaps->mipmapSupport() || target == GR_GL_TEXTURE_RECTANGLE)) {
continue;
}
@ -1052,7 +1052,7 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkBackendAllocationTest, reporter, ctxInfo) {
GrBackendFormat format = GrBackendFormat::MakeVk(combo.fFormat);
for (auto mipMapped : { GrMipmapped::kNo, GrMipmapped::kYes }) {
if (GrMipmapped::kYes == mipMapped && !vkCaps->mipMapSupport()) {
if (GrMipmapped::kYes == mipMapped && !vkCaps->mipmapSupport()) {
continue;
}

View File

@ -260,7 +260,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(CompressedBackendAllocationTest, reporter, ct
}
for (auto mipMapped : { GrMipmapped::kNo, GrMipmapped::kYes }) {
if (GrMipmapped::kYes == mipMapped && !caps->mipMapSupport()) {
if (GrMipmapped::kYes == mipMapped && !caps->mipmapSupport()) {
continue;
}

View File

@ -270,7 +270,7 @@ private:
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLOperatorEqTest, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
bool mipMapSupport = context->priv().caps()->mipMapSupport();
bool mipmapSupport = context->priv().caps()->mipmapSupport();
for (int i = 0; i < SurfaceParameters::kNumParams; ++i) {
SurfaceParameters params1(context);
params1.modify(i);
@ -280,7 +280,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLOperatorEqTest, reporter, ctxInfo) {
continue; // can happen on some platforms (ChromeOS)
}
if (SurfaceParameters::kMipMipCount == i && !mipMapSupport) {
if (SurfaceParameters::kMipMipCount == i && !mipmapSupport) {
// If changing the mipmap setting won't result in a different surface characterization,
// skip this step.
continue;
@ -295,7 +295,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLOperatorEqTest, reporter, ctxInfo) {
continue; // can happen on some platforms (ChromeOS)
}
if (SurfaceParameters::kMipMipCount == j && !mipMapSupport) {
if (SurfaceParameters::kMipMipCount == j && !mipmapSupport) {
// If changing the mipmap setting won't result in a different surface
// characterization, skip this step.
continue;
@ -399,7 +399,7 @@ void DDLSurfaceCharacterizationTestImpl(GrDirectContext* dContext, skiatest::Rep
}
}
if (SurfaceParameters::kMipMipCount == i && !caps->mipMapSupport()) {
if (SurfaceParameters::kMipMipCount == i && !caps->mipmapSupport()) {
// If changing the mipmap setting won't result in a different surface characterization,
// skip this step
s = nullptr;
@ -848,7 +848,7 @@ void DDLMakeRenderTargetTestImpl(GrDirectContext* dContext, skiatest::Reporter*
SurfaceParameters params(dContext);
params.modify(i);
if (!dContext->priv().caps()->mipMapSupport()) {
if (!dContext->priv().caps()->mipmapSupport()) {
params.setShouldCreateMipMaps(false);
}
@ -1220,7 +1220,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(DDLCompatibilityTest, reporter, ctxInfo) {
params.setColorType(colorType);
params.setColorSpace(nullptr);
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
params.setShouldCreateMipMaps(false);
}

View File

@ -35,7 +35,7 @@ static constexpr int kSize = 8;
// SkImages and SkSurfaces
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
return;
}
@ -110,7 +110,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) {
// based on if we will use mips in the draw and the mip status of the GrBackendTexture.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
return;
}
@ -250,7 +250,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter,
// resource we took the snapshot of.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrImageSnapshotMipMappedTest, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
return;
}
@ -315,7 +315,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrImageSnapshotMipMappedTest, reporter, ctxIn
// to use mips. This test passes by not crashing or hitting asserts in code.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(Gr1x1TextureMipMappedTest, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
return;
}
@ -373,7 +373,7 @@ DEF_GPUTEST(GrManyDependentsMipMappedTest, reporter, /* options */) {
for (auto enableSortingAndReduction : {Enable::kYes, Enable::kNo}) {
GrMockOptions mockOptions;
mockOptions.fMipMapSupport = true;
mockOptions.fMipmapSupport = true;
GrContextOptions ctxOptions;
ctxOptions.fReduceOpsTaskSplitting = enableSortingAndReduction;
sk_sp<GrDirectContext> context = GrDirectContext::MakeMock(&mockOptions, ctxOptions);
@ -384,7 +384,7 @@ DEF_GPUTEST(GrManyDependentsMipMappedTest, reporter, /* options */) {
continue;
}
SkASSERT(context->priv().caps()->mipMapSupport());
SkASSERT(context->priv().caps()->mipmapSupport());
GrBackendFormat format = context->defaultBackendFormat(
kRGBA_8888_SkColorType, GrRenderable::kYes);

View File

@ -135,7 +135,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) {
// Check that the lack of mipmap support blocks the creation of mipmapped
// proxies
bool expectedMipMapability = isTexturable && caps->mipMapSupport() && !isCompressed;
bool expectedMipMapability = isTexturable && caps->mipmapSupport() && !isCompressed;
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
combo.fFormat, kDims, GrRenderable::kNo, 1, GrMipmapped::kYes,
@ -413,7 +413,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadOnlyTexture, reporter, context_info) {
REPORTER_ASSERT(reporter, gpuCopyResult == (ioType == kRW_GrIOType));
// Mip regen should not work with a read only texture.
if (context->priv().caps()->mipMapSupport()) {
if (context->priv().caps()->mipmapSupport()) {
DeleteBackendTexture(context, backendTex);
backendTex = context->createBackendTexture(
kSize, kSize, kRGBA_8888_SkColorType,

View File

@ -17,7 +17,7 @@
// Tests that MIP maps are created and invalidated as expected when drawing to and from GrTextures.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrTextureMipMapInvalidationTest, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
if (!context->priv().caps()->mipMapSupport()) {
if (!context->priv().caps()->mipmapSupport()) {
return;
}
@ -66,7 +66,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrTextureMipMapInvalidationTest, reporter, ct
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReimportImageTextureWithMipLevels, reporter, ctxInfo) {
auto ctx = ctxInfo.directContext();
if (!ctx->priv().caps()->mipMapSupport()) {
if (!ctx->priv().caps()->mipmapSupport()) {
return;
}
static constexpr auto kCreateWithMipMaps = true;

View File

@ -421,7 +421,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkImage_makeTextureImage, reporter, contextIn
GrTextureProxy* copyProxy = as_IB(texImage)->peekProxy()->asTextureProxy();
SkASSERT(copyProxy);
bool shouldBeMipped =
mipMapped == GrMipmapped::kYes && context->priv().caps()->mipMapSupport();
mipMapped == GrMipmapped::kYes && context->priv().caps()->mipmapSupport();
if (shouldBeMipped && copyProxy->mipMapped() == GrMipmapped::kNo) {
ERRORF(reporter, "makeTextureImage returned non-mipmapped texture.");
continue;

View File

@ -102,7 +102,7 @@ DEF_GPUTEST_FOR_METAL_CONTEXT(MtlBackendAllocationTest, reporter, ctxInfo) {
}
for (auto mipMapped : { GrMipmapped::kNo, GrMipmapped::kYes }) {
if (GrMipmapped::kYes == mipMapped && !mtlCaps->mipMapSupport()) {
if (GrMipmapped::kYes == mipMapped && !mtlCaps->mipmapSupport()) {
continue;
}

View File

@ -262,7 +262,7 @@ bool GrDrawingManager::ProgramUnitTest(GrDirectContext* direct, int maxStages, i
GrProcessorTestData::ViewInfo views[2];
// setup dummy textures
GrMipmapped mipMapped = GrMipmapped(caps->mipMapSupport());
GrMipmapped mipMapped = GrMipmapped(caps->mipmapSupport());
{
static constexpr SkISize kDummyDims = {34, 18};
const GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kRGBA_8888,

View File

@ -1649,7 +1649,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GPUMemorySize, reporter, ctxInfo) {
}
// Mipmapped versions
if (caps->mipMapSupport()) {
if (caps->mipmapSupport()) {
sk_sp<GrTextureProxy> proxy;
proxy = make_mipmap_proxy(context, GrRenderable::kYes, kSize, 1);