Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5108251

Browse files
author
Jonah Williams
authored
[impeller] if not creating mipmaps dont set mip count (#40513)
[impeller] if not creating mipmaps dont set mip count
1 parent 9a742fa commit 5108251

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ui/painting/image_decoder_impeller.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ sk_sp<DlImage> ImageDecoderImpeller::UploadTextureToShared(
323323
texture_descriptor.storage_mode = impeller::StorageMode::kHostVisible;
324324
texture_descriptor.format = pixel_format.value();
325325
texture_descriptor.size = {image_info.width(), image_info.height()};
326-
texture_descriptor.mip_count = texture_descriptor.size.MipCount();
326+
texture_descriptor.mip_count =
327+
create_mips ? texture_descriptor.size.MipCount() : 1;
327328

328329
auto texture =
329330
context->GetResourceAllocator()->CreateTexture(texture_descriptor);

0 commit comments

Comments
 (0)