diff --git a/gm/texelsubset.cpp b/gm/texelsubset.cpp index 5a10182d7b..211f612a0e 100644 --- a/gm/texelsubset.cpp +++ b/gm/texelsubset.cpp @@ -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); diff --git a/include/gpu/mock/GrMockTypes.h b/include/gpu/mock/GrMockTypes.h index 897a83105e..83036fab33 100644 --- a/include/gpu/mock/GrMockTypes.h +++ b/include/gpu/mock/GrMockTypes.h @@ -108,7 +108,7 @@ struct GrMockOptions { }; // GrCaps options. - bool fMipMapSupport = false; + bool fMipmapSupport = false; bool fDrawInstancedSupport = false; bool fHalfFloatVertexAttributeSupport = false; uint32_t fMapBufferFlags = 0; diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp index 29216d05e2..10d34fff5d 100644 --- a/src/gpu/GrCaps.cpp +++ b/src/gpu/GrCaps.cpp @@ -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; } diff --git a/src/gpu/GrCaps.h b/src/gpu/GrCaps.h index 2564053e60..af1640b10e 100644 --- a/src/gpu/GrCaps.h +++ b/src/gpu/GrCaps.h @@ -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 fShaderCaps; bool fNPOTTextureTileSupport : 1; - bool fMipMapSupport : 1; + bool fMipmapSupport : 1; bool fReuseScratchTextures : 1; bool fReuseScratchBuffers : 1; bool fGpuTracingSupport : 1; diff --git a/src/gpu/GrContextThreadSafeProxy.cpp b/src/gpu/GrContextThreadSafeProxy.cpp index fe3987083c..b4fbed664c 100644 --- a/src/gpu/GrContextThreadSafeProxy.cpp +++ b/src/gpu/GrContextThreadSafeProxy.cpp @@ -58,7 +58,7 @@ SkSurfaceCharacterization GrContextThreadSafeProxy::createCharacterization( return SkSurfaceCharacterization(); // return an invalid characterization } - if (!fCaps->mipMapSupport()) { + if (!fCaps->mipmapSupport()) { isMipMapped = false; } diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index 8a08809b31..98e3e434e9 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -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; } diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp index d77caa34e1..1017b9ece1 100644 --- a/src/gpu/GrProxyProvider.cpp +++ b/src/gpu/GrProxyProvider.cpp @@ -341,7 +341,7 @@ sk_sp GrProxyProvider::createNonMippedProxyFromBitmap(const SkBi sk_sp 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); diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp index e5b14cb6e5..51dbe2d999 100644 --- a/src/gpu/GrTextureProducer.cpp +++ b/src/gpu/GrTextureProducer.cpp @@ -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; } } diff --git a/src/gpu/d3d/GrD3DCaps.cpp b/src/gpu/d3d/GrD3DCaps.cpp index 740a21ab0c..444a1dd3f0 100644 --- a/src/gpu/d3d/GrD3DCaps.cpp +++ b/src/gpu/d3d/GrD3DCaps.cpp @@ -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 diff --git a/src/gpu/dawn/GrDawnCaps.cpp b/src/gpu/dawn/GrDawnCaps.cpp index 41b9fd851a..2a89c84428 100644 --- a/src/gpu/dawn/GrDawnCaps.cpp +++ b/src/gpu/dawn/GrDawnCaps.cpp @@ -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 diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 28610d70c2..783f3a6683 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -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) || diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index e2bf37781e..216995cc3b 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -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; diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 92182b6be2..eafc1cacbe 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -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) { diff --git a/src/gpu/mock/GrMockCaps.h b/src/gpu/mock/GrMockCaps.h index 6548aa634b..b684acd31f 100644 --- a/src/gpu/mock/GrMockCaps.h +++ b/src/gpu/mock/GrMockCaps.h @@ -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; diff --git a/src/gpu/mtl/GrMtlCaps.mm b/src/gpu/mtl/GrMtlCaps.mm index 2fb81021f4..b767bd3fdc 100644 --- a/src/gpu/mtl/GrMtlCaps.mm +++ b/src/gpu/mtl/GrMtlCaps.mm @@ -265,7 +265,7 @@ void GrMtlCaps::initGrCaps(const id 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 diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp index 0c737a37d0..400e709c83 100644 --- a/src/gpu/vk/GrVkCaps.cpp +++ b/src/gpu/vk/GrVkCaps.cpp @@ -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 diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index 0b5636ecf1..d521ef2bc5 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -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; } diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 1282819f64..7dfc391e03 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -500,7 +500,7 @@ sk_sp 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(this)); } auto copy = GrCopyBaseMipMapToView(direct, *view, budgeted); @@ -605,7 +605,7 @@ sk_sp 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; } diff --git a/src/image/SkImage_GpuYUVA.cpp b/src/image/SkImage_GpuYUVA.cpp index 3410371e6e..9398ff6971 100644 --- a/src/image/SkImage_GpuYUVA.cpp +++ b/src/image/SkImage_GpuYUVA.cpp @@ -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::MakeFromYUVAPixmaps(GrContext* context, SkYUVColorSpace return nullptr; } - if (!context->priv().caps()->mipMapSupport()) { + if (!context->priv().caps()->mipmapSupport()) { buildMips = false; } diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index a31a59efd5..5a1425b725 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -500,7 +500,7 @@ sk_sp 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; } diff --git a/tests/BackendAllocationTest.cpp b/tests/BackendAllocationTest.cpp index 667bdea557..3b19e18adc 100644 --- a/tests/BackendAllocationTest.cpp +++ b/tests/BackendAllocationTest.cpp @@ -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; } diff --git a/tests/CompressedBackendAllocationTest.cpp b/tests/CompressedBackendAllocationTest.cpp index ce06ff73e2..897947921b 100644 --- a/tests/CompressedBackendAllocationTest.cpp +++ b/tests/CompressedBackendAllocationTest.cpp @@ -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; } diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp index a472431b16..8f533129d4 100644 --- a/tests/DeferredDisplayListTest.cpp +++ b/tests/DeferredDisplayListTest.cpp @@ -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); } diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp index 82dcd80890..54bd6cfd79 100644 --- a/tests/GrMipMappedTest.cpp +++ b/tests/GrMipMappedTest.cpp @@ -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 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); diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index 51687e7f5d..6cd5b00d0a 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp @@ -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 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, diff --git a/tests/GrTextureMipMapInvalidationTest.cpp b/tests/GrTextureMipMapInvalidationTest.cpp index 5fffd76ede..e71005feed 100644 --- a/tests/GrTextureMipMapInvalidationTest.cpp +++ b/tests/GrTextureMipMapInvalidationTest.cpp @@ -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; diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index a0deb41842..f4a36a49cb 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -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; diff --git a/tests/MtlBackendAllocationTest.mm b/tests/MtlBackendAllocationTest.mm index dd6eaef4e4..249b800fd4 100644 --- a/tests/MtlBackendAllocationTest.mm +++ b/tests/MtlBackendAllocationTest.mm @@ -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; } diff --git a/tests/ProgramsTest.cpp b/tests/ProgramsTest.cpp index 5e25f08882..4bb94859e9 100644 --- a/tests/ProgramsTest.cpp +++ b/tests/ProgramsTest.cpp @@ -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, diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 2f0546ac3a..8714bb26fa 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -1649,7 +1649,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GPUMemorySize, reporter, ctxInfo) { } // Mipmapped versions - if (caps->mipMapSupport()) { + if (caps->mipmapSupport()) { sk_sp proxy; proxy = make_mipmap_proxy(context, GrRenderable::kYes, kSize, 1);