why ScreenshotClient failed in screencap.cpp?

403 views
Skip to first unread message

Benny Khoo

unread,
Dec 16, 2014, 9:42:06 PM12/16/14
to andro...@googlegroups.com

frameworks/base/cmds/screencap/screencap.cpp

I noticed with interest that the ScreenshotClient in the sample "screencap" program (path as above) keeps failing in my emulated android-x86. The fallback plan in screencap which capture an image from /dev/graphics/fb0 succeeded though.

The logcat output recorded as follow for every screencap transaction.

logcat output:

D/gralloc (  996): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL  (  996): called unimplemented OpenGL ES API
E/libEGL  (  996): called unimplemented OpenGL ES API
E/libEGL  (  996): called unimplemented OpenGL ES API
E/libEGL  (  996): called unimplemented OpenGL ES API
E/SurfaceFlinger(  996): glCheckFramebufferStatusOES error 1895112603
E/SurfaceFlinger(  996): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL  (  996): called unimplemented OpenGL ES API
E/libEGL  (  996): called unimplemented OpenGL ES API

The above failing can be traced to the line in SurfaceFlinger.cpp:captureScreenImplLocked below which indicates SurfaceFlinger failure to bond image as framebuffer?

RenderEngine::BindImageAsFramebuffer imageBond(getRenderEngine(), image):

Does anybody know why ScreenshotClient might be failing? Is such design intentional?

I am testing this on Virtualbox with android-x86 4.4.4.

Thanks!

Benny Khoo

unread,
Dec 18, 2014, 10:21:06 PM12/18/14
to andro...@googlegroups.com

I think it is possibly the OGL framebuffer API was never implemented in libagl (CPU emulation of OpenGL) :(

glGenFramebuffers(1, &name);
Reply all
Reply to author
Forward
0 new messages