[Impeller] Get rid of an extra copy during texture upload by decompressing to a device buffer.

This issue has been tracked since 2023-03-17.

A temporary host allocation is created when image decompression before that allocation is transferred over to the device. Depending on the need for a staging buffer, yet another copy may be necessary. The image decoders should decompress directly into a device buffer. The buffer could then be used as a staging buffer or transmuted into a texture directly.

chinmaygarde wrote this answer on 2023-03-17

There is an SkBitmap::tryAllocPixels variant that takes a custom allocator. That allocator can be made to return an impeller::DeviceBuffer mapping.

jonahwilliams wrote this answer on 2023-03-18

We also do this for multiframe codecs (gifs), but that codec class needs substantially more work to remove this allocation

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2023-03-30
Star Count 151602
Watcher Count 3555
Fork Count 25000
Issue Count 11498


Issue Title Created Date Updated Date