We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
可以用c++ 加载 效率会有所提高 参照: giflib
Sorry, something went wrong.
对gif,目前Google并没有提供很好的支持,目前大部分还是依赖第三方库加载,比如glide,frescro。如果自己写代价有点,可能还得用到C
gif图实际上就是多帧合并的图
参考Fresco内部实现: 1,View层使用一个Drawable,包含bitmap,并依据gif的信息不断的更新并绘制bitmap 2,C层提供api功能,例如:输入gif数据流,提供解析gif信息、更新bitmap等功能
1、使用GIFLIB+双缓冲的实现,只会创建两个Bitmap,并且内存消耗非常之稳定
2、相比Glide的原生加载,当加载过大的GIF图时,超过了BitmapPool的可用大小,还是会直接创建Bitmap的.
3、使用GIFLIB是直接在native层对GIF数据进行解码的,这一点对Glide来说,效率和内存消耗情况都比较占优.
4、Glide构建当前帧数据和下一帧数据是串行的,而FrameSequenceDrawable则是利用了双缓冲以及解码子线程来实现近似同步的完成上一帧和下一帧数据的无缝衔接的.
用Glide加载Gif导致的卡顿,说一下你的优化思路
这个优化方案还不错,侵入性相对低一些,可以提供参考。 https://juejin.cn/post/6966079368820949029
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: