Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/ui/painting/image_decoder_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my edification, why isn't the texture desciptor telling us the MipCount is 1 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a code path to disable mipmap creation for certain texture uploads. So even though this texture may be big enough to support 3 miplevels we may not want to create them


auto texture =
context->GetResourceAllocator()->CreateTexture(texture_descriptor);
Expand Down