性能优化
ImageDecoder
//
https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder
Interfaces
AudioDecoder
Decodes EncodedAudioChunk objects.
VideoDecoder
Decodes EncodedVideoChunk objects.
AudioEncoder
Encodes AudioData objects.
VideoEncoder
Encodes VideoFrame objects.
EncodedAudioChunk
Represents codec-specific encoded audio bytes.
EncodedVideoChunk
Represents codec-specific encoded video bytes.
AudioData
Represents unencoded audio data.
VideoFrame
Represents a frame of unencoded video data.
VideoColorSpace
Represents the color space of a video frame.
ImageDecoder
Unpacks and decodes image data, giving access to the sequence of frames in an animated image.
ImageTrackList
Represents the list of tracks available in the image.
ImageTrack
Represents an individual image track.
https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API
图像解码
Flutter web 现在会在支持它的浏览器中自动检测和使用 ImageDecoder API
。
截至今天,大多数基于 Chromium 的浏览器(Chrome、Edge、Opera、三星浏览器等)都添加了此 API。
新的 API 使用浏览器的内置图像编解码器从主线程异步解码图像。
这将图像解码速度提高了 2 倍,并且它从不阻塞主线程,消除了以前由图像引起的所有卡顿。
https://medium.com/flutter/whats-new-in-flutter-3-8c74a5bc32d0
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载