wisdomtl / framesurfaceview Goto Github PK
View Code? Open in Web Editor NEWplay frame animation by SurfaceView. Get rid of OOM due to complex frame animation and could play frame animation smoothly with huge frame image(1MB)
play frame animation by SurfaceView. Get rid of OOM due to complex frame animation and could play frame animation smoothly with huge frame image(1MB)
手机系统信息:MIUI 12, Android 10
--------- beginning of crash
2020-11-05 10:31:09.593 30009-30051/taylor.com.framesurfaceview E/AndroidRuntime: FATAL EXCEPTION: DecodingThread
Process: taylor.com.framesurfaceview, PID: 30009
android.content.res.Resources$NotFoundException: File res/raw/frame18.png from drawable resource ID #0x7f0e000a
at android.content.res.ResourcesImpl.openRawResource(ResourcesImpl.java:362)
at android.content.res.MiuiResourcesImpl.openRawResource(MiuiResourcesImpl.java:170)
at android.content.res.Resources.openRawResource(Resources.java:1317)
at android.content.res.Resources.openRawResource(Resources.java:1261)
at taylor.lib.framesurfaceview.FrameSurfaceView.decodeBitmap(FrameSurfaceView.java:285)
at taylor.lib.framesurfaceview.FrameSurfaceView.putDecodedBitmap(FrameSurfaceView.java:299)
at taylor.lib.framesurfaceview.FrameSurfaceView.putDecodedBitmapByReuse(FrameSurfaceView.java:295)
at taylor.lib.framesurfaceview.FrameSurfaceView.access$000(FrameSurfaceView.java:22)
at taylor.lib.framesurfaceview.FrameSurfaceView$DecodeRunnable.run(FrameSurfaceView.java:361)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.io.FileNotFoundException: res/raw/frame18.png
at android.content.res.AssetManager.nativeOpenNonAsset(Native Method)
at android.content.res.AssetManager.openNonAsset(AssetManager.java:973)
at android.content.res.ResourcesImpl.openRawResource(ResourcesImpl.java:356)
at android.content.res.MiuiResourcesImpl.openRawResource(MiuiResourcesImpl.java:170)
at android.content.res.Resources.openRawResource(Resources.java:1317)
at android.content.res.Resources.openRawResource(Resources.java:1261)
at taylor.lib.framesurfaceview.FrameSurfaceView.decodeBitmap(FrameSurfaceView.java:285)
at taylor.lib.framesurfaceview.FrameSurfaceView.putDecodedBitmap(FrameSurfaceView.java:299)
at taylor.lib.framesurfaceview.FrameSurfaceView.putDecodedBitmapByReuse(FrameSurfaceView.java:295)
at taylor.lib.framesurfaceview.FrameSurfaceView.access$000(FrameSurfaceView.java:22)
at taylor.lib.framesurfaceview.FrameSurfaceView$DecodeRunnable.run(FrameSurfaceView.java:361)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.os.HandlerThread.run(HandlerThread.java:67)
动画执行完一次之后会闪屏,然后如果把FrameSurfaceView的clearCanvas方法注释掉之后它不闪了,但是结束后会跳掉之前已经播放的帧
请问为什么不直接使用rapid这个库加载bitmap,而是放在APP工程中引用
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.