Finish GrMipMapped->GrMipmapped

Change-Id: I3a9e9e90b0ac1b1099830eaca06506bcce794144
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530055
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Brian Salomon 2022-04-15 09:19:38 -04:00 committed by SkCQ
parent 84e2586f15
commit 7bfda9a23d
20 changed files with 24 additions and 24 deletions

View File

@ -180,7 +180,7 @@ static sk_sp<SkImage> make_yuv_420(GrRecordingContext* rContext,
auto yuvaPixmaps = SkYUVAPixmaps::FromExternalPixmaps(yuvaInfo, pixmaps);
return SkImage::MakeFromYUVAPixmaps(
rContext, yuvaPixmaps, GrMipMapped::kNo, false, std::move(cs));
rContext, yuvaPixmaps, GrMipmapped::kNo, false, std::move(cs));
}
// Init with illegal values, so our first compare will fail, forcing us to compute

View File

@ -164,7 +164,7 @@ sk_sp<SkPromiseImageTexture> DDLFuzzer::fulfillPromiseImage(PromiseImageInfo& pr
kPromiseImageSize.height(),
kRGBA_8888_SkColorType,
SkColors::kRed,
GrMipMapped::kNo,
GrMipmapped::kNo,
GrRenderable::kYes,
GrProtected::kNo,
markFinished,
@ -222,7 +222,7 @@ void DDLFuzzer::initPromiseImage(int index) {
promiseImage.fImage = SkImage::MakePromiseTexture(fContext->threadSafeProxy(),
backendFmt,
kPromiseImageSize,
GrMipMapped::kNo,
GrMipmapped::kNo,
kTopLeft_GrSurfaceOrigin,
kRGBA_8888_SkColorType,
kUnpremul_SkAlphaType,

View File

@ -1214,7 +1214,7 @@ protected:
auto yuvaPixmaps = SkYUVAPixmaps::FromExternalPixmaps(info, pixmaps);
auto img = SkImage::MakeFromYUVAPixmaps(canvas->recordingContext(),
yuvaPixmaps,
GrMipMapped::kNo,
GrMipmapped::kNo,
/* limit to max tex size */ false,
/* color space */ nullptr);
if (img) {

View File

@ -113,7 +113,7 @@ DEF_SIMPLE_GM_CAN_FAIL(yuv420_odd_dim_repeat, canvas, errMsg,
auto yuvaPixmaps = SkYUVAPixmaps::FromExternalPixmaps(yuvaInfo, pixmaps);
image = SkImage::MakeFromYUVAPixmaps(canvas->recordingContext(),
yuvaPixmaps,
GrMipMapped::kYes,
GrMipmapped::kYes,
/* limit to max tex size */ false,
/* color space */ nullptr);
if (!image) {

View File

@ -462,7 +462,7 @@ public:
*/
static sk_sp<SkImage> MakeFromYUVAPixmaps(GrRecordingContext* context,
const SkYUVAPixmaps& pixmaps,
GrMipMapped buildMips = GrMipmapped::kNo,
GrMipmapped buildMips = GrMipmapped::kNo,
bool limitToMaxTextureSize = false,
sk_sp<SkColorSpace> imageColorSpace = nullptr);

View File

@ -92,7 +92,7 @@ public:
GrRenderable renderable,
int renderTargetSampleCnt,
SkBudgeted budgeted,
GrMipMapped mipMapped,
GrMipmapped mipMapped,
GrProtected isProtected,
const GrMipLevel texels[]);

View File

@ -335,7 +335,7 @@ GrThreadSafeCache::CreateLazyView(GrDirectContext* dContext,
sk_sp<Trampoline> trampoline(new Trampoline);
GrProxyProvider::TextureInfo texInfo{ GrMipMapped::kNo, GrTextureType::k2D };
GrProxyProvider::TextureInfo texInfo{ GrMipmapped::kNo, GrTextureType::k2D };
sk_sp<GrRenderTargetProxy> proxy = proxyProvider->createLazyRenderTargetProxy(
[trampoline](

View File

@ -183,7 +183,7 @@ bool SurfaceContext::readPixels(GrDirectContext* dContext, GrPixmap dst, SkIPoin
sk_sp<GrSurfaceProxy> copy;
static constexpr auto kFit = SkBackingFit::kExact;
static constexpr auto kBudgeted = SkBudgeted::kYes;
static constexpr auto kMipMapped = GrMipMapped::kNo;
static constexpr auto kMipMapped = GrMipmapped::kNo;
if (restrictions.fMustCopyWholeSrc) {
copy = GrSurfaceProxy::Copy(fContext,
std::move(srcProxy),

View File

@ -884,7 +884,7 @@ bool GrMtlGpu::createMtlTextureForBackendSurface(MTLPixelFormat mtlFormat,
desc.pixelFormat = mtlFormat;
desc.width = dimensions.width();
desc.height = dimensions.height();
if (mipMapped == GrMipMapped::kYes) {
if (mipMapped == GrMipmapped::kYes) {
desc.mipmapLevelCount = 1 + SkPrevLog2(std::max(dimensions.width(), dimensions.height()));
}
if (@available(macOS 10.11, iOS 9.0, *)) {

View File

@ -152,7 +152,7 @@ size_t GrMtlTextureRenderTarget::onGpuMemorySize() const {
// Msaa attachment should have a valid size
SkASSERT(this->colorAttachment()->gpuMemorySize() ==
GrSurface::ComputeSize(this->backendFormat(), this->dimensions(),
this->numSamples(), GrMipMapped::kNo));
this->numSamples(), GrMipmapped::kNo));
}
#endif
return GrSurface::ComputeSize(this->backendFormat(), this->dimensions(),

View File

@ -327,7 +327,7 @@ GrSurfaceProxyView render_sw_mask(GrRecordingContext* context,
skgpu::Swizzle swizzle = context->priv().caps()->getReadSwizzle(format,
GrColorType::kAlpha_8);
auto proxy = proxyProvider->createProxy(format, bounds.size(), GrRenderable::kNo, 1,
GrMipMapped::kNo, SkBackingFit::kApprox,
GrMipmapped::kNo, SkBackingFit::kApprox,
SkBudgeted::kYes, GrProtected::kNo);
// Since this will be rendered on another thread, make a copy of the elements in case

View File

@ -185,7 +185,7 @@ size_t GrVkTextureRenderTarget::onGpuMemorySize() const {
// Msaa attachment should have a valid size
SkASSERT(this->colorAttachment()->gpuMemorySize() ==
GrSurface::ComputeSize(this->backendFormat(), this->dimensions(),
this->numSamples(), GrMipMapped::kNo));
this->numSamples(), GrMipmapped::kNo));
}
#endif
return GrSurface::ComputeSize(this->backendFormat(), this->dimensions(),

View File

@ -273,7 +273,7 @@ sk_sp<SkImage> SkImage::MakeFromYUVAPixmaps(GrRecordingContext* context,
}
if (!context->priv().caps()->mipmapSupport()) {
buildMips = GrMipMapped::kNo;
buildMips = GrMipmapped::kNo;
}
// Resize the pixmaps if necessary.

View File

@ -264,7 +264,7 @@ static void test_compressed_data_init(GrDirectContext* dContext,
std::unique_ptr<const char[]> dataNew(
make_compressed_data(compression, expectedColorsNew, mipMapped));
size_t dataNewSize =
SkCompressedDataSize(compression, {32, 32}, nullptr, mipMapped == GrMipMapped::kYes);
SkCompressedDataSize(compression, {32, 32}, nullptr, mipMapped == GrMipmapped::kYes);
bool result = dContext->updateCompressedBackendTexture(backendTex, dataNew.get(), dataNewSize,
nullptr, nullptr);

View File

@ -204,7 +204,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DMSAA_dual_source_blend_disable, reporter, ct
texDims.height(),
kRGBA_8888_SkColorType,
SkColors::kBlue,
GrMipMapped::kNo,
GrMipmapped::kNo,
GrRenderable::kYes,
GrProtected::kNo);
@ -219,7 +219,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DMSAA_dual_source_blend_disable, reporter, ct
surfaceDims.height(),
kRGBA_8888_SkColorType,
SkColors::kRed,
GrMipMapped::kNo,
GrMipmapped::kNo,
GrRenderable::kYes,
GrProtected::kNo);
@ -227,7 +227,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DMSAA_dual_source_blend_disable, reporter, ct
surfaceDims.height(),
kRGBA_8888_SkColorType,
SkColors::kYellow,
GrMipMapped::kNo,
GrMipmapped::kNo,
GrRenderable::kYes,
GrProtected::kNo);

View File

@ -47,7 +47,7 @@ static std::unique_ptr<skgpu::v1::SurfaceDrawContext> new_SDC(GrRecordingContext
{wh, wh},
SkSurfaceProps(),
1,
GrMipMapped::kNo,
GrMipmapped::kNo,
GrProtected::kNo,
kImageOrigin,
SkBudgeted::kYes);
@ -390,7 +390,7 @@ public:
GrRenderable::kNo);
return GrSurface::ComputeSize(format, {wh, wh}, /*colorSamplesPerPixel=*/1,
GrMipMapped::kNo, /*binSize=*/false);
GrMipmapped::kNo, /*binSize=*/false);
}
private:

View File

@ -57,7 +57,7 @@ static void check_pixels(skiatest::Reporter* reporter, const SkBitmap& bitmap,
static void run_test(skiatest::Reporter* reporter,
GrDirectContext* context,
GrSurfaceOrigin origin) {
auto beTexture = context->createBackendTexture(8, 8, kRGBA_8888_SkColorType, GrMipMapped::kNo,
auto beTexture = context->createBackendTexture(8, 8, kRGBA_8888_SkColorType, GrMipmapped::kNo,
GrRenderable::kYes, GrProtected::kNo);
REPORTER_ASSERT(reporter, beTexture.isValid());
if (!beTexture.isValid()) {

View File

@ -316,7 +316,7 @@ void basic_transfer_from_test(skiatest::Reporter* reporter, const sk_gpu_test::C
data.fRowBytes = textureDataRowBytes;
sk_sp<GrTexture> tex = resourceProvider->createTexture(kTexDims, format, GrTextureType::k2D,
colorType, renderable, 1,
SkBudgeted::kNo, GrMipMapped::kNo,
SkBudgeted::kNo, GrMipmapped::kNo,
GrProtected::kNo, &data);
if (!tex) {
return;

View File

@ -194,7 +194,7 @@ void DDLTileHelper::TileData::CreateBackendTexture(GrDirectContext* direct, Tile
const SkSurfaceCharacterization& c = tile->fPlaybackChar;
GrBackendTexture beTex = direct->createBackendTexture(c.width(), c.height(), c.colorType(),
GrMipMapped(c.isMipMapped()),
GrMipmapped(c.isMipMapped()),
GrRenderable::kYes);
tile->fCallbackContext->setBackendTexture(beTex);
}

View File

@ -178,7 +178,7 @@ static bool setup_backend_objects(GrDirectContext* dContext,
constexpr int kSampleCnt = 0;
sk_sp<GrTexture> tmp = resourceProvider->createTexture(
offscreenDims, renderableFormat, GrTextureType::k2D, GrColorType::kRGBA_8888,
GrRenderable::kYes, kSampleCnt, SkBudgeted::kNo, GrMipMapped::kNo, GrProtected::kNo,
GrRenderable::kYes, kSampleCnt, SkBudgeted::kNo, GrMipmapped::kNo, GrProtected::kNo,
&level0);
if (!tmp || !tmp->asRenderTarget()) {
fputs("GrTexture is invalid.\n", stderr);