[impeller] if not creating mipmaps dont set mip count (flutter/engine#40513)

[impeller] if not creating mipmaps dont set mip count
This commit is contained in:
Jonah Williams
2023-03-21 19:09:11 -07:00
committed by GitHub
parent 05b489086e
commit 10e9dfa1c4

View File

@@ -323,7 +323,8 @@ sk_sp<DlImage> ImageDecoderImpeller::UploadTextureToShared(
texture_descriptor.storage_mode = impeller::StorageMode::kHostVisible;
texture_descriptor.format = pixel_format.value();
texture_descriptor.size = {image_info.width(), image_info.height()};
texture_descriptor.mip_count = texture_descriptor.size.MipCount();
texture_descriptor.mip_count =
create_mips ? texture_descriptor.size.MipCount() : 1;
auto texture =
context->GetResourceAllocator()->CreateTexture(texture_descriptor);