Canvas Is Drawing Too Slowly
Solution 1:
OpenGL ES 2.0 imposes support of non-power of two textures, so you're safe with it. If you use OpenGL ES 1.0 and you don't have power of two support, it's very easy to work around it (just create a power of two texture big enough to contain your npot image.)
Note: you should profile your app to see whether you can improve the speed with Canvas. Maybe you are downscaling the image at draw time, maybe it's not in a compatible configuration and conversion happens at runtime (565 to 8888 for instance), etc.
Solution 2:
I found that ImageView never gave me the framerates I was looking for (the reason, I don't know). For something like this you should override SurfaceView instead. It's a bit more work, but you'll definitely see an improvement in the framerate and you'll have much more flexibility. Obviously you'll want to be aware of your clip and know that if any other view overlays this one, that will cause a significant slowdown as well (since the overlay will also need to be redrawn on each frame).
Post a Comment for "Canvas Is Drawing Too Slowly"