andengine动态壁纸冷冻焦点

时间:2013-12-11 05:52:38

标签: android andengine live-wallpaper

我正在使用andengine开发动态壁纸。最初我为每个精灵使用了大约20个纹理图集但是在andengine论坛的其中一个帖子中我看到许多纹理图集在你的应用程序中不是一件好事所以我把它改为纹理打包器现在我有3个纹理加壳。一切都很好,除非壁纸获得焦点(解锁或关闭另一个应用程序),壁纸冻结约1-2秒。即使我为每个精灵都有单独的纹理图集,也会出现冻结现象。我在onResume方法和第一个动画方法中添加了注释,以查看执行这两​​行(以下logcat输出中的第一行和最后一行)之间的内容,以下是logcat输出。有人可以指导我正确的方向。我已经在一些发动机冷冻问题上进行了大量搜索,但没有一个解释我的问题。

12-10 21:23:05.816: E/LiveWallpaperSettings(21831): Resume // <<< onResume Called
12-10 21:23:05.896: D/AndEngine(21831): VERSION: OpenGL ES 2.0
12-10 21:23:05.896: D/AndEngine(21831): RENDERER: Mali-400 MP
12-10 21:23:05.896: D/AndEngine(21831): EGLCONFIG: EGLConfig(Red=5, Green=6, Blue=5, Alpha=0, Depth=0, Stencil=0)
12-10 21:23:05.896: D/AndEngine(21831): EXTENSIONS: GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil 
12-10 21:23:05.906: D/AndEngine(21831): MAX_VERTEX_ATTRIBS: 16
12-10 21:23:05.906: D/AndEngine(21831): MAX_VERTEX_UNIFORM_VECTORS: 128
12-10 21:23:05.906: D/AndEngine(21831): MAX_FRAGMENT_UNIFORM_VECTORS: 1024
12-10 21:23:05.906: D/AndEngine(21831): MAX_TEXTURE_IMAGE_UNITS: 8
12-10 21:23:05.906: D/AndEngine(21831): MAX_TEXTURE_SIZE: 4096
12-10 21:23:05.906: D/AndEngine(21831): LiveWallpaperTemplate.onSurfaceCreated @(Thread: 'GLThread 11')
12-10 21:23:05.906: D/AndEngine(21831): LiveWallpaperTemplate.onReloadResources @(Thread: 'GLThread 11')
12-10 21:23:05.906: D/AndEngine(21831): LiveWallpaperTemplate.onSurfaceChanged(Width=480,  Height=800) @(Thread: 'GLThread 11')
12-10 21:23:06.156: D/dalvikvm(21831): GC_FOR_MALLOC freed 39K, 81% free 2725K/13639K, external 3900K/3900K, paused 12ms
12-10 21:23:06.161: I/dalvikvm-heap(21831): Grow heap (frag case) to 12.774MB for 3932176-byte allocation
12-10 21:23:06.191: D/dalvikvm(21831): GC_FOR_MALLOC freed 0K, 52% free 6565K/13639K, external 3900K/3900K, paused 10ms
12-10 21:23:06.256: D/dalvikvm(21831): GC_CONCURRENT freed 0K, 52% free 6565K/13639K, external 3900K/3900K, paused 1ms+2ms
12-10 21:23:06.301: D/dalvikvm(21831): GC_EXTERNAL_ALLOC freed 3843K, 81% free 2725K/13639K, external 60K/3900K, paused 16ms
12-10 21:23:06.661: D/dalvikvm(21831): GC_FOR_MALLOC freed 4096K, 81% free 2724K/13639K, external 4156K/4156K, paused 9ms
12-10 21:23:06.666: I/dalvikvm-heap(21831): Grow heap (frag case) to 13.274MB for 4194320-byte allocation
12-10 21:23:06.696: D/dalvikvm(21831): GC_FOR_MALLOC freed <1K, 50% free 6820K/13639K, external 4156K/4156K, paused 10ms
12-10 21:23:06.741: D/dalvikvm(21831): GC_CONCURRENT freed <1K, 50% free 6820K/13639K, external 4156K/4156K, paused 1ms+1ms
12-10 21:23:06.911: D/dalvikvm(21831): GC_FOR_MALLOC freed 4096K, 81% free 2724K/13639K, external 4156K/4156K, paused 10ms
12-10 21:23:06.916: I/dalvikvm-heap(21831): Grow heap (frag case) to 13.274MB for 4194320-byte allocation
12-10 21:23:06.946: D/dalvikvm(21831): GC_FOR_MALLOC freed 0K, 50% free 6820K/13639K, external 4156K/4156K, paused 10ms
12-10 21:23:06.996: D/dalvikvm(21831): GC_CONCURRENT freed <1K, 50% free 6820K/13639K, external 4156K/4156K, paused 1ms+2ms
12-10 21:23:07.076: D/dalvikvm(21831): GC_EXPLICIT freed 4100K, 81% free 2724K/13639K, external 60K/572K, paused 16ms
12-10 21:23:07.106: E/LiveWallpaperSettings(21831): Backward loop // animation method called

0 个答案:

没有答案