Implementation idea and code of saving window screenshots as files in Android simulator

The content of Android simulator is rendered with OpenGL, so the general programming screenshot (such as printwindow () etc.) will be black. This is because the paintings are placed in the framebuffer. One method is to pour the framebuffer data / dev / graphics / fb0 of the guest to the host through ADB, and then turn it into a picture. But it's slow. Fortunately, in the Android simulator, the framebuffer of the guest is transferred to the host for display, so on the host side, just output the framebuffer to a file. First, define the callback function for each framebuffer update:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>