[impeller] use lossy texture compression on iOS (flutter/engine#40520)
[Impeller] use lossy texture compression on iOS for decode images and MSAA resolve textures.
This commit is contained in:
@@ -297,6 +297,7 @@ RenderTarget RenderTarget::CreateOffscreenMSAA(
|
||||
color_attachment_config.resolve_storage_mode;
|
||||
color0_resolve_tex_desc.format = pixel_format;
|
||||
color0_resolve_tex_desc.size = size;
|
||||
color0_resolve_tex_desc.compression_type = CompressionType::kLossy;
|
||||
color0_resolve_tex_desc.usage =
|
||||
static_cast<uint64_t>(TextureUsage::kRenderTarget) |
|
||||
static_cast<uint64_t>(TextureUsage::kShaderRead);
|
||||
|
||||
@@ -269,6 +269,7 @@ sk_sp<DlImage> ImageDecoderImpeller::UploadTextureToPrivate(
|
||||
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.compression_type = impeller::CompressionType::kLossy;
|
||||
|
||||
auto dest_texture =
|
||||
context->GetResourceAllocator()->CreateTexture(texture_descriptor);
|
||||
|
||||
Reference in New Issue
Block a user