flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.52k stars 27.32k forks source link

[Impeller] add all commonly supported pixel formats to dart:ui supported pixel formats #156505

Open jonahwilliams opened 1 week ago

jonahwilliams commented 1 week ago

Most of these are not supported by skia, but can be used in impeller for either rendering or for binding in shaders.

Considerations:

jonahwilliams commented 1 week ago

I'm currently using https://docs.vulkan.org/spec/latest/chapters/formats.html Mandatory Format Support + VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT

jonahwilliams commented 6 days ago

ooh boy, this one might be a bit of a doozy. It turns out all texture uploads currently flow through the Skia backed texture decompression path, with carveouts for already decompressed textures. i.e. we expect to be able to construct an SkImageInfo, which isn't possible with most of these formats.

Instead, so that we can be less dependent on Skia i'm going to propose a new dart:ui enum and upload function that is distinct from the current upload methods.

jonahwilliams commented 6 days ago

https://github.com/flutter/engine/compare/main...jonahwilliams:engine:pixel_palooza?expand=1

It also turns out I have no idea where to find the list of supported formats on GLES. Might be some guess and check there.

jonahwilliams commented 6 days ago

Also: https://github.com/flutter/flutter/issues/148443