1

我想在我的应用程序中有一个静态背景图像,然后我想在前景中有一些小动画。目前,我基本上每次都必须重新绘制整个屏幕,即使唯一改变的东西很小并且只占屏幕的一小部分。

有没有办法只更新部分屏幕来加快我的应用程序帧速率?可以用 SurfaceView 完成,还是我必须使用 GLSurfaceView 来代替?

任何解释和教程/文档的链接都将不胜感激。

谢谢,

4

1 回答 1

0

You're looking for the postInvalidate(int, int, int, int) method (or just invalidate(...) if you're calling it from the UI thread). You can specify an area of the View to re-render, leaving the rest of the image untouched.

Link

于 2011-04-22T17:53:53.950 回答